diff options
author | Jack Lloyd <[email protected]> | 2016-08-27 11:19:04 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-08-27 11:19:04 -0400 |
commit | 8e74affc42276da4f002fc21b87a6a97508114d6 (patch) | |
tree | e26198f02fce1f2a493ad095e11cdd2ed0e65416 /src/tests | |
parent | e6b9f54307f50de5d6ee05a33f772edce8cc2721 (diff) | |
parent | 1588710009edd035aab9e12a6a2e8320889c1997 (diff) |
Merge GH #607 PK sig test vectors where H(m) has many leading 0 bits
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/data/pubkey/dsa_prob.vec | 12 | ||||
-rw-r--r-- | src/tests/data/pubkey/dsa_rfc6979.vec | 6 | ||||
-rw-r--r-- | src/tests/data/pubkey/ecdsa_prob.vec | 12 | ||||
-rw-r--r-- | src/tests/data/pubkey/ecdsa_rfc6979.vec | 11 | ||||
-rw-r--r-- | src/tests/data/pubkey/rsa_sig.vec | 9 |
5 files changed, 50 insertions, 0 deletions
diff --git a/src/tests/data/pubkey/dsa_prob.vec b/src/tests/data/pubkey/dsa_prob.vec index 9d0559604..6af484b61 100644 --- a/src/tests/data/pubkey/dsa_prob.vec +++ b/src/tests/data/pubkey/dsa_prob.vec @@ -436,6 +436,12 @@ X = 0x6132e551cdac88409183bd37ee1452cd247d4834b08814b275be3ff5 Nonce = 7197392d32d0af6a7183cc3398556f8f687d86a8ff742be6ad38562f Signature = 45df2f423e94bf155dd4e1d9e63f315ea606dd38527d4cf6328738c859b3e8efa5bc0ccbf4a3cbb6515c4b9bf784cfacdcc101dc9f81d31f +# Msg that produces a hash with leading zeros. Test created with BouncyCastle +Msg = FCABA2CF434AC8DCFCEC +X = 0x6132e551cdac88409183bd37ee1452cd247d4834b08814b275be3ff5 +Nonce = 7197392d32d0af6a7183cc3398556f8f687d86a8ff742be6ad38562f +Signature = 45DF2F423E94BF155DD4E1D9E63F315EA606DD38527D4CF6328738C83F3FF396FACFB75BDF18FFE0ABF1CDB3950B4AF63F1DE756713F15E6 + Msg = 3bd2ab08217878e6774ec7797deb75d5c94c40e24ddf1fac8dde3a29c86b26f57157d329aac31a6622e1d6dac97e22695d7d1f8e20aa26b06795c2f878ba5d2b9cc4b16d5fa60a5fa5c24c09031de2f970a9b57ea24af17192ece21a4d120fdb52e62b8238f778ff8552fa453c0a8891243fc8757188e9c4e0e749f7e9cdf1c1 X = 0x32d53ad2620c156e4617a8680c543839c9be93103e80cc0fefa44ce5 Nonce = 2e8e4625de74e31bea9e480a5de92890095b6ce36897a2337ff97d53 @@ -1274,6 +1280,12 @@ X = 0x433cfd0532ccfd8cdd1b25920d2bb7396987b766240379035b0e86527ce9c52d Nonce = 40f503abd70fd49a76c67a83e08b062b3fd465ad92be433c080e5f295bb9f559 Signature = 21ca148cdf44be4ae93b2f353b8e512d03ad96dafa80623fde4922a95f03273273e48b77a3aa44307483c2dd895cb51db2112177c185c59cb1dcff32fda02a4f +# Msg that produces a hash with leading zeros. Test created with BouncyCastle +Msg = FCABA2CF434AC8DCFCEC +X = 0x433cfd0532ccfd8cdd1b25920d2bb7396987b766240379035b0e86527ce9c52d +Nonce = 40f503abd70fd49a76c67a83e08b062b3fd465ad92be433c080e5f295bb9f559 +Signature = 21CA148CDF44BE4AE93B2F353B8E512D03AD96DAFA80623FDE4922A95F0327322913AFF8C187C277143A690BAA5DC4531D467D214F3DE3C1EDCCAC0F408CB91B + Msg = 3ccad0018519a898f87d8ce5f28c0d93ab16c51addf4173322cbc49d48ca9ea37ebe8bc9d8c1b3f783f8cf59cf3fcba10a393eb2ddd989ce258e73788ce74b0ce8223d24e993cfeafa49cc8ec1b8ecee017d83a11bb7034c779206c364ac463cfed3047e1a2bf5c591773b1d882b310bfba2db87893c89a5442c0845bf644e21 X = 0x306c1304b380b7c3e09e7a4b489c64a295582bb3e03ce526f13d7482ef8263f0 Nonce = 223e52fc516c0a79f55a5474321264fcce78c050cf79b3d9961b37e24d7f32d3 diff --git a/src/tests/data/pubkey/dsa_rfc6979.vec b/src/tests/data/pubkey/dsa_rfc6979.vec index a366e5574..d1651615b 100644 --- a/src/tests/data/pubkey/dsa_rfc6979.vec +++ b/src/tests/data/pubkey/dsa_rfc6979.vec @@ -85,3 +85,9 @@ Signature = 239E66DDBE8F8C230A3D071D601B6FFBDFB5901F94D444C6AF56F732BEB954BE6BD7 Hash = SHA-512 Signature = 89EC4BB1400ECCFF8E7D9AA515CD1DE7803F2DAFF09693EE7FD1353E90A68307C9F0BDABCC0D880BB137A994CC7F3980CE91CC10FAF529FC46565B15CEA854E1 + +# Msg that produces a hash with leading zeros. Test created with BouncyCastle +Msg = FCABA2CF434AC8DCFCEC + +Hash = SHA-1 +Signature = 98158AC13279EA8059872EBEEA4E5F334208FF361B2898667C151F8CC883E0728C333DB65612570200D7911EBF1C89C2932FB95399CB0CC533EC172B5CEAA08B
\ No newline at end of file diff --git a/src/tests/data/pubkey/ecdsa_prob.vec b/src/tests/data/pubkey/ecdsa_prob.vec index f400ccd33..17bea592e 100644 --- a/src/tests/data/pubkey/ecdsa_prob.vec +++ b/src/tests/data/pubkey/ecdsa_prob.vec @@ -973,3 +973,15 @@ Msg = dbd8ddc02771a5ff7359d5216536b2e524a2d0b6ff180fa29a41a8847b6f45f1b1d52344d3 X = 0x5da87be7af63fdaf40662bd2ba87597f54d7d52fae4b298308956cddbe5664f1e3c48cc6fd3c99291b0ce7a62a99a855 Nonce = 1b686b45a31b31f6de9ed5362e18a3f8c8feded3d3b251b134835843b7ae8ede57c61dc61a30993123ac7699de4b6eac Signature = 9dbfa147375767dde81b014f1e3bf579c44dd22486998a9b6f9e0920e53faa11eed29a4e2356e393afd1f5c1b060a958e4d318391f7cbfe70da78908d42db85225c85f4f2ff413ecad50aad5833abe91bdd5f6d64b0cd281398eab19452087dd + +# [P-384,SHA-1] + +Group = secp384r1 +Hash = SHA-1 + +# Msg that produces a hash with leading zeros. Test created with BouncyCastle +Msg = FCABA2CF434AC8DCFCEC + +X = 0xc602bc74a34592c311a6569661e0832c84f7207274676cc42a89f058162630184b52f0d99b855a7783c987476d7f9e6b +Nonce = c10b5c25c4683d0b7827d0d88697cdc0932496b5299b798c0dd1e7af6cc757ccb30fcd3d36ead4a804877e24f3a32443 +Signature = B11DB00CDAF53286D4483F38CD02785948477ED7EBC2AD609054551DA0AB0359978C61851788AA2EC3267946D440E8789ECD85E3F062E0713ACC8A1CD6FA22BB4C5F99868D6780C3CD4F91899513F09017E3AD4CFF7A08F35421C488E1E0A1D2 diff --git a/src/tests/data/pubkey/ecdsa_rfc6979.vec b/src/tests/data/pubkey/ecdsa_rfc6979.vec index a9fafadc6..3015ea3b8 100644 --- a/src/tests/data/pubkey/ecdsa_rfc6979.vec +++ b/src/tests/data/pubkey/ecdsa_rfc6979.vec @@ -161,6 +161,7 @@ Msg = 73616D706C65 Hash = SHA-1 Signature = 00343B6EC45728975EA5CBA6659BBB6062A5FF89EEA58BE3C80B619F322C87910FE092F7D45BB0F8EEE01ED3F20BABEC079D202AE677B243AB40B5431D497C55D75D00E7B0E675A9B24413D448B8CC119D2BF7B2D2DF032741C096634D6D65D0DBE3D5694625FB9E8104D3B842C1B0E2D0B98BEA19341E8676AEF66AE4EBA3D5475D5D16 + Hash = SHA-224 Signature = 01776331CFCDF927D666E032E00CF776187BC9FDD8E69D0DABB4109FFE1B5E2A30715F4CC923A4A5E94D2503E9ACFED92857B7F31D7152E0F8C00C15FF3D87E2ED2E0050CB5265417FE2320BBB5A122B8E1A32BD699089851128E360E620A30C7E17BA41A666AF126CE100E5799B153B60528D5300D08489CA9178FB610A2006C254B41F @@ -361,3 +362,13 @@ Signature = 0E1F2F0E298D5D281B69D211792C464D4AB540C1A998BAB13855C852C25BEF3D0C8C Hash = SHA-512 Signature = 0A818869A89433DB9E5838D6934FA7C15259250B8FE025DB3DC41036B120288A6DFB2464BF9062D035A6FBEC2B8B298A53F228DD7E8501BA479C008B060F0DEC + +# Msg that produces a hash with leading zeros. Test created with BouncyCastle + +Group = secp521r1 +X = 0x0FAD06DAA62BA3B25D2FB40133DA757205DE67F5BB0018FEE8C86E1B68C7E75CAA896EB32F1F47C70855836A6D16FCC1466F6D8FBEC67DB89EC0C08B0E996B83538 + +Msg = FCABA2CF434AC8DCFCEC + +Hash = SHA-1 +Signature = 19F10F75FA90A9129D596F3461829B3FE24DA8344C09CABA4F5BBEE36F246C356ED95C609E76D2B3B17480D45CBF11FAF395846BD3978657F8932345EE284ED32D11C07B02B74254F6F1C715D1A63B9FAA30E43C72645D20F30525EB88BB675C3BAEE1D20BAFA463F899253F5557033EDFC41F9748010FEDF73612774AC99A3B21082D
\ No newline at end of file diff --git a/src/tests/data/pubkey/rsa_sig.vec b/src/tests/data/pubkey/rsa_sig.vec index a5420fc33..18a9b55d4 100644 --- a/src/tests/data/pubkey/rsa_sig.vec +++ b/src/tests/data/pubkey/rsa_sig.vec @@ -7,6 +7,15 @@ Msg = 4161436445664768496A4B Signature = 3A3B7502D85F05128CFB74608205031339753DA50D0DB7E268C3951F04A1981EDE22613BFC38DB9FFEBE183A4F11B0B0F8D7BEB668F7C1C385A801C2DDD7C08CB2E56082F80AD1105E930ED96DB6A0309639A51F5379B682C7F75C601BD4ADE5 Padding = EMSA1(SHA-1) +E = 5 +P = 29325971601394553435876545177861015867159370596202565748032715224855053574888335295064118595233157878850644746476053 +Q = 36340726116985810749584556273749590346658800038386619768155308882211829358443758608966414537457415767576889158645019 + +# Msg that produces a hash with leading zeros. Test created with BouncyCastle +Msg = FCABA2CF434AC8DCFCEC +Signature = 39ED15BA0A0A5546A634A8D94CB9750FFB968C4DF184DA76B6ACDF89D8E0C37475E2DB053F75DF9AE3FB317B199E4ABAD3C9279EEAD5481C8F3B1B5EEBBE3A95137234AB8C6D04E9ECE72A20DC7759B1836F392B99F5F095A4591639B63B6999 + +Padding = EMSA1(SHA-1) E = 79 P = 12623509009920451943188704532558549088394176932350155718346677596667742587560163977859877379200333095446158075633025630956096613873547787137410366502605473 Q = 10058994615186918965498012083239602676614988922192055472853974106579876551963188584799215667527538830845937432743673569788902953125963992649722735254207979 |