Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329713
b: refs/heads/master
c: 9b8b040
h: refs/heads/master
i:
  329711: 7d5810b
v: v3
  • Loading branch information
Johannes Goetzfried authored and Herbert Xu committed Aug 1, 2012
1 parent 9ec609b commit 5e51053
Show file tree
Hide file tree
Showing 4 changed files with 1,521 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b49b906729644dd4696b9291b7e2f6cd1266dc0
refs/heads/master: 9b8b04051d0df1e2c7c31206caff05673a2c685f
50 changes: 50 additions & 0 deletions trunk/crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,10 @@ static int do_test(int m)

case 15:
ret += tcrypt_test("ecb(cast6)");
ret += tcrypt_test("cbc(cast6)");
ret += tcrypt_test("ctr(cast6)");
ret += tcrypt_test("lrw(cast6)");
ret += tcrypt_test("xts(cast6)");
break;

case 16:
Expand Down Expand Up @@ -1376,6 +1380,29 @@ static int do_test(int m)
speed_template_8_16);
break;

case 210:
test_cipher_speed("ecb(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_16_32);
test_cipher_speed("ecb(cast6)", DECRYPT, sec, NULL, 0,
speed_template_16_32);
test_cipher_speed("cbc(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_16_32);
test_cipher_speed("cbc(cast6)", DECRYPT, sec, NULL, 0,
speed_template_16_32);
test_cipher_speed("ctr(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_16_32);
test_cipher_speed("ctr(cast6)", DECRYPT, sec, NULL, 0,
speed_template_16_32);
test_cipher_speed("lrw(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_32_48);
test_cipher_speed("lrw(cast6)", DECRYPT, sec, NULL, 0,
speed_template_32_48);
test_cipher_speed("xts(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_32_64);
test_cipher_speed("xts(cast6)", DECRYPT, sec, NULL, 0,
speed_template_32_64);
break;

case 300:
/* fall through */

Expand Down Expand Up @@ -1671,6 +1698,29 @@ static int do_test(int m)
speed_template_8_16);
break;

case 507:
test_acipher_speed("ecb(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_16_32);
test_acipher_speed("ecb(cast6)", DECRYPT, sec, NULL, 0,
speed_template_16_32);
test_acipher_speed("cbc(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_16_32);
test_acipher_speed("cbc(cast6)", DECRYPT, sec, NULL, 0,
speed_template_16_32);
test_acipher_speed("ctr(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_16_32);
test_acipher_speed("ctr(cast6)", DECRYPT, sec, NULL, 0,
speed_template_16_32);
test_acipher_speed("lrw(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_32_48);
test_acipher_speed("lrw(cast6)", DECRYPT, sec, NULL, 0,
speed_template_32_48);
test_acipher_speed("xts(cast6)", ENCRYPT, sec, NULL, 0,
speed_template_32_64);
test_acipher_speed("xts(cast6)", DECRYPT, sec, NULL, 0,
speed_template_32_64);
break;

case 1000:
test_available();
break;
Expand Down
60 changes: 60 additions & 0 deletions trunk/crypto/testmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1877,6 +1877,21 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}
}, {
.alg = "cbc(cast6)",
.test = alg_test_skcipher,
.suite = {
.cipher = {
.enc = {
.vecs = cast6_cbc_enc_tv_template,
.count = CAST6_CBC_ENC_TEST_VECTORS
},
.dec = {
.vecs = cast6_cbc_dec_tv_template,
.count = CAST6_CBC_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "cbc(des)",
.test = alg_test_skcipher,
Expand Down Expand Up @@ -2143,6 +2158,21 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}
}, {
.alg = "ctr(cast6)",
.test = alg_test_skcipher,
.suite = {
.cipher = {
.enc = {
.vecs = cast6_ctr_enc_tv_template,
.count = CAST6_CTR_ENC_TEST_VECTORS
},
.dec = {
.vecs = cast6_ctr_dec_tv_template,
.count = CAST6_CTR_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ctr(serpent)",
.test = alg_test_skcipher,
Expand Down Expand Up @@ -2619,6 +2649,21 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}
}, {
.alg = "lrw(cast6)",
.test = alg_test_skcipher,
.suite = {
.cipher = {
.enc = {
.vecs = cast6_lrw_enc_tv_template,
.count = CAST6_LRW_ENC_TEST_VECTORS
},
.dec = {
.vecs = cast6_lrw_dec_tv_template,
.count = CAST6_LRW_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "lrw(serpent)",
.test = alg_test_skcipher,
Expand Down Expand Up @@ -2971,6 +3016,21 @@ static const struct alg_test_desc alg_test_descs[] = {
}
}
}
}, {
.alg = "xts(cast6)",
.test = alg_test_skcipher,
.suite = {
.cipher = {
.enc = {
.vecs = cast6_xts_enc_tv_template,
.count = CAST6_XTS_ENC_TEST_VECTORS
},
.dec = {
.vecs = cast6_xts_dec_tv_template,
.count = CAST6_XTS_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "xts(serpent)",
.test = alg_test_skcipher,
Expand Down
Loading

0 comments on commit 5e51053

Please sign in to comment.