Skip to content

Commit 96c3fa0

Browse files
authored
Add ECDSA tests with non-minimally encoded DER tags (#161)
DER tags are typically one byte, but when the tag number exceeds 30, they are encoded in a multi-byte tag form. The tag number bits of the first byte is set to all ones (i.e. 31) and then the actual tag number is encoded in the big-endian base128 encoding. (See X.690 (02/2021) 8.1.2.4.) This encoding is only for larger tag numbers, so these should be rejected by an ECDSA signature verifier. This case was missing from the original Wycheproof tests. Although this is a general DER issue, it makes sense to test this specifically in ECDSA test vectors because ECDSA is deep in the crypto layer of libraries, and so it is not uncommon for this to be implemented with slightly different parsers than the rest of the system. These tests are tagged InvalidEncoding and not BerEncodedSignature because non-minimal integers is forbidden in BER too. X.690 (02/2021) 8.1.2 says that, for even BER, the single-octet encoding is the encoding for tags 0 to 30 and the multi-octet encoding is only for 31 and up. I've added the tests to both testvectors and testvectors_v1 since it was easy, though hopefully that situation will settle out soon.
1 parent 8fce005 commit 96c3fa0

File tree

75 files changed

+3825
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+3825
-75
lines changed

testvectors/ecdsa_brainpoolP224r1_sha224_test.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"algorithm" : "ECDSA",
3-
"numberOfTests" : 359,
3+
"numberOfTests" : 362,
44
"header" : [
55
"Test vectors of type EcdsaVerify are meant for the verification",
66
"of ASN encoded ECDSA signatures."
@@ -4587,6 +4587,56 @@
45874587
]
45884588
}
45894589
]
4590+
},
4591+
{
4592+
"type" : "EcdsaVerify",
4593+
"source" : {
4594+
"name" : "github/davidben/ecdsa-non-minimal-tag",
4595+
"version" : "0.1"
4596+
},
4597+
"key" : {
4598+
"curve" : "brainpoolP224r1",
4599+
"keySize" : 224,
4600+
"type" : "EcPublicKey",
4601+
"uncompressed" : "04572eab7376d052dfc40923db25342ea9cbfce4b8581e104a4c8f37c94a700ec5dc05a481b2b695320c6f1ad2dd8628633cdb75a91245c265",
4602+
"wx" : "572eab7376d052dfc40923db25342ea9cbfce4b8581e104a4c8f37c9",
4603+
"wy" : "4a700ec5dc05a481b2b695320c6f1ad2dd8628633cdb75a91245c265"
4604+
},
4605+
"keyDer" : "3052301406072a8648ce3d020106092b2403030208010105033a0004572eab7376d052dfc40923db25342ea9cbfce4b8581e104a4c8f37c94a700ec5dc05a481b2b695320c6f1ad2dd8628633cdb75a91245c265",
4606+
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMFIwFAYHKoZIzj0CAQYJKyQDAwIIAQEFAzoABFcuq3N20FLfxAkj2yU0LqnL/OS4\nWB4QSkyPN8lKcA7F3AWkgbK2lTIMbxrS3YYoYzzbdakSRcJl\n-----END PUBLIC KEY-----",
4607+
"sha" : "SHA-224",
4608+
"tests" : [
4609+
{
4610+
"tcId" : 360,
4611+
"comment" : "signature with non-minimal SEQUENCE tag",
4612+
"flags" : [
4613+
"InvalidEncoding"
4614+
],
4615+
"msg" : "313233343030",
4616+
"sig" : "3f103d021d00cb68ac9765c7641785df237e9951e1429581879af2631460048961d3021c139c78243a6e36e124d5f5e14b4cb8754abdf20ff1a501d5666a428f",
4617+
"result" : "invalid"
4618+
},
4619+
{
4620+
"tcId" : 361,
4621+
"comment" : "signature with non-minimal INTEGER tag on r",
4622+
"flags" : [
4623+
"InvalidEncoding"
4624+
],
4625+
"msg" : "313233343030",
4626+
"sig" : "303e1f021d00cb68ac9765c7641785df237e9951e1429581879af2631460048961d3021c139c78243a6e36e124d5f5e14b4cb8754abdf20ff1a501d5666a428f",
4627+
"result" : "invalid"
4628+
},
4629+
{
4630+
"tcId" : 362,
4631+
"comment" : "signature with non-minimal INTEGER tag on s",
4632+
"flags" : [
4633+
"InvalidEncoding"
4634+
],
4635+
"msg" : "313233343030",
4636+
"sig" : "303e021d00cb68ac9765c7641785df237e9951e1429581879af2631460048961d31f021c139c78243a6e36e124d5f5e14b4cb8754abdf20ff1a501d5666a428f",
4637+
"result" : "invalid"
4638+
}
4639+
]
45904640
}
45914641
]
45924642
}

