/usr/src/linux-headers-5.15.0-190/include/crypto/internal
NameSizeModeActions
acompress.h18430644editdlrm
aead.h42270644editdlrm
akcipher.h33850644editdlrm
blake2b.h31380644editdlrm
blake2s.h5860644editdlrm
chacha.h9690644editdlrm
cipher.h68570644editdlrm
cryptouser.h4530644editdlrm
des.h33290644editdlrm
geniv.h7020644editdlrm
hash.h61470644editdlrm
kpp.h14960644editdlrm
poly1305.h11200644editdlrm
rng.h10210644editdlrm
rsa.h16430644editdlrm
scompress.h34180644editdlrm
simd.h22930644editdlrm
skcipher.h54220644editdlrm
Edit: /usr/src/linux-headers-5.15.0-190/include/crypto/internal/chacha.h (969B)
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _CRYPTO_INTERNAL_CHACHA_H #define _CRYPTO_INTERNAL_CHACHA_H #include #include #include struct chacha_ctx { u32 key[8]; int nrounds; }; static inline int chacha_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keysize, int nrounds) { struct chacha_ctx *ctx = crypto_skcipher_ctx(tfm); int i; if (keysize != CHACHA_KEY_SIZE) return -EINVAL; for (i = 0; i < ARRAY_SIZE(ctx->key); i++) ctx->key[i] = get_unaligned_le32(key + i * sizeof(u32)); ctx->nrounds = nrounds; return 0; } static inline int chacha20_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keysize) { return chacha_setkey(tfm, key, keysize, 20); } static inline int chacha12_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keysize) { return chacha_setkey(tfm, key, keysize, 12); } #endif /* _CRYPTO_CHACHA_H */