From 2927eee6edbeb33b2512db2c6ea401fc50d842d2 Mon Sep 17 00:00:00 2001 From: bleichen Date: Mon, 29 Jul 2019 03:37:19 -0700 Subject: [PATCH] Adding a new test vector. https://github.com/google/tink/issues/224 So far I haven't been able to reproduce the bug. However, a lot of tests just check the signature verification. NOKEYCHECK=True PiperOrigin-RevId: 260466789 GitOrigin-RevId: bc252d53eaede4ec4eb89fef072dc5d19d17dbf5 --- testvectors/eddsa_test.json | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/testvectors/eddsa_test.json b/testvectors/eddsa_test.json index a01ee86..092be4b 100644 --- a/testvectors/eddsa_test.json +++ b/testvectors/eddsa_test.json @@ -1,7 +1,7 @@ { "algorithm" : "EDDSA", - "generatorVersion" : "0.7", - "numberOfTests" : 111, + "generatorVersion" : "0.8r8", + "numberOfTests" : 112, "header" : [ "Test vectors of type EddsaVerify are intended for testing", "the verification of Eddsa signatures." @@ -1271,6 +1271,35 @@ "flags" : [] } ] + }, + { + "jwk" : { + "crv" : "Ed25519", + "d" : "EvwxxA1aevceBUJGI7qXC2cM9uy0TNphICEOY3AkXds", + "kid" : "none", + "kty" : "OKP", + "x" : "A3tVtCfcjaoPgPzrrwhGkCMJ-KbPGLRlwM6bZTlimsg" + }, + "key" : { + "curve" : "edwards25519", + "keySize" : 255, + "pk" : "037b55b427dc8daa0f80fcebaf0846902309f8a6cf18b465c0ce9b6539629ac8", + "sk" : "12fc31c40d5a7af71e05424623ba970b670cf6ecb44cda6120210e6370245ddb", + "type" : "EDDSAKeyPair" + }, + "keyDer" : "302a300506032b6570032100037b55b427dc8daa0f80fcebaf0846902309f8a6cf18b465c0ce9b6539629ac8", + "keyPem" : "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAA3tVtCfcjaoPgPzrrwhGkCMJ+KbPGLRlwM6bZTlimsg=\n-----END PUBLIC KEY-----\n", + "type" : "EddsaVerify", + "tests" : [ + { + "tcId" : 112, + "comment" : "https://github.com/google/tink/issues/224", + "msg" : "01234567", + "sig" : "c964e100033ce8888b23466677da4f4aea29923f642ae508f9d0888d788150636ab9b2c3765e91bbb05153801114d9e52dc700df377212222bb766be4b8c020d", + "result" : "valid", + "flags" : [] + } + ] } ] }