From f731fce948595fc82ab46298608f3d099644f992 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 6 Nov 2016 12:39:53 -0500 Subject: Add signature KAT test for GOST 34.10-2001 Vectors here just whatever we spit out, but I can't find any GOST vectors using the 'A' param set. Anyway at least with this, we are testing to have consistent behavior across platforms. --- src/tests/data/pubkey/gost_3410.vec | 18 ------------------ src/tests/data/pubkey/gost_3410_sign.vec | 17 +++++++++++++++++ src/tests/data/pubkey/gost_3410_verify.vec | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+), 18 deletions(-) delete mode 100644 src/tests/data/pubkey/gost_3410.vec create mode 100644 src/tests/data/pubkey/gost_3410_sign.vec create mode 100644 src/tests/data/pubkey/gost_3410_verify.vec (limited to 'src/tests/data') diff --git a/src/tests/data/pubkey/gost_3410.vec b/src/tests/data/pubkey/gost_3410.vec deleted file mode 100644 index 5348467a6..000000000 --- a/src/tests/data/pubkey/gost_3410.vec +++ /dev/null @@ -1,18 +0,0 @@ - -Group = gost_256A -Pubkey = 0400B6F1D75EF48902B0C2302F52CCC71233EC55B903061673AAA586A2B5864048EA2675E8FD8DB1FEDFC7DD40E3CF3A319EE3130E0BE9FDF994B625BC1885F271 -Hash = GOST-34.11 -Msg = -Signature = FE406F383A54127453AED406FA9A3B610B28F89FC918C07A5A75289E97B3A991AA3CB0563295A3E281BA368DF8471DE0A4150B3CFCEA575D8A9CC9779035EC36 - -Group = gost_256A -Pubkey = 04BFE0BA366BE575E45C5BBA339C51ACD75D517008A9D3169E3CCEA6EF08046DA74312382D835BEEA1C561A75AFCAFDA0F75A4E5D9787F9DB2870A032AC1D90465 -Hash = GOST-34.11 -Msg = -Signature = F3AFCBE1398DDC01F0A9E4B45397F3ACD8F343399BD2805FB6293E9CB871123AB7AB61F33E0B70166C355963BB80B8F6DF54F7F6A43872295CD42B6ACF7DF678 - -Group = gost_256A -Pubkey = 03773DC3F032886D56439A9F17490B680570043F757252C1F60819D6C30DBF1469 -Hash = GOST-34.11 -Msg = 00010C0300000E1070DBD880386D4380E954076578616D706C65036E65740003777777076578616D706C65036E6574000001000100000E100004C0000201 -Signature = 66ED09C0A6C97E22CB4E66BCA61D2082FDF6924F3A717C43B531B2D43FEE76DBB0F490A7901B009CCDF87252EBE1790A9AB1A6A444DBACA3E264AF21D18B5E83 diff --git a/src/tests/data/pubkey/gost_3410_sign.vec b/src/tests/data/pubkey/gost_3410_sign.vec new file mode 100644 index 000000000..25d5155b7 --- /dev/null +++ b/src/tests/data/pubkey/gost_3410_sign.vec @@ -0,0 +1,17 @@ + +# These values were generated by Botan and have not been tested against any +# other implementation. + +Group = gost_256A +Privkey = 0xFE406F383A54127453AED406FA9A3B610B28F89FC918C07A5A75289E97B3A991 +Hash = GOST-34.11 +Msg = ABCD +Nonce = 3E0A6097034780CCF32885B870F84B0AA20138BE94A1AA1F77F8997CAC25C58E +Signature = 60053488E6936975A4913083FE16A0CF620FA75732B563AB65B82D37A825BE7D0965C38281A01D23FA5F5D332B339EB2602A564563C005335269A2E811520563 + +Group = gost_256A +Privkey = 0xFDCE35FFFF3AEF1C3AB247F31D733490B4029E699FC2D1C24B2F7C526CBC1445 +Hash = GOST-34.11 +Msg = 33C466741BB472998A27E26E7F77EBF3 +Nonce = 6844F464FA0147FB7D798137680FBA6EA2E709814E3A8B70EFC26F446DE9F94B +Signature = 5E39519E12B5208B3A0A1A1CDD44E2629F0F76A51DFED8484A8B67A2E46D5B871AFADA58E26D1FE08AB4D2E67BF0FF8508870B417D6EA1224FA98B3165D8A032 diff --git a/src/tests/data/pubkey/gost_3410_verify.vec b/src/tests/data/pubkey/gost_3410_verify.vec new file mode 100644 index 000000000..5348467a6 --- /dev/null +++ b/src/tests/data/pubkey/gost_3410_verify.vec @@ -0,0 +1,18 @@ + +Group = gost_256A +Pubkey = 0400B6F1D75EF48902B0C2302F52CCC71233EC55B903061673AAA586A2B5864048EA2675E8FD8DB1FEDFC7DD40E3CF3A319EE3130E0BE9FDF994B625BC1885F271 +Hash = GOST-34.11 +Msg = +Signature = FE406F383A54127453AED406FA9A3B610B28F89FC918C07A5A75289E97B3A991AA3CB0563295A3E281BA368DF8471DE0A4150B3CFCEA575D8A9CC9779035EC36 + +Group = gost_256A +Pubkey = 04BFE0BA366BE575E45C5BBA339C51ACD75D517008A9D3169E3CCEA6EF08046DA74312382D835BEEA1C561A75AFCAFDA0F75A4E5D9787F9DB2870A032AC1D90465 +Hash = GOST-34.11 +Msg = +Signature = F3AFCBE1398DDC01F0A9E4B45397F3ACD8F343399BD2805FB6293E9CB871123AB7AB61F33E0B70166C355963BB80B8F6DF54F7F6A43872295CD42B6ACF7DF678 + +Group = gost_256A +Pubkey = 03773DC3F032886D56439A9F17490B680570043F757252C1F60819D6C30DBF1469 +Hash = GOST-34.11 +Msg = 00010C0300000E1070DBD880386D4380E954076578616D706C65036E65740003777777076578616D706C65036E6574000001000100000E100004C0000201 +Signature = 66ED09C0A6C97E22CB4E66BCA61D2082FDF6924F3A717C43B531B2D43FEE76DBB0F490A7901B009CCDF87252EBE1790A9AB1A6A444DBACA3E264AF21D18B5E83 -- cgit v1.2.3