Skip to content

Commit 60a273e

Browse files
nicstangeherbertx
authored andcommitted
crypto: testmgr - add known answer tests for ffdheXYZ(dh) templates
Add known answer tests for the ffdhe2048(dh), ffdhe3072(dh), ffdhe4096(dh), ffdhe6144(dh) and ffdhe8192(dh) templates introduced with the previous patch to the testmgr. All TVs have been generated with OpenSSL. Signed-off-by: Nicolai Stange <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 7dce598 commit 60a273e

File tree

2 files changed

+908
-0
lines changed

2 files changed

+908
-0
lines changed

crypto/testmgr.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4973,6 +4973,43 @@ static const struct alg_test_desc alg_test_descs[] = {
49734973
.cipher = __VECS(essiv_aes_cbc_tv_template)
49744974
}
49754975
}, {
4976+
#if IS_ENABLED(CONFIG_CRYPTO_DH_RFC7919_GROUPS)
4977+
.alg = "ffdhe2048(dh)",
4978+
.test = alg_test_kpp,
4979+
.fips_allowed = 1,
4980+
.suite = {
4981+
.kpp = __VECS(ffdhe2048_dh_tv_template)
4982+
}
4983+
}, {
4984+
.alg = "ffdhe3072(dh)",
4985+
.test = alg_test_kpp,
4986+
.fips_allowed = 1,
4987+
.suite = {
4988+
.kpp = __VECS(ffdhe3072_dh_tv_template)
4989+
}
4990+
}, {
4991+
.alg = "ffdhe4096(dh)",
4992+
.test = alg_test_kpp,
4993+
.fips_allowed = 1,
4994+
.suite = {
4995+
.kpp = __VECS(ffdhe4096_dh_tv_template)
4996+
}
4997+
}, {
4998+
.alg = "ffdhe6144(dh)",
4999+
.test = alg_test_kpp,
5000+
.fips_allowed = 1,
5001+
.suite = {
5002+
.kpp = __VECS(ffdhe6144_dh_tv_template)
5003+
}
5004+
}, {
5005+
.alg = "ffdhe8192(dh)",
5006+
.test = alg_test_kpp,
5007+
.fips_allowed = 1,
5008+
.suite = {
5009+
.kpp = __VECS(ffdhe8192_dh_tv_template)
5010+
}
5011+
}, {
5012+
#endif /* CONFIG_CRYPTO_DH_RFC7919_GROUPS */
49765013
.alg = "gcm(aes)",
49775014
.generic_driver = "gcm_base(ctr(aes-generic),ghash-generic)",
49785015
.test = alg_test_aead,

0 commit comments

Comments
 (0)