mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
crypto: testmgr - update sm4 test vectors
Add additional test vectors from "The SM4 Blockcipher Algorithm And Its Modes Of Operations" draft-ribose-cfrg-sm4-10 and register cipher speed tests for sm4. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
ce1294d981
commit
95ba597367
4 changed files with 144 additions and 7 deletions
|
|
@ -2661,6 +2661,12 @@ static const struct alg_test_desc alg_test_descs[] = {
|
|||
.suite = {
|
||||
.cipher = __VECS(serpent_cbc_tv_template)
|
||||
},
|
||||
}, {
|
||||
.alg = "cbc(sm4)",
|
||||
.test = alg_test_skcipher,
|
||||
.suite = {
|
||||
.cipher = __VECS(sm4_cbc_tv_template)
|
||||
}
|
||||
}, {
|
||||
.alg = "cbc(twofish)",
|
||||
.test = alg_test_skcipher,
|
||||
|
|
@ -2784,6 +2790,12 @@ static const struct alg_test_desc alg_test_descs[] = {
|
|||
.suite = {
|
||||
.cipher = __VECS(serpent_ctr_tv_template)
|
||||
}
|
||||
}, {
|
||||
.alg = "ctr(sm4)",
|
||||
.test = alg_test_skcipher,
|
||||
.suite = {
|
||||
.cipher = __VECS(sm4_ctr_tv_template)
|
||||
}
|
||||
}, {
|
||||
.alg = "ctr(twofish)",
|
||||
.test = alg_test_skcipher,
|
||||
|
|
|
|||
Loading…
Reference in a new issue