crypto: clarify name of WEAK_KEY request flag
authorEric Biggers <ebiggers@google.com>
Sat, 19 Jan 2019 06:48:00 +0000 (22:48 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 25 Jan 2019 10:41:52 +0000 (18:41 +0800)
commit231baecdef7a906579925ccf1bd45aa734f32320
treed445c32fbb19c327331c8cc3d254d72a96ffa919
parent37ebffff65b2321a9b51ae928851330154358f1d
crypto: clarify name of WEAK_KEY request flag

CRYPTO_TFM_REQ_WEAK_KEY confuses newcomers to the crypto API because it
sounds like it is requesting a weak key.  Actually, it is requesting
that weak keys be forbidden (for algorithms that have the notion of
"weak keys"; currently only DES and XTS do).

Also it is only one letter away from CRYPTO_TFM_RES_WEAK_KEY, with which
it can be easily confused.  (This in fact happened in the UX500 driver,
though just in some debugging messages.)

Therefore, make the intent clear by renaming it to
CRYPTO_TFM_REQ_FORBID_WEAK_KEYS.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
25 files changed:
arch/s390/crypto/des_s390.c
arch/sparc/crypto/des_glue.c
crypto/des_generic.c
crypto/testmgr.c
crypto/testmgr.h
drivers/crypto/atmel-tdes.c
drivers/crypto/bcm/cipher.c
drivers/crypto/ccp/ccp-crypto-des3.c
drivers/crypto/ccree/cc_cipher.c
drivers/crypto/hifn_795x.c
drivers/crypto/inside-secure/safexcel_cipher.c
drivers/crypto/ixp4xx_crypto.c
drivers/crypto/marvell/cipher.c
drivers/crypto/n2_core.c
drivers/crypto/omap-des.c
drivers/crypto/picoxcell_crypto.c
drivers/crypto/qce/ablkcipher.c
drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c
drivers/crypto/sunxi-ss/sun4i-ss-cipher.c
drivers/crypto/talitos.c
drivers/crypto/ux500/cryp/cryp_core.c
fs/crypto/keyinfo.c
fs/ecryptfs/crypto.c
include/crypto/xts.h
include/linux/crypto.h