/usr/src/linux-headers-5.15.0-181/include/crypto
NameSizeModeActions
internal/-0755rm
acompress.h90730644editdlrm
aead.h188320644editdlrm
aes.h25630644editdlrm
akcipher.h132320644editdlrm
algapi.h75450644editdlrm
arc4.h4840644editdlrm
asym_tpm_subtype.h5210644editdlrm
authenc.h6350644editdlrm
b128ops.h24710644editdlrm
blake2b.h16370644editdlrm
blake2s.h26800644editdlrm
blowfish.h4150644editdlrm
cast5.h5900644editdlrm
cast6.h6070644editdlrm
cast_common.h2320644editdlrm
chacha.h33950644editdlrm
chacha20poly1305.h16990644editdlrm
cryptd.h20500644editdlrm
ctr.h14560644editdlrm
curve25519.h20650644editdlrm
des.h17240644editdlrm
dh.h25740644editdlrm
drbg.h92090644editdlrm
ecc_curve.h13370644editdlrm
ecdh.h24870644editdlrm
engine.h42090644editdlrm
gcm.h8670644editdlrm
gf128mul.h96470644editdlrm
ghash.h3880644editdlrm
hash.h348590644editdlrm
hash_info.h9980644editdlrm
hmac.h1730644editdlrm
if_alg.h68440644editdlrm
kpp.h101440644editdlrm
md5.h4970644editdlrm
nhpoly1305.h22360644editdlrm
null.h3460644editdlrm
padlock.h4380644editdlrm
pcrypt.h8150644editdlrm
pkcs7.h11810644editdlrm
poly1305.h25000644editdlrm
public_key.h24400644editdlrm
rng.h67480644editdlrm
scatterwalk.h39890644editdlrm
serpent.h6960644editdlrm
sha1.h12100644editdlrm
sha1_base.h25120644editdlrm
sha2.h38490644editdlrm
sha3.h8790644editdlrm
sha256_base.h26210644editdlrm
sha512_base.h32550644editdlrm
skcipher.h204280644editdlrm
sm2.h7490644editdlrm
sm3.h8970644editdlrm
sm3_base.h26080644editdlrm
sm4.h11440644editdlrm
streebog.h9490644editdlrm
twofish.h7430644editdlrm
xts.h11250644editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/include/crypto/poly1305.h (2500B)
/* SPDX-License-Identifier: GPL-2.0 */ /* * Common values for the Poly1305 algorithm */ #ifndef _CRYPTO_POLY1305_H #define _CRYPTO_POLY1305_H #include #include #define POLY1305_BLOCK_SIZE 16 #define POLY1305_KEY_SIZE 32 #define POLY1305_DIGEST_SIZE 16 /* The poly1305_key and poly1305_state types are mostly opaque and * implementation-defined. Limbs might be in base 2^64 or base 2^26, or * different yet. The union type provided keeps these 64-bit aligned for the * case in which this is implemented using 64x64 multiplies. */ struct poly1305_key { union { u32 r[5]; u64 r64[3]; }; }; struct poly1305_core_key { struct poly1305_key key; struct poly1305_key precomputed_s; }; struct poly1305_state { union { u32 h[5]; u64 h64[3]; }; }; struct poly1305_desc_ctx { /* partial buffer */ u8 buf[POLY1305_BLOCK_SIZE]; /* bytes used in partial buffer */ unsigned int buflen; /* how many keys have been set in r[] */ unsigned short rset; /* whether s[] has been set */ bool sset; /* finalize key */ u32 s[4]; /* accumulator */ struct poly1305_state h; /* key */ union { struct poly1305_key opaque_r[CONFIG_CRYPTO_LIB_POLY1305_RSIZE]; struct poly1305_core_key core_r; }; }; void poly1305_init_arch(struct poly1305_desc_ctx *desc, const u8 key[POLY1305_KEY_SIZE]); void poly1305_init_generic(struct poly1305_desc_ctx *desc, const u8 key[POLY1305_KEY_SIZE]); static inline void poly1305_init(struct poly1305_desc_ctx *desc, const u8 *key) { if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305)) poly1305_init_arch(desc, key); else poly1305_init_generic(desc, key); } void poly1305_update_arch(struct poly1305_desc_ctx *desc, const u8 *src, unsigned int nbytes); void poly1305_update_generic(struct poly1305_desc_ctx *desc, const u8 *src, unsigned int nbytes); static inline void poly1305_update(struct poly1305_desc_ctx *desc, const u8 *src, unsigned int nbytes) { if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305)) poly1305_update_arch(desc, src, nbytes); else poly1305_update_generic(desc, src, nbytes); } void poly1305_final_arch(struct poly1305_desc_ctx *desc, u8 *digest); void poly1305_final_generic(struct poly1305_desc_ctx *desc, u8 *digest); static inline void poly1305_final(struct poly1305_desc_ctx *desc, u8 *digest) { if (IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305)) poly1305_final_arch(desc, digest); else poly1305_final_generic(desc, digest); } #endif