Skip to content

Commit bcf9b44

Browse files
committed
Update Wycheproof ECDSA test vectors and fix workflow label
1 parent 5340d54 commit bcf9b44

21 files changed

Lines changed: 3691 additions & 11 deletions

.github/workflows/check-test-vectors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
if: steps.check_vectors.outputs.vectors_outdated == 'true'
4747
run: |
4848
previous_issue_number=$(gh issue list \
49-
--label "$LABELS" \
49+
--label 'vectors' \
5050
--json number \
5151
--jq '.[0].number')
5252
if [[ -n $previous_issue_number ]]; then

third_party/vectors/converted/wycheproof/testvectors_v1/ecdsa_secp224r1_sha224_test.txt

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3962,3 +3962,131 @@ result = invalid
39623962
sig = 303e021c2770403d42b7b45e553308d1f6a480640b61cac0ae36665d6f14d34e1f021d0085506b0404265ededf9a89fc7c9c7a55c16c5b0d781f774de8f46fa1
39633963
flags = InvalidEncoding
39643964

3965+
[publicKey.curve = secp224r1]
3966+
[publicKey.keySize = 224]
3967+
[publicKey.type = EcPublicKey]
3968+
[publicKey.uncompressed = 04da9971c869ce23030694138e95381868b3a5609507d6c796619357f4342c88a07164ff00ead6c178f0fdf06aec17ee4ccaa818e9273b3256]
3969+
[publicKey.wx = da9971c869ce23030694138e95381868b3a5609507d6c796619357f4]
3970+
[publicKey.wy = 342c88a07164ff00ead6c178f0fdf06aec17ee4ccaa818e9273b3256]
3971+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004da9971c869ce23030694138e95381868b3a5609507d6c796619357f4342c88a07164ff00ead6c178f0fdf06aec17ee4ccaa818e9273b3256]
3972+
[sha = SHA-224]
3973+
3974+
# tcId = 443
3975+
# r = 3, x = 3 is valid
3976+
msg = 68656c6c6f2c20776f726c64
3977+
result = valid
3978+
sig = 3022020103021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
3979+
flags = ValidSignature
3980+
3981+
[publicKey.curve = secp224r1]
3982+
[publicKey.keySize = 224]
3983+
[publicKey.type = EcPublicKey]
3984+
[publicKey.uncompressed = 04512997d74afa9f10ea167b4a817489fe72deb2c32a14bbf2724a9ccfb77f157044d957980c15384a4f821003a6920137d68608032298cec9]
3985+
[publicKey.wx = 512997d74afa9f10ea167b4a817489fe72deb2c32a14bbf2724a9ccf]
3986+
[publicKey.wy = b77f157044d957980c15384a4f821003a6920137d68608032298cec9]
3987+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004512997d74afa9f10ea167b4a817489fe72deb2c32a14bbf2724a9ccfb77f157044d957980c15384a4f821003a6920137d68608032298cec9]
3988+
[sha = SHA-224]
3989+
3990+
# tcId = 444
3991+
# r = 4, x = 3 is invalid
3992+
msg = 68656c6c6f2c20776f726c64
3993+
result = invalid
3994+
sig = 3022020104021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
3995+
flags = ArithmeticError
3996+
3997+
[publicKey.curve = secp224r1]
3998+
[publicKey.keySize = 224]
3999+
[publicKey.type = EcPublicKey]
4000+
[publicKey.uncompressed = 04da9971c869ce23030694138e95381868b3a5609507d6c796619357f4342c88a07164ff00ead6c178f0fdf06aec17ee4ccaa818e9273b3256]
4001+
[publicKey.wx = da9971c869ce23030694138e95381868b3a5609507d6c796619357f4]
4002+
[publicKey.wy = 342c88a07164ff00ead6c178f0fdf06aec17ee4ccaa818e9273b3256]
4003+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004da9971c869ce23030694138e95381868b3a5609507d6c796619357f4342c88a07164ff00ead6c178f0fdf06aec17ee4ccaa818e9273b3256]
4004+
[sha = SHA-224]
4005+
4006+
# tcId = 445
4007+
# r = 3 + n, x = 3 is invalid; r was not reduced mod n
4008+
msg = 68656c6c6f2c20776f726c64
4009+
result = invalid
4010+
sig = 303e021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a40021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4011+
flags = ArithmeticError
4012+
4013+
[publicKey.curve = secp224r1]
4014+
[publicKey.keySize = 224]
4015+
[publicKey.type = EcPublicKey]
4016+
[publicKey.uncompressed = 047f5c34474f9e98cebe214e0032c88e4ca51bb67b18b93bb2eb8215eeda5d7e5d963503ded471c7984e99f934e3db0bfec60b01f98b41076d]
4017+
[publicKey.wx = 7f5c34474f9e98cebe214e0032c88e4ca51bb67b18b93bb2eb8215ee]
4018+
[publicKey.wy = da5d7e5d963503ded471c7984e99f934e3db0bfec60b01f98b41076d]
4019+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a00047f5c34474f9e98cebe214e0032c88e4ca51bb67b18b93bb2eb8215eeda5d7e5d963503ded471c7984e99f934e3db0bfec60b01f98b41076d]
4020+
[sha = SHA-224]
4021+
4022+
# tcId = 446
4023+
# r = n - 2, x = n - 1 is invalid
4024+
msg = 68656c6c6f2c20776f726c64
4025+
result = invalid
4026+
sig = 303e021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3b021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4027+
flags = ArithmeticError
4028+
4029+
[publicKey.curve = secp224r1]
4030+
[publicKey.keySize = 224]
4031+
[publicKey.type = EcPublicKey]
4032+
[publicKey.uncompressed = 0427534656e4e23fa3dc4bd50d9f8efa9b3ff053d5c3d8c1156dd608181cbe1c97d482d9508dfc505cc3f95424212c60fd7c22d7761c748511]
4033+
[publicKey.wx = 27534656e4e23fa3dc4bd50d9f8efa9b3ff053d5c3d8c1156dd60818]
4034+
[publicKey.wy = 1cbe1c97d482d9508dfc505cc3f95424212c60fd7c22d7761c748511]
4035+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a000427534656e4e23fa3dc4bd50d9f8efa9b3ff053d5c3d8c1156dd608181cbe1c97d482d9508dfc505cc3f95424212c60fd7c22d7761c748511]
4036+
[sha = SHA-224]
4037+
4038+
# tcId = 447
4039+
# r = 3, x = n + 3 is the smallest possible x with a reduction
4040+
msg = 68656c6c6f2c20776f726c64
4041+
result = valid
4042+
sig = 3022020103021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4043+
flags = ValidSignature
4044+
4045+
[publicKey.curve = secp224r1]
4046+
[publicKey.keySize = 224]
4047+
[publicKey.type = EcPublicKey]
4048+
[publicKey.uncompressed = 047b4f2604b1ac9d7e308dac85ad346151068b015208280c730792d0da7841db039c5f4218999a66a7281be030740e2c7d794a22caf706b585]
4049+
[publicKey.wx = 7b4f2604b1ac9d7e308dac85ad346151068b015208280c730792d0da]
4050+
[publicKey.wy = 7841db039c5f4218999a66a7281be030740e2c7d794a22caf706b585]
4051+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a00047b4f2604b1ac9d7e308dac85ad346151068b015208280c730792d0da7841db039c5f4218999a66a7281be030740e2c7d794a22caf706b585]
4052+
[sha = SHA-224]
4053+
4054+
# tcId = 448
4055+
# r = 4, x = n + 3 is invalid
4056+
msg = 68656c6c6f2c20776f726c64
4057+
result = invalid
4058+
sig = 3022020104021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4059+
flags = ArithmeticError
4060+
4061+
[publicKey.curve = secp224r1]
4062+
[publicKey.keySize = 224]
4063+
[publicKey.type = EcPublicKey]
4064+
[publicKey.uncompressed = 047f499315b54561350be2dfb3ce86b94e6f85735d8e0ff9b5d69369447daf545bbaaf3016fc9360c79b778cad40eaccb52a44904cb3d78d89]
4065+
[publicKey.wx = 7f499315b54561350be2dfb3ce86b94e6f85735d8e0ff9b5d6936944]
4066+
[publicKey.wy = 7daf545bbaaf3016fc9360c79b778cad40eaccb52a44904cb3d78d89]
4067+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a00047f499315b54561350be2dfb3ce86b94e6f85735d8e0ff9b5d69369447daf545bbaaf3016fc9360c79b778cad40eaccb52a44904cb3d78d89]
4068+
[sha = SHA-224]
4069+
4070+
# tcId = 449
4071+
# r = p - n + 3, x = 3 is invalid; r is too large to compare r + n with x
4072+
msg = 68656c6c6f2c20776f726c64
4073+
result = invalid
4074+
sig = 3030020f00e95c1f470fc1ec22d6baa3a3d5c7021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4075+
flags = ArithmeticError
4076+
4077+
[publicKey.curve = secp224r1]
4078+
[publicKey.keySize = 224]
4079+
[publicKey.type = EcPublicKey]
4080+
[publicKey.uncompressed = 04c1fe4ad9b8da81070d4772a736821a5e9d343a36dc13fff49e9fe99e3a95acb5d2e8a2f58275ddf7ac02dbd9ab97b9d86a7afff59279913b]
4081+
[publicKey.wx = c1fe4ad9b8da81070d4772a736821a5e9d343a36dc13fff49e9fe99e]
4082+
[publicKey.wy = 3a95acb5d2e8a2f58275ddf7ac02dbd9ab97b9d86a7afff59279913b]
4083+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004c1fe4ad9b8da81070d4772a736821a5e9d343a36dc13fff49e9fe99e3a95acb5d2e8a2f58275ddf7ac02dbd9ab97b9d86a7afff59279913b]
4084+
[sha = SHA-224]
4085+
4086+
# tcId = 450
4087+
# r = 2^224 - n + 3, x = 3 is invalid; r + n is too large to compare r + n with x, and overflows 2^224 bits
4088+
msg = 68656c6c6f2c20776f726c64
4089+
result = invalid
4090+
sig = 3030020f00e95d1f470fc1ec22d6baa3a3d5c6021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4091+
flags = ArithmeticError
4092+

