mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
Merge tag 'v6.18-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - Fix zstd regression - Ensure ti driver algorithm are set as async - Revert patch disabling SHA1 in FIPS mode - Fix RNG set_ent null-pointer dereference * tag 'v6.18-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: rng - Ensure set_ent is always present Revert "crypto: testmgr - desupport SHA-1 for FIPS 140" crypto: ti - Add CRYPTO_ALG_ASYNC flag to DTHEv2 AES algos crypto: zstd - Fix compression bug caused by truncation
This commit is contained in:
@@ -168,6 +168,11 @@ out:
|
||||
EXPORT_SYMBOL_GPL(crypto_del_default_rng);
|
||||
#endif
|
||||
|
||||
static void rng_default_set_ent(struct crypto_rng *tfm, const u8 *data,
|
||||
unsigned int len)
|
||||
{
|
||||
}
|
||||
|
||||
int crypto_register_rng(struct rng_alg *alg)
|
||||
{
|
||||
struct crypto_alg *base = &alg->base;
|
||||
@@ -179,6 +184,9 @@ int crypto_register_rng(struct rng_alg *alg)
|
||||
base->cra_flags &= ~CRYPTO_ALG_TYPE_MASK;
|
||||
base->cra_flags |= CRYPTO_ALG_TYPE_RNG;
|
||||
|
||||
if (!alg->set_ent)
|
||||
alg->set_ent = rng_default_set_ent;
|
||||
|
||||
return crypto_register_alg(base);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(crypto_register_rng);
|
||||
|
||||
@@ -4187,6 +4187,7 @@ static const struct alg_test_desc alg_test_descs[] = {
|
||||
.alg = "authenc(hmac(sha1),cbc(aes))",
|
||||
.generic_driver = "authenc(hmac-sha1-lib,cbc(aes-generic))",
|
||||
.test = alg_test_aead,
|
||||
.fips_allowed = 1,
|
||||
.suite = {
|
||||
.aead = __VECS(hmac_sha1_aes_cbc_tv_temp)
|
||||
}
|
||||
@@ -4207,6 +4208,7 @@ static const struct alg_test_desc alg_test_descs[] = {
|
||||
}, {
|
||||
.alg = "authenc(hmac(sha1),ctr(aes))",
|
||||
.test = alg_test_null,
|
||||
.fips_allowed = 1,
|
||||
}, {
|
||||
.alg = "authenc(hmac(sha1),ecb(cipher_null))",
|
||||
.generic_driver = "authenc(hmac-sha1-lib,ecb-cipher_null)",
|
||||
@@ -4217,6 +4219,7 @@ static const struct alg_test_desc alg_test_descs[] = {
|
||||
}, {
|
||||
.alg = "authenc(hmac(sha1),rfc3686(ctr(aes)))",
|
||||
.test = alg_test_null,
|
||||
.fips_allowed = 1,
|
||||
}, {
|
||||
.alg = "authenc(hmac(sha224),cbc(des))",
|
||||
.generic_driver = "authenc(hmac-sha224-lib,cbc(des-generic))",
|
||||
@@ -5075,6 +5078,7 @@ static const struct alg_test_desc alg_test_descs[] = {
|
||||
.alg = "hmac(sha1)",
|
||||
.generic_driver = "hmac-sha1-lib",
|
||||
.test = alg_test_hash,
|
||||
.fips_allowed = 1,
|
||||
.suite = {
|
||||
.hash = __VECS(hmac_sha1_tv_template)
|
||||
}
|
||||
@@ -5448,6 +5452,7 @@ static const struct alg_test_desc alg_test_descs[] = {
|
||||
.alg = "sha1",
|
||||
.generic_driver = "sha1-lib",
|
||||
.test = alg_test_hash,
|
||||
.fips_allowed = 1,
|
||||
.suite = {
|
||||
.hash = __VECS(sha1_tv_template)
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void zstd_exit(struct crypto_acomp *acomp_tfm)
|
||||
static int zstd_compress_one(struct acomp_req *req, struct zstd_ctx *ctx,
|
||||
const void *src, void *dst, unsigned int *dlen)
|
||||
{
|
||||
unsigned int out_len;
|
||||
size_t out_len;
|
||||
|
||||
ctx->cctx = zstd_init_cctx(ctx->wksp, ctx->wksp_size);
|
||||
if (!ctx->cctx)
|
||||
|
||||
@@ -367,6 +367,7 @@ static struct skcipher_engine_alg cipher_algs[] = {
|
||||
.cra_driver_name = "ecb-aes-dthev2",
|
||||
.cra_priority = 299,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
|
||||
CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_alignmask = AES_BLOCK_SIZE - 1,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
@@ -389,6 +390,7 @@ static struct skcipher_engine_alg cipher_algs[] = {
|
||||
.cra_driver_name = "cbc-aes-dthev2",
|
||||
.cra_priority = 299,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
|
||||
CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_alignmask = AES_BLOCK_SIZE - 1,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
|
||||
Reference in New Issue
Block a user