testvectors/ecdsa_brainpoolP256r1_sha256_test.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"algorithm" : "ECDSA",
3-
"numberOfTests" : 389,
3+
"numberOfTests" : 392,
44
"header" : [
55
"Test vectors of type EcdsaVerify are meant for the verification",
66
"of ASN encoded ECDSA signatures."
@@ -4856,6 +4856,56 @@
48564856
]
48574857
}
48584858
]
4859+
},
4860+
{
4861+
"type" : "EcdsaVerify",
4862+
"source" : {
4863+
"name" : "github/davidben/ecdsa-non-minimal-tag",
4864+
"version" : "0.1"
4865+
},
4866+
"key" : {
4867+
"curve" : "brainpoolP256r1",
4868+
"keySize" : 256,
4869+
"type" : "EcPublicKey",
4870+
"uncompressed" : "04019a2d9637743a63ddaefdbca0ee229a163b809b9b145e5313bbeb8defeab9d6548caf89bf5ba49499404145651234336401b9b2843a579ed152e090f11b9e59",
4871+
"wx" : "019a2d9637743a63ddaefdbca0ee229a163b809b9b145e5313bbeb8defeab9d6",
4872+
"wy" : "548caf89bf5ba49499404145651234336401b9b2843a579ed152e090f11b9e59"
4873+
},
4874+
"keyDer" : "305a301406072a8648ce3d020106092b240303020801010703420004019a2d9637743a63ddaefdbca0ee229a163b809b9b145e5313bbeb8defeab9d6548caf89bf5ba49499404145651234336401b9b2843a579ed152e090f11b9e59",
4875+
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMFowFAYHKoZIzj0CAQYJKyQDAwIIAQEHA0IABAGaLZY3dDpj3a79vKDuIpoWO4Cb\nmxReUxO7643v6rnWVIyvib9bpJSZQEFFZRI0M2QBubKEOlee0VLgkPEbnlk=\n-----END PUBLIC KEY-----",
4876+
"sha" : "SHA-256",
4877+
"tests" : [
4878+
{
4879+
"tcId" : 390,
4880+
"comment" : "signature with non-minimal SEQUENCE tag",
4881+
"flags" : [
4882+
"InvalidEncoding"
4883+
],
4884+
"msg" : "313233343030",
4885+
"sig" : "3f104402200a5f8c70ba2d0842d5d0f841f160ad15195769a8159bfe692634d73d469d111f0220426e857aad3ff7aa96e4d200c03b45f1846a36d089ee3917768ca1a0d6d4da6e",
4886+
"result" : "invalid"
4887+
},
4888+
{
4889+
"tcId" : 391,
4890+
"comment" : "signature with non-minimal INTEGER tag on r",
4891+
"flags" : [
4892+
"InvalidEncoding"
4893+
],
4894+
"msg" : "313233343030",
4895+
"sig" : "30451f02200a5f8c70ba2d0842d5d0f841f160ad15195769a8159bfe692634d73d469d111f0220426e857aad3ff7aa96e4d200c03b45f1846a36d089ee3917768ca1a0d6d4da6e",
4896+
"result" : "invalid"
4897+
},
4898+
{
4899+
"tcId" : 392,
4900+
"comment" : "signature with non-minimal INTEGER tag on s",
4901+
"flags" : [
4902+
"InvalidEncoding"
4903+
],
4904+
"msg" : "313233343030",
4905+
"sig" : "304502200a5f8c70ba2d0842d5d0f841f160ad15195769a8159bfe692634d73d469d111f1f0220426e857aad3ff7aa96e4d200c03b45f1846a36d089ee3917768ca1a0d6d4da6e",
4906+
"result" : "invalid"
4907+
}
4908+
]
48594909
}
48604910
]
48614911
}

