Lines Matching refs:key
3 * DES & Triple DES EDE key verification helpers
16 * crypto_des_verify_key - Check whether a DES key is weak
18 * @key: the key buffer
20 * Returns -EINVAL if the key is weak and the crypto TFM does not permit weak
23 * It is the job of the caller to ensure that the size of the key equals
26 static inline int crypto_des_verify_key(struct crypto_tfm *tfm, const u8 *key)
31 err = des_expand_key(&tmp, key, DES_KEY_SIZE);
55 static inline int des3_ede_verify_key(const u8 *key, unsigned int key_len,
61 memcpy(K, key, DES3_EDE_KEY_SIZE);
79 * crypto_des3_ede_verify_key - Check whether a DES3-EDE key is weak
81 * @key: the key buffer
83 * Returns -EINVAL if the key is weak and the crypto TFM does not permit weak
88 * It is the job of the caller to ensure that the size of the key equals
92 const u8 *key)
94 return des3_ede_verify_key(key, DES3_EDE_KEY_SIZE,
100 const u8 *key)
102 return crypto_des_verify_key(crypto_skcipher_tfm(tfm), key);
106 const u8 *key)
108 return crypto_des3_ede_verify_key(crypto_skcipher_tfm(tfm), key);
111 static inline int verify_aead_des_key(struct crypto_aead *tfm, const u8 *key,
116 return crypto_des_verify_key(crypto_aead_tfm(tfm), key);
119 static inline int verify_aead_des3_key(struct crypto_aead *tfm, const u8 *key,
124 return crypto_des3_ede_verify_key(crypto_aead_tfm(tfm), key);