/
usr
/
src
/
linux-headers-5.15.0-190
/
include
/
crypto
/
/usr/src/linux-headers-5.15.0-190/include/crypto
mkdir
upload
Name
Size
Mode
Actions
internal/
-
0755
rm
acompress.h
9073
0644
edit
dl
rm
aead.h
18832
0644
edit
dl
rm
aes.h
2563
0644
edit
dl
rm
akcipher.h
13232
0644
edit
dl
rm
algapi.h
7545
0644
edit
dl
rm
arc4.h
484
0644
edit
dl
rm
asym_tpm_subtype.h
521
0644
edit
dl
rm
authenc.h
635
0644
edit
dl
rm
b128ops.h
2471
0644
edit
dl
rm
blake2b.h
1637
0644
edit
dl
rm
blake2s.h
2680
0644
edit
dl
rm
blowfish.h
415
0644
edit
dl
rm
cast5.h
590
0644
edit
dl
rm
cast6.h
607
0644
edit
dl
rm
cast_common.h
232
0644
edit
dl
rm
chacha.h
3395
0644
edit
dl
rm
chacha20poly1305.h
1699
0644
edit
dl
rm
cryptd.h
2050
0644
edit
dl
rm
ctr.h
1456
0644
edit
dl
rm
curve25519.h
2065
0644
edit
dl
rm
des.h
1724
0644
edit
dl
rm
dh.h
2574
0644
edit
dl
rm
drbg.h
9209
0644
edit
dl
rm
ecc_curve.h
1337
0644
edit
dl
rm
ecdh.h
2487
0644
edit
dl
rm
engine.h
4209
0644
edit
dl
rm
gcm.h
867
0644
edit
dl
rm
gf128mul.h
9647
0644
edit
dl
rm
ghash.h
388
0644
edit
dl
rm
hash.h
34859
0644
edit
dl
rm
hash_info.h
998
0644
edit
dl
rm
hmac.h
173
0644
edit
dl
rm
if_alg.h
6844
0644
edit
dl
rm
kpp.h
10144
0644
edit
dl
rm
md5.h
497
0644
edit
dl
rm
nhpoly1305.h
2236
0644
edit
dl
rm
null.h
346
0644
edit
dl
rm
padlock.h
438
0644
edit
dl
rm
pcrypt.h
815
0644
edit
dl
rm
pkcs7.h
1181
0644
edit
dl
rm
poly1305.h
2500
0644
edit
dl
rm
public_key.h
2440
0644
edit
dl
rm
rng.h
6748
0644
edit
dl
rm
scatterwalk.h
3989
0644
edit
dl
rm
serpent.h
696
0644
edit
dl
rm
sha1.h
1210
0644
edit
dl
rm
sha1_base.h
2512
0644
edit
dl
rm
sha2.h
3849
0644
edit
dl
rm
sha3.h
879
0644
edit
dl
rm
sha256_base.h
2621
0644
edit
dl
rm
sha512_base.h
3255
0644
edit
dl
rm
skcipher.h
20428
0644
edit
dl
rm
sm2.h
749
0644
edit
dl
rm
sm3.h
897
0644
edit
dl
rm
sm3_base.h
2608
0644
edit
dl
rm
sm4.h
1144
0644
edit
dl
rm
streebog.h
949
0644
edit
dl
rm
twofish.h
743
0644
edit
dl
rm
xts.h
1125
0644
edit
dl
rm
Edit:
/usr/src/linux-headers-5.15.0-190/include/crypto/nhpoly1305.h
(2236B)
/* SPDX-License-Identifier: GPL-2.0 */ /* * Common values and helper functions for the NHPoly1305 hash function. */ #ifndef _NHPOLY1305_H #define _NHPOLY1305_H #include <crypto/hash.h> #include <crypto/internal/poly1305.h> /* NH parameterization: */ /* Endianness: little */ /* Word size: 32 bits (works well on NEON, SSE2, AVX2) */ /* Stride: 2 words (optimal on ARM32 NEON; works okay on other CPUs too) */ #define NH_PAIR_STRIDE 2 #define NH_MESSAGE_UNIT (NH_PAIR_STRIDE * 2 * sizeof(u32)) /* Num passes (Toeplitz iteration count): 4, to give ε = 2^{-128} */ #define NH_NUM_PASSES 4 #define NH_HASH_BYTES (NH_NUM_PASSES * sizeof(u64)) /* Max message size: 1024 bytes (32x compression factor) */ #define NH_NUM_STRIDES 64 #define NH_MESSAGE_WORDS (NH_PAIR_STRIDE * 2 * NH_NUM_STRIDES) #define NH_MESSAGE_BYTES (NH_MESSAGE_WORDS * sizeof(u32)) #define NH_KEY_WORDS (NH_MESSAGE_WORDS + \ NH_PAIR_STRIDE * 2 * (NH_NUM_PASSES - 1)) #define NH_KEY_BYTES (NH_KEY_WORDS * sizeof(u32)) #define NHPOLY1305_KEY_SIZE (POLY1305_BLOCK_SIZE + NH_KEY_BYTES) struct nhpoly1305_key { struct poly1305_core_key poly_key; u32 nh_key[NH_KEY_WORDS]; }; struct nhpoly1305_state { /* Running total of polynomial evaluation */ struct poly1305_state poly_state; /* Partial block buffer */ u8 buffer[NH_MESSAGE_UNIT]; unsigned int buflen; /* * Number of bytes remaining until the current NH message reaches * NH_MESSAGE_BYTES. When nonzero, 'nh_hash' holds the partial NH hash. */ unsigned int nh_remaining; __le64 nh_hash[NH_NUM_PASSES]; }; typedef void (*nh_t)(const u32 *key, const u8 *message, size_t message_len, __le64 hash[NH_NUM_PASSES]); int crypto_nhpoly1305_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int keylen); int crypto_nhpoly1305_init(struct shash_desc *desc); int crypto_nhpoly1305_update(struct shash_desc *desc, const u8 *src, unsigned int srclen); int crypto_nhpoly1305_update_helper(struct shash_desc *desc, const u8 *src, unsigned int srclen, nh_t nh_fn); int crypto_nhpoly1305_final(struct shash_desc *desc, u8 *dst); int crypto_nhpoly1305_final_helper(struct shash_desc *desc, u8 *dst, nh_t nh_fn); #endif /* _NHPOLY1305_H */
Save
cmd:
run