testvectors/ecdsa_brainpoolP320r1_sha384_test.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"algorithm" : "ECDSA",
3-
"numberOfTests" : 393,
3+
"numberOfTests" : 396,
44
"header" : [
55
"Test vectors of type EcdsaVerify are meant for the verification",
66
"of ASN encoded ECDSA signatures."
@@ -4720,6 +4720,56 @@
47204720
"flags" : []
47214721
}
47224722
]
4723+
},
4724+
{
4725+
"type" : "EcdsaVerify",
4726+
"source" : {
4727+
"name" : "github/davidben/ecdsa-non-minimal-tag",
4728+
"version" : "0.1"
4729+
},
4730+
"key" : {
4731+
"curve" : "brainpoolP320r1",
4732+
"keySize" : 320,
4733+
"type" : "EcPublicKey",
4734+
"uncompressed" : "040fcc8860cb26e262ca8b4ecb9c52f78d82a10a1d30dd0c8ecd7584ce80dbb75c488a062b643755001f27e676c26cd3488c1ef4ec3edd88cf8af78daf9036724b57e66da02cf7c676a53664becdfedc3b",
4735+
"wx" : "0fcc8860cb26e262ca8b4ecb9c52f78d82a10a1d30dd0c8ecd7584ce80dbb75c488a062b64375500",
4736+
"wy" : "1f27e676c26cd3488c1ef4ec3edd88cf8af78daf9036724b57e66da02cf7c676a53664becdfedc3b"
4737+
},
4738+
"keyDer" : "306a301406072a8648ce3d020106092b2403030208010109035200040fcc8860cb26e262ca8b4ecb9c52f78d82a10a1d30dd0c8ecd7584ce80dbb75c488a062b643755001f27e676c26cd3488c1ef4ec3edd88cf8af78daf9036724b57e66da02cf7c676a53664becdfedc3b",
4739+
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMGowFAYHKoZIzj0CAQYJKyQDAwIIAQEJA1IABA/MiGDLJuJiyotOy5xS942CoQod\nMN0Mjs11hM6A27dcSIoGK2Q3VQAfJ+Z2wmzTSIwe9Ow+3YjPiveNr5A2cktX5m2g\nLPfGdqU2ZL7N/tw7\n-----END PUBLIC KEY-----",
4740+
"sha" : "SHA-384",
4741+
"tests" : [
4742+
{
4743+
"tcId" : 394,
4744+
"comment" : "signature with non-minimal SEQUENCE tag",
4745+
"flags" : [
4746+
"InvalidEncoding"
4747+
],
4748+
"msg" : "313233343030",
4749+
"sig" : "3f105602290085b1bc586bf5407f9c8ec3765fe02bd19380998c45892ccd5081a1bd8872a26cdaf403e6dbf34a6e022900833d6661b0576d61a80ffe4d3271c43b2a56c14b3bd90305923ccdcf7b3d988c07ebb1c4cc67381c",
4750+
"result" : "invalid"
4751+
},
4752+
{
4753+
"tcId" : 395,
4754+
"comment" : "signature with non-minimal INTEGER tag on r",
4755+
"flags" : [
4756+
"InvalidEncoding"
4757+
],
4758+
"msg" : "313233343030",
4759+
"sig" : "30571f02290085b1bc586bf5407f9c8ec3765fe02bd19380998c45892ccd5081a1bd8872a26cdaf403e6dbf34a6e022900833d6661b0576d61a80ffe4d3271c43b2a56c14b3bd90305923ccdcf7b3d988c07ebb1c4cc67381c",
4760+
"result" : "invalid"
4761+
},
4762+
{
4763+
"tcId" : 396,
4764+
"comment" : "signature with non-minimal INTEGER tag on s",
4765+
"flags" : [
4766+
"InvalidEncoding"
4767+
],
4768+
"msg" : "313233343030",
4769+
"sig" : "305702290085b1bc586bf5407f9c8ec3765fe02bd19380998c45892ccd5081a1bd8872a26cdaf403e6dbf34a6e1f022900833d6661b0576d61a80ffe4d3271c43b2a56c14b3bd90305923ccdcf7b3d988c07ebb1c4cc67381c",
4770+
"result" : "invalid"
4771+
}
4772+
]
47234773
}
47244774
]
47254775
}

