Re: [PATCH] crypto: clarify name of WEAK_KEY request flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 18, 2019 at 10:48:00PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  arch/s390/crypto/des_s390.c                   |  4 ++--
>  arch/sparc/crypto/des_glue.c                  |  4 ++--
>  crypto/des_generic.c                          |  4 ++--
>  crypto/testmgr.c                              | 14 ++++++-------
>  crypto/testmgr.h                              |  4 ++--
>  drivers/crypto/atmel-tdes.c                   |  2 +-
>  drivers/crypto/bcm/cipher.c                   |  4 ++--
>  drivers/crypto/ccp/ccp-crypto-des3.c          |  2 +-
>  drivers/crypto/ccree/cc_cipher.c              |  3 ++-
>  drivers/crypto/hifn_795x.c                    |  3 ++-
>  .../crypto/inside-secure/safexcel_cipher.c    |  2 +-
>  drivers/crypto/ixp4xx_crypto.c                |  4 ++--
>  drivers/crypto/marvell/cipher.c               |  2 +-
>  drivers/crypto/n2_core.c                      |  2 +-
>  drivers/crypto/omap-des.c                     |  2 +-
>  drivers/crypto/picoxcell_crypto.c             |  3 ++-
>  drivers/crypto/qce/ablkcipher.c               |  4 ++--
>  .../rockchip/rk3288_crypto_ablkcipher.c       |  2 +-
>  drivers/crypto/sunxi-ss/sun4i-ss-cipher.c     |  2 +-
>  drivers/crypto/talitos.c                      |  2 +-
>  drivers/crypto/ux500/cryp/cryp_core.c         | 20 ++++++++++---------
>  fs/crypto/keyinfo.c                           |  4 ++--
>  fs/ecryptfs/crypto.c                          |  5 +++--
>  include/crypto/xts.h                          |  4 ++--
>  include/linux/crypto.h                        |  2 +-
>  25 files changed, 55 insertions(+), 49 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux