PATH:
usr
/
src
/
kernels
/
5.14.0-611.49.2.el9_7.x86_64
/
include
/
crypto
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _CRYPTO_XTS_H #define _CRYPTO_XTS_H #include <crypto/b128ops.h> #include <crypto/internal/skcipher.h> #include <linux/fips.h> #define XTS_BLOCK_SIZE 16 static inline int xts_verify_key(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) { /* * key consists of keys of equal size concatenated, therefore * the length must be even. */ if (keylen % 2) 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) return -EINVAL; /* * Ensure that the AES and tweak key are not identical when * in FIPS mode or the FORBID_WEAK_KEYS flag is set. */ if ((fips_enabled || (crypto_skcipher_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)) && !crypto_memneq(key, key + (keylen / 2), keylen / 2)) return -EINVAL; return 0; } #endif /* _CRYPTO_XTS_H */
[-] akcipher.h
[edit]
[-] hkdf.h
[edit]
[-] dh.h
[edit]
[-] hash.h
[edit]
[-] ctr.h
[edit]
[-] blowfish.h
[edit]
[-] engine.h
[edit]
[-] arc4.h
[edit]
[-] kpp.h
[edit]
[-] blake2s.h
[edit]
[-] chacha20poly1305.h
[edit]
[-] ecdh.h
[edit]
[-] cast_common.h
[edit]
[-] gf128mul.h
[edit]
[-] asym_tpm_subtype.h
[edit]
[-] chacha.h
[edit]
[-] cryptd.h
[edit]
[-] b128ops.h
[edit]
[-] md5.h
[edit]
[-] streebog.h
[edit]
[-] sha1.h
[edit]
[-] public_key.h
[edit]
[-] drbg.h
[edit]
[-] sha256_base.h
[edit]
[-] sha2.h
[edit]
[-] sha512_base.h
[edit]
[-] pkcs7.h
[edit]
[-] skcipher.h
[edit]
[-] sm4.h
[edit]
[-] sha3.h
[edit]
[-] rng.h
[edit]
[-] cast6.h
[edit]
[-] twofish.h
[edit]
[-] scatterwalk.h
[edit]
[-] blake2b.h
[edit]
[-] ghash.h
[edit]
[+]
internal
[-] sm3.h
[edit]
[-] ecc_curve.h
[edit]
[-] des.h
[edit]
[-] aead.h
[edit]
[-] hash_info.h
[edit]
[-] gcm.h
[edit]
[-] cast5.h
[edit]
[-] sha1_base.h
[edit]
[-] xts.h
[edit]
[-] hmac.h
[edit]
[-] null.h
[edit]
[-] curve25519.h
[edit]
[-] acompress.h
[edit]
[-] nhpoly1305.h
[edit]
[-] sm3_base.h
[edit]
[-] serpent.h
[edit]
[-] algapi.h
[edit]
[-] padlock.h
[edit]
[-] pcrypt.h
[edit]
[+]
..
[-] poly1305.h
[edit]
[-] aes.h
[edit]
[-] if_alg.h
[edit]
[-] authenc.h
[edit]
[-] sm2.h
[edit]