testvectors/ecdsa_brainpoolP384r1_sha384_test.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"algorithm" : "ECDSA",
3-
"numberOfTests" : 420,
3+
"numberOfTests" : 423,
44
"header" : [
55
"Test vectors of type EcdsaVerify are meant for the verification",
66
"of ASN encoded ECDSA signatures."
@@ -5130,6 +5130,56 @@
51305130
]
51315131
}
51325132
]
5133+
},
5134+
{
5135+
"type" : "EcdsaVerify",
5136+
"source" : {
5137+
"name" : "github/davidben/ecdsa-non-minimal-tag",
5138+
"version" : "0.1"
5139+
},
5140+
"key" : {
5141+
"curve" : "brainpoolP384r1",
5142+
"keySize" : 384,
5143+
"type" : "EcPublicKey",
5144+
"uncompressed" : "04192ed5ce547d2336911d3f6cecba227f08df077f6242a9147a914e854e6e32d325fd23ccc42921dc4a7e4c2eb71defd3631e69079ba982e7a1cad0a39eff47fc6d6e3a280d081286b624886ba1f3069671ec1a29986d84fb79736d2799e6fc21",
5145+
"wx" : "192ed5ce547d2336911d3f6cecba227f08df077f6242a9147a914e854e6e32d325fd23ccc42921dc4a7e4c2eb71defd3",
5146+
"wy" : "631e69079ba982e7a1cad0a39eff47fc6d6e3a280d081286b624886ba1f3069671ec1a29986d84fb79736d2799e6fc21"
5147+
},
5148+
"keyDer" : "307a301406072a8648ce3d020106092b240303020801010b03620004192ed5ce547d2336911d3f6cecba227f08df077f6242a9147a914e854e6e32d325fd23ccc42921dc4a7e4c2eb71defd3631e69079ba982e7a1cad0a39eff47fc6d6e3a280d081286b624886ba1f3069671ec1a29986d84fb79736d2799e6fc21",
5149+
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMHowFAYHKoZIzj0CAQYJKyQDAwIIAQELA2IABBku1c5UfSM2kR0/bOy6In8I3wd/\nYkKpFHqRToVObjLTJf0jzMQpIdxKfkwutx3v02MeaQebqYLnocrQo57/R/xtbjoo\nDQgShrYkiGuh8waWcewaKZhthPt5c20nmeb8IQ==\n-----END PUBLIC KEY-----",
5150+
"sha" : "SHA-384",
5151+
"tests" : [
5152+
{
5153+
"tcId" : 421,
5154+
"comment" : "signature with non-minimal SEQUENCE tag",
5155+
"flags" : [
5156+
"InvalidEncoding"
5157+
],
5158+
"msg" : "313233343030",
5159+
"sig" : "3f106502300e8e114a1c351405560bf8d47b166bfe957087a8003b353433b6144f7ee7d6f79c8dd14ef229fa7a2f2782bf33708b9102310083aa7ba485dc060df9922f9ccc5da29adb75d44671d18bad0636d2e09c5e2f95e892a79b9fd3b37e1f798b157b567a24",
5160+
"result" : "invalid"
5161+
},
5162+
{
5163+
"tcId" : 422,
5164+
"comment" : "signature with non-minimal INTEGER tag on r",
5165+
"flags" : [
5166+
"InvalidEncoding"
5167+
],
5168+
"msg" : "313233343030",
5169+
"sig" : "30661f02300e8e114a1c351405560bf8d47b166bfe957087a8003b353433b6144f7ee7d6f79c8dd14ef229fa7a2f2782bf33708b9102310083aa7ba485dc060df9922f9ccc5da29adb75d44671d18bad0636d2e09c5e2f95e892a79b9fd3b37e1f798b157b567a24",
5170+
"result" : "invalid"
5171+
},
5172+
{
5173+
"tcId" : 423,
5174+
"comment" : "signature with non-minimal INTEGER tag on s",
5175+
"flags" : [
5176+
"InvalidEncoding"
5177+
],
5178+
"msg" : "313233343030",
5179+
"sig" : "306602300e8e114a1c351405560bf8d47b166bfe957087a8003b353433b6144f7ee7d6f79c8dd14ef229fa7a2f2782bf33708b911f02310083aa7ba485dc060df9922f9ccc5da29adb75d44671d18bad0636d2e09c5e2f95e892a79b9fd3b37e1f798b157b567a24",
5180+
"result" : "invalid"
5181+
}
5182+
]
51335183
}
51345184
]
51355185
}

testvectors/ecdsa_brainpoolP512r1_sha512_test.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"algorithm" : "ECDSA",
3-
"numberOfTests" : 462,
3+
"numberOfTests" : 465,
44
"header" : [
55
"Test vectors of type EcdsaVerify are meant for the verification",
66
"of ASN encoded ECDSA signatures."
@@ -5498,6 +5498,56 @@
54985498
]
54995499
}
55005500
]
5501+
},
5502+
{
5503+
"type" : "EcdsaVerify",
5504+
"source" : {
5505+
"name" : "github/davidben/ecdsa-non-minimal-tag",
5506+
"version" : "0.1"
5507+
},
5508+
"key" : {
5509+
"curve" : "brainpoolP512r1",
5510+
"keySize" : 512,
5511+
"type" : "EcPublicKey",
5512+
"uncompressed" : "0467cea1bedf84cbdcba69a05bb2ce3a2d1c9d911d236c480929a16ad697b45a6ca127079fe8d7868671e28ef33bdf9319e2e51c84b190ac5c91b51baf0a980ba500a7e79006194b5378f65cbe625ef2c47c64e56040d873b995b5b1ebaa4a6ce971da164391ff619af3bcfc71c5e1ad27ee0e859c2943e2de8ef7c43d3c976e9b",
5513+
"wx" : "67cea1bedf84cbdcba69a05bb2ce3a2d1c9d911d236c480929a16ad697b45a6ca127079fe8d7868671e28ef33bdf9319e2e51c84b190ac5c91b51baf0a980ba5",
5514+
"wy" : "00a7e79006194b5378f65cbe625ef2c47c64e56040d873b995b5b1ebaa4a6ce971da164391ff619af3bcfc71c5e1ad27ee0e859c2943e2de8ef7c43d3c976e9b"
5515+
},
5516+
"keyDer" : "30819b301406072a8648ce3d020106092b240303020801010d038182000467cea1bedf84cbdcba69a05bb2ce3a2d1c9d911d236c480929a16ad697b45a6ca127079fe8d7868671e28ef33bdf9319e2e51c84b190ac5c91b51baf0a980ba500a7e79006194b5378f65cbe625ef2c47c64e56040d873b995b5b1ebaa4a6ce971da164391ff619af3bcfc71c5e1ad27ee0e859c2943e2de8ef7c43d3c976e9b",
5517+
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMIGbMBQGByqGSM49AgEGCSskAwMCCAEBDQOBggAEZ86hvt+Ey9y6aaBbss46LRyd\nkR0jbEgJKaFq1pe0WmyhJwef6NeGhnHijvM735MZ4uUchLGQrFyRtRuvCpgLpQCn\n55AGGUtTePZcvmJe8sR8ZOVgQNhzuZW1seuqSmzpcdoWQ5H/YZrzvPxxxeGtJ+4O\nhZwpQ+LejvfEPTyXbps=\n-----END PUBLIC KEY-----",
5518+
"sha" : "SHA-512",
5519+
"tests" : [
5520+
{
5521+
"tcId" : 463,
5522+
"comment" : "signature with non-minimal SEQUENCE tag",
5523+
"flags" : [
5524+
"InvalidEncoding"
5525+
],
5526+
"msg" : "313233343030",
5527+
"sig" : "3f10818402400bd2593447cc6c02caf99d60418dd42e9a194c910e6755ed0c7059acac656b04ccfe1e8348462ee43066823aee2fed7ca012e9890dfb69866d7ae88b6506f9c7024044b42304e693796618d090dbcb2a2551c3cb78534611e61fd9d1a5c0938b5b8ec6ed53d2d28999eabbd8e7792d167fcf582492403a6a0f7cc94c73a28fb76b71",
5528+
"result" : "invalid"
5529+
},
5530+
{
5531+
"tcId" : 464,
5532+
"comment" : "signature with non-minimal INTEGER tag on r",
5533+
"flags" : [
5534+
"InvalidEncoding"
5535+
],
5536+
"msg" : "313233343030",
5537+
"sig" : "3081851f02400bd2593447cc6c02caf99d60418dd42e9a194c910e6755ed0c7059acac656b04ccfe1e8348462ee43066823aee2fed7ca012e9890dfb69866d7ae88b6506f9c7024044b42304e693796618d090dbcb2a2551c3cb78534611e61fd9d1a5c0938b5b8ec6ed53d2d28999eabbd8e7792d167fcf582492403a6a0f7cc94c73a28fb76b71",
5538+
"result" : "invalid"
5539+
},
5540+
{
5541+
"tcId" : 465,
5542+
"comment" : "signature with non-minimal INTEGER tag on s",
5543+
"flags" : [
5544+
"InvalidEncoding"
5545+
],
5546+
"msg" : "313233343030",
5547+
"sig" : "30818502400bd2593447cc6c02caf99d60418dd42e9a194c910e6755ed0c7059acac656b04ccfe1e8348462ee43066823aee2fed7ca012e9890dfb69866d7ae88b6506f9c71f024044b42304e693796618d090dbcb2a2551c3cb78534611e61fd9d1a5c0938b5b8ec6ed53d2d28999eabbd8e7792d167fcf582492403a6a0f7cc94c73a28fb76b71",
5548+
"result" : "invalid"
5549+
}
5550+
]
55015551
}
55025552
]
55035553
}

