/usr/src/kernels/4.18.0-553.121.1.el8_10.x86_64/include/crypto
NameSizeModeActions
internal/-0755rm
acompress.h81200644editdlrm
aead.h187290644editdlrm
aes.h10580644editdlrm
akcipher.h119890644editdlrm
algapi.h121630644editdlrm
arc4.h4840644editdlrm
authenc.h8450644editdlrm
b128ops.h24710644editdlrm
blowfish.h4150644editdlrm
cast5.h5900644editdlrm
cast6.h6360644editdlrm
cast_common.h2320644editdlrm
cbc.h35620644editdlrm
chacha20.h6380644editdlrm
cryptd.h25620644editdlrm
crypto_wq.h1610644editdlrm
ctr.h16660644editdlrm
des.h14030644editdlrm
dh.h27840644editdlrm
drbg.h91600644editdlrm
ecdh.h27330644editdlrm
engine.h42020644editdlrm
gcm.h1400644editdlrm
gf128mul.h96470644editdlrm
ghash.h3810644editdlrm
hash.h333860644editdlrm
hash_info.h11530644editdlrm
hmac.h1730644editdlrm
if_alg.h71280644editdlrm
kpp.h99260644editdlrm
md5.h4970644editdlrm
morus640_glue.h45850644editdlrm
morus1280_glue.h46470644editdlrm
morus_common.h7200644editdlrm
null.h3410644editdlrm
padlock.h6490644editdlrm
pcrypt.h14350644editdlrm
pkcs7.h13880644editdlrm
poly1305.h9200644editdlrm
public_key.h21260644editdlrm
rng.h68200644editdlrm
scatterwalk.h47320644editdlrm
serpent.h7120644editdlrm
sha.h43500644editdlrm
sha1_base.h25320644editdlrm
sha3.h8790644editdlrm
sha256_base.h26290644editdlrm
sha512_base.h32710644editdlrm
skcipher.h233810644editdlrm
sm3.h8330644editdlrm
sm3_base.h30240644editdlrm
sm4.h7540644editdlrm
speck.h13570644editdlrm
twofish.h7550644editdlrm
xts.h13850644editdlrm
Edit: /usr/src/kernels/4.18.0-553.121.1.el8_10.x86_64/include/crypto/xts.h (1385B)
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _CRYPTO_XTS_H #define _CRYPTO_XTS_H #include #include #include #define XTS_BLOCK_SIZE 16 #define XTS_TWEAK_CAST(x) ((void (*)(void *, u8*, const u8*))(x)) static inline int xts_check_key(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) { /* * key consists of keys of equal size concatenated, therefore * the length must be even. */ if (keylen % 2) { crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); return -EINVAL; } /* * In FIPS mode only a combined key length of either 256 or * 512 bits is allowed, c.f. FIPS 140-3 IG C.I. */ if (fips_enabled && keylen != 32 && keylen != 64) { crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); return -EINVAL; } /* * Ensure that the AES and tweak key are not identical when * in FIPS mode or the CRYPTO_TFM_REQ_WEAK_KEY flag is set. */ if ((fips_enabled || (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_WEAK_KEY)) && !crypto_memneq(key, key + (keylen / 2), keylen / 2)) { crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY); return -EINVAL; } return 0; } static inline int xts_verify_key(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) { return xts_check_key(crypto_skcipher_tfm(tfm), key, keylen); } #endif /* _CRYPTO_XTS_H */