third_party/vectors/converted/wycheproof/testvectors_v1/ecdsa_secp224r1_sha256_test.txt

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4165,3 +4165,131 @@ result = invalid
41654165
sig = 303e021c0364e7d96832614a80216e730c353534d4bffd2c26649c0b4b0e26281f021d008f40064b412fe38c5ba9cf664e6172ed48e6e79f0fe5e31a54985dfc
41664166
flags = InvalidEncoding
41674167

4168+
[publicKey.curve = secp224r1]
4169+
[publicKey.keySize = 224]
4170+
[publicKey.type = EcPublicKey]
4171+
[publicKey.uncompressed = 04f43eeb550591547d6a6479726b72be181d4ea26dea5516ae1c0b0ab3e127deeb94536c67793ac172ba31f3a6f81efbbf2ab3d7868d0cc9f9]
4172+
[publicKey.wx = f43eeb550591547d6a6479726b72be181d4ea26dea5516ae1c0b0ab3]
4173+
[publicKey.wy = e127deeb94536c67793ac172ba31f3a6f81efbbf2ab3d7868d0cc9f9]
4174+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004f43eeb550591547d6a6479726b72be181d4ea26dea5516ae1c0b0ab3e127deeb94536c67793ac172ba31f3a6f81efbbf2ab3d7868d0cc9f9]
4175+
[sha = SHA-256]
4176+
4177+
# tcId = 472
4178+
# r = 3, x = 3 is valid
4179+
msg = 68656c6c6f2c20776f726c64
4180+
result = valid
4181+
sig = 3022020103021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4182+
flags = ValidSignature
4183+
4184+
[publicKey.curve = secp224r1]
4185+
[publicKey.keySize = 224]
4186+
[publicKey.type = EcPublicKey]
4187+
[publicKey.uncompressed = 04d46c2c988ac6b6a88213097a51ffbe400829cde78078403c3164480bf3e5c7ec0b798c6b16cc1c9733fc517b1e55f591a5ffef90a8beb80a]
4188+
[publicKey.wx = d46c2c988ac6b6a88213097a51ffbe400829cde78078403c3164480b]
4189+
[publicKey.wy = f3e5c7ec0b798c6b16cc1c9733fc517b1e55f591a5ffef90a8beb80a]
4190+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004d46c2c988ac6b6a88213097a51ffbe400829cde78078403c3164480bf3e5c7ec0b798c6b16cc1c9733fc517b1e55f591a5ffef90a8beb80a]
4191+
[sha = SHA-256]
4192+
4193+
# tcId = 473
4194+
# r = 4, x = 3 is invalid
4195+
msg = 68656c6c6f2c20776f726c64
4196+
result = invalid
4197+
sig = 3022020104021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4198+
flags = ArithmeticError
4199+
4200+
[publicKey.curve = secp224r1]
4201+
[publicKey.keySize = 224]
4202+
[publicKey.type = EcPublicKey]
4203+
[publicKey.uncompressed = 04f43eeb550591547d6a6479726b72be181d4ea26dea5516ae1c0b0ab3e127deeb94536c67793ac172ba31f3a6f81efbbf2ab3d7868d0cc9f9]
4204+
[publicKey.wx = f43eeb550591547d6a6479726b72be181d4ea26dea5516ae1c0b0ab3]
4205+
[publicKey.wy = e127deeb94536c67793ac172ba31f3a6f81efbbf2ab3d7868d0cc9f9]
4206+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004f43eeb550591547d6a6479726b72be181d4ea26dea5516ae1c0b0ab3e127deeb94536c67793ac172ba31f3a6f81efbbf2ab3d7868d0cc9f9]
4207+
[sha = SHA-256]
4208+
4209+
# tcId = 474
4210+
# r = 3 + n, x = 3 is invalid; r was not reduced mod n
4211+
msg = 68656c6c6f2c20776f726c64
4212+
result = invalid
4213+
sig = 303e021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a40021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4214+
flags = ArithmeticError
4215+
4216+
[publicKey.curve = secp224r1]
4217+
[publicKey.keySize = 224]
4218+
[publicKey.type = EcPublicKey]
4219+
[publicKey.uncompressed = 04404a7defdf659496eaab27a8cd1c2e06916235a966afe9a48c5fa8247b0d2b5d180d41433b5067e6ef4fe2f021f0802d130833ec0a13431e]
4220+
[publicKey.wx = 404a7defdf659496eaab27a8cd1c2e06916235a966afe9a48c5fa824]
4221+
[publicKey.wy = 7b0d2b5d180d41433b5067e6ef4fe2f021f0802d130833ec0a13431e]
4222+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004404a7defdf659496eaab27a8cd1c2e06916235a966afe9a48c5fa8247b0d2b5d180d41433b5067e6ef4fe2f021f0802d130833ec0a13431e]
4223+
[sha = SHA-256]
4224+
4225+
# tcId = 475
4226+
# r = n - 2, x = n - 1 is invalid
4227+
msg = 68656c6c6f2c20776f726c64
4228+
result = invalid
4229+
sig = 303e021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3b021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4230+
flags = ArithmeticError
4231+
4232+
[publicKey.curve = secp224r1]
4233+
[publicKey.keySize = 224]
4234+
[publicKey.type = EcPublicKey]
4235+
[publicKey.uncompressed = 04d7afcc97eefcf32becf100cf967588c68f9c149fa18344ac08e245b43b853f6c6d955587d9ac080c8f10bf355f9992a0103a27aa30dac7e8]
4236+
[publicKey.wx = d7afcc97eefcf32becf100cf967588c68f9c149fa18344ac08e245b4]
4237+
[publicKey.wy = 3b853f6c6d955587d9ac080c8f10bf355f9992a0103a27aa30dac7e8]
4238+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004d7afcc97eefcf32becf100cf967588c68f9c149fa18344ac08e245b43b853f6c6d955587d9ac080c8f10bf355f9992a0103a27aa30dac7e8]
4239+
[sha = SHA-256]
4240+
4241+
# tcId = 476
4242+
# r = 3, x = n + 3 is the smallest possible x with a reduction
4243+
msg = 68656c6c6f2c20776f726c64
4244+
result = valid
4245+
sig = 3022020103021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4246+
flags = ValidSignature
4247+
4248+
[publicKey.curve = secp224r1]
4249+
[publicKey.keySize = 224]
4250+
[publicKey.type = EcPublicKey]
4251+
[publicKey.uncompressed = 04624ed81d4901bcd1c4211d3763344569c4fda5247910f57da613382a460be585f9346719de51a63884e3a10967a054e938f96782da941159]
4252+
[publicKey.wx = 624ed81d4901bcd1c4211d3763344569c4fda5247910f57da613382a]
4253+
[publicKey.wy = 460be585f9346719de51a63884e3a10967a054e938f96782da941159]
4254+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004624ed81d4901bcd1c4211d3763344569c4fda5247910f57da613382a460be585f9346719de51a63884e3a10967a054e938f96782da941159]
4255+
[sha = SHA-256]
4256+
4257+
# tcId = 477
4258+
# r = 4, x = n + 3 is invalid
4259+
msg = 68656c6c6f2c20776f726c64
4260+
result = invalid
4261+
sig = 3022020104021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4262+
flags = ArithmeticError
4263+
4264+
[publicKey.curve = secp224r1]
4265+
[publicKey.keySize = 224]
4266+
[publicKey.type = EcPublicKey]
4267+
[publicKey.uncompressed = 04ef9169ef146a19c9a7220c6f25f597e7345e25fa1267712b9a20e30d454b19373a67ad81ca37ba8de9a96e881896df7160ba740f4c7373b9]
4268+
[publicKey.wx = ef9169ef146a19c9a7220c6f25f597e7345e25fa1267712b9a20e30d]
4269+
[publicKey.wy = 454b19373a67ad81ca37ba8de9a96e881896df7160ba740f4c7373b9]
4270+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004ef9169ef146a19c9a7220c6f25f597e7345e25fa1267712b9a20e30d454b19373a67ad81ca37ba8de9a96e881896df7160ba740f4c7373b9]
4271+
[sha = SHA-256]
4272+
4273+
# tcId = 478
4274+
# r = p - n + 3, x = 3 is invalid; r is too large to compare r + n with x
4275+
msg = 68656c6c6f2c20776f726c64
4276+
result = invalid
4277+
sig = 3030020f00e95c1f470fc1ec22d6baa3a3d5c7021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4278+
flags = ArithmeticError
4279+
4280+
[publicKey.curve = secp224r1]
4281+
[publicKey.keySize = 224]
4282+
[publicKey.type = EcPublicKey]
4283+
[publicKey.uncompressed = 04b6f15017406f16ebb6df8976aabb40f835f2cec1da165703aacaba40156f85ccc18f71c435ead14fcdceccff705be965f38049dcc2528867]
4284+
[publicKey.wx = b6f15017406f16ebb6df8976aabb40f835f2cec1da165703aacaba40]
4285+
[publicKey.wy = 156f85ccc18f71c435ead14fcdceccff705be965f38049dcc2528867]
4286+
[publicKeyDer = 304e301006072a8648ce3d020106052b81040021033a0004b6f15017406f16ebb6df8976aabb40f835f2cec1da165703aacaba40156f85ccc18f71c435ead14fcdceccff705be965f38049dcc2528867]
4287+
[sha = SHA-256]
4288+
4289+
# tcId = 479
4290+
# r = 2^224 - n + 3, x = 3 is invalid; r + n is too large to compare r + n with x, and overflows 2^224 bits
4291+
msg = 68656c6c6f2c20776f726c64
4292+
result = invalid
4293+
sig = 3030020f00e95d1f470fc1ec22d6baa3a3d5c6021d00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3a
4294+
flags = ArithmeticError
4295+

0 commit comments

Comments
 (0)