testvectors/ecdsa_secp160k1_sha256_test.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"algorithm" : "ECDSA",
3-
"numberOfTests" : 365,
3+
"numberOfTests" : 368,
44
"header" : [
55
"Test vectors of type EcdsaVerify are meant for the verification",
66
"of ASN encoded ECDSA signatures."
@@ -4416,6 +4416,56 @@
44164416
"flags" : []
44174417
}
44184418
]
4419+
},
4420+
{
4421+
"type" : "EcdsaVerify",
4422+
"source" : {
4423+
"name" : "github/davidben/ecdsa-non-minimal-tag",
4424+
"version" : "0.1"
4425+
},
4426+
"key" : {
4427+
"curve" : "secp160k1",
4428+
"keySize" : 160,
4429+
"type" : "EcPublicKey",
4430+
"uncompressed" : "04be74d8dd1d5654265384f74227ab0f8534b5a4fe2ab8e5bfeff929794d8dd9c2e3be40e6cf49ad49",
4431+
"wx" : "00be74d8dd1d5654265384f74227ab0f8534b5a4fe",
4432+
"wy" : "2ab8e5bfeff929794d8dd9c2e3be40e6cf49ad49"
4433+
},
4434+
"keyDer" : "303e301006072a8648ce3d020106052b81040009032a0004be74d8dd1d5654265384f74227ab0f8534b5a4fe2ab8e5bfeff929794d8dd9c2e3be40e6cf49ad49",
4435+
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMD4wEAYHKoZIzj0CAQYFK4EEAAkDKgAEvnTY3R1WVCZThPdCJ6sPhTS1pP4quOW/\n7/kpeU2N2cLjvkDmz0mtSQ==\n-----END PUBLIC KEY-----\n",
4436+
"sha" : "SHA-256",
4437+
"tests" : [
4438+
{
4439+
"tcId" : 366,
4440+
"comment" : "signature with non-minimal SEQUENCE tag",
4441+
"flags" : [
4442+
"InvalidEncoding"
4443+
],
4444+
"msg" : "313233343030",
4445+
"sig" : "3f102e021500a89cf5aa14f3e5d8a02f7021c6d0291e7154df23021500e0348c201105978ee3ab9c565cf9a63261a58173",
4446+
"result" : "invalid"
4447+
},
4448+
{
4449+
"tcId" : 367,
4450+
"comment" : "signature with non-minimal INTEGER tag on r",
4451+
"flags" : [
4452+
"InvalidEncoding"
4453+
],
4454+
"msg" : "313233343030",
4455+
"sig" : "302f1f021500a89cf5aa14f3e5d8a02f7021c6d0291e7154df23021500e0348c201105978ee3ab9c565cf9a63261a58173",
4456+
"result" : "invalid"
4457+
},
4458+
{
4459+
"tcId" : 368,
4460+
"comment" : "signature with non-minimal INTEGER tag on s",
4461+
"flags" : [
4462+
"InvalidEncoding"
4463+
],
4464+
"msg" : "313233343030",
4465+
"sig" : "302f021500a89cf5aa14f3e5d8a02f7021c6d0291e7154df231f021500e0348c201105978ee3ab9c565cf9a63261a58173",
4466+
"result" : "invalid"
4467+
}
4468+
]
44194469
}
44204470
]
44214471
}

0 commit comments

Comments
 (0)