linux/crypto
Eric Biggers 101e99c23a crypto: testmgr - generate power-of-2 lengths more often
Implementations of hash functions often have special cases when lengths
are a multiple of the hash function's internal block size (e.g. 64 for
SHA-256, 128 for SHA-512).  Currently, when the fuzz testing code
generates lengths, it doesn't prefer any length mod 64 over any other.
This limits the coverage of these special cases.

Therefore, this patch updates the fuzz testing code to generate
power-of-2 lengths and divide messages exactly in half a bit more often.

Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2024-07-13 11:50:28 +12:00
..
asymmetric_keys crypto: sm2 - Remove sm2 algorithm 2024-06-07 19:46:39 +08:00
async_tx
842.c
acompress.c
adiantum.c
aead.c
aegis128-core.c
aegis128-neon-inner.c
aegis128-neon.c
aegis-neon.h
aegis.h
aes_generic.c
aes_ti.c
af_alg.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
ahash.c
akcipher.c
algapi.c crypto: api - Disable boot-test-finished if algapi is a module 2024-05-31 17:34:56 +08:00
algboss.c
algif_aead.c
algif_hash.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
algif_rng.c
algif_skcipher.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
ansi_cprng.c
anubis.c
api.c crypto: api - Disable boot-test-finished if algapi is a module 2024-05-31 17:34:56 +08:00
arc4.c
aria_generic.c
authenc.c
authencesn.c
blake2b_generic.c
blowfish_common.c
blowfish_generic.c
bpf_crypto_skcipher.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
cbc.c
ccm.c
chacha20poly1305.c
chacha_generic.c
cipher.c
cmac.c
compress.c
compress.h
crc32_generic.c
crc32c_generic.c
crc64_rocksoft_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c
crypto_engine.c
crypto_null.c
crypto_user.c
ctr.c
cts.c
curve25519-generic.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
deflate.c crypto: deflate - Add aliases to deflate 2024-06-28 11:35:47 +10:00
des_generic.c
dh_helper.c
dh.c
drbg.c
ecb.c
ecc_curve_defs.h
ecc.c crypto: ecc - Fix off-by-one missing to clear most significant digit 2024-06-16 13:41:53 +08:00
ecdh_helper.c
ecdh.c
ecdsa.c crypto: ecdsa - Use ecc_digits_from_bytes to convert signature 2024-06-07 19:46:39 +08:00
ecdsasignature.asn1
echainiv.c
ecrdsa_defs.h
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
ecrdsa.c
essiv.c
fcrypt.c
fips.c
gcm.c
geniv.c
ghash-generic.c
hash_info.c
hash.h
hctr2.c
hmac.c
internal.h crypto: api - Disable boot-test-finished if algapi is a module 2024-05-31 17:34:56 +08:00
jitterentropy-kcapi.c
jitterentropy-testing.c
jitterentropy.c
jitterentropy.h
Kconfig crypto: sm2 - Remove sm2 algorithm 2024-06-07 19:46:39 +08:00
kdf_sp800108.c
keywrap.c
khazad.c
kpp.c
lrw.c
lskcipher.c
lz4.c
lz4hc.c
lzo-rle.c
lzo.c
Makefile crypto: sm2 - Remove sm2 algorithm 2024-06-07 19:46:39 +08:00
md4.c
md5.c
michael_mic.c
nhpoly1305.c
pcbc.c
pcrypt.c
poly1305_generic.c
polyval-generic.c
proc.c
ripemd.h
rmd160.c
rng.c
rsa_helper.c
rsa-pkcs1pad.c
rsa.c
rsaprivkey.asn1
rsapubkey.asn1
scatterwalk.c
scompress.c
seed.c
seqiv.c
serpent_generic.c
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c
sig.c
simd.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
skcipher.c
skcipher.h
sm3_generic.c
sm3.c
sm4_generic.c
sm4.c
streebog_generic.c
tcrypt.c crypto: tcrypt - add skcipher speed for given alg 2024-06-28 11:35:46 +10:00
tcrypt.h
tea.c
testmgr.c crypto: testmgr - generate power-of-2 lengths more often 2024-07-13 11:50:28 +12:00
testmgr.h crypto: sm2 - Remove sm2 algorithm 2024-06-07 19:46:39 +08:00
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xctr.c
xor.c crypto: Add missing MODULE_DESCRIPTION() macros 2024-05-31 17:34:56 +08:00
xts.c
xxhash_generic.c
zstd.c