diff options
author | Jack Lloyd <[email protected]> | 2015-12-26 21:54:09 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-12-26 21:54:09 -0500 |
commit | 72f0f0ad2a9f869092b889779e2e9baed0fe7a85 (patch) | |
tree | 0b3a127a4ceb18df2cd35038eac3eb225f0c095e /src/tests/data | |
parent | 2e47770cf7ddc6e33bee586211a5ea2cdf2e8659 (diff) |
Add generalized KEM interface
Convert McEliece KEM to use it
Add RSA-KEM
Diffstat (limited to 'src/tests/data')
-rw-r--r-- | src/tests/data/pubkey/rsa_kem.vec | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tests/data/pubkey/rsa_kem.vec b/src/tests/data/pubkey/rsa_kem.vec new file mode 100644 index 000000000..6fb76fcfe --- /dev/null +++ b/src/tests/data/pubkey/rsa_kem.vec @@ -0,0 +1,25 @@ + +# RSA-KEM tests vectors from ISO-18033-2 +# http://www.shoup.net/iso/std4.pdf + +# R values here are -1 from the actual desired value to account for +# some logic in random_integer wrt the bounds + +# Test C.6.2 +E = 65537 +P = 74100103850091296168511028051948833436338123529747970640732238422269665602829 +Q = 79461607023043824134896992211543210236933205105414344240218914846895267687977 +R = 032E45326FA859A72EC235ACFF929B15D1372E30B207255F0611B8F785D764374152E0AC009E509E7BA30CD2F1778E113B64E135CF4E2292C75EFE5288EDFDA3 +C0 = 4603E5324CAB9CEF8365C817052D954D44447B1667099EDC69942D32CD594E4FFCF268AE3836E2C35744AAA53AE201FE499806B67DEDAA26BF72ECBD117A6FC0 +KDF = KDF2(SHA-1) +K = 0E6A26EB7B956CCB8B3BDC1CA975BC57C3989E8FBAD31A224655D800C46954840F + +# Test C.6.4 + +E = 65537 +P = 74100103850091296168511028051948833436338123529747970640732238422269665602829 +Q = 79461607023043824134896992211543210236933205105414344240218914846895267687977 +R = 032E45326FA859A72EC235ACFF929B15D1372E30B207255F0611B8F785D764374152E0AC009E509E7BA30CD2F1778E113B64E135CF4E2292C75EFE5288EDFDA3 +C0 = 4603E5324CAB9CEF8365C817052D954D44447B1667099EDC69942D32CD594E4FFCF268AE3836E2C35744AAA53AE201FE499806B67DEDAA26BF72ECBD117A6FC0 +KDF = KDF2(SHA-256) +K = 10a2403db42a8743cb989de86e668d168cbe6046 |