Update tests. Update wycheproof from v0.8 to v0.9
This commit is contained in:
parent
8beb922ded
commit
6ea40d9dab
@ -15,6 +15,10 @@ import { pallas, vesta } from '../esm/pasta.js';
|
||||
import { bn254 } from '../esm/bn.js';
|
||||
import { jubjub } from '../esm/jubjub.js';
|
||||
import { bls12_381 } from '../esm/bls12-381.js';
|
||||
import { default as wyche_curves } from './wycheproof/ec_prime_order_curves_test.json' assert { type: 'json' };
|
||||
import { createCurve } from '../esm/_shortw_utils.js';
|
||||
import { Field } from '../esm/abstract/modular.js';
|
||||
import { sha256 } from '@noble/hashes/sha256';
|
||||
|
||||
// Fields tests
|
||||
const FIELDS = {
|
||||
@ -742,6 +746,54 @@ should('bigInt private keys', () => {
|
||||
secp256k1.sign('', 123n);
|
||||
});
|
||||
|
||||
describe('wycheproof curve creation', () => {
|
||||
const VECTORS = wyche_curves.testGroups[0].tests;
|
||||
for (const v of VECTORS) {
|
||||
should(`${v.name}`, () => {
|
||||
const CURVE = createCurve(
|
||||
{
|
||||
Fp: Field(BigInt(`0x${v.p}`)),
|
||||
a: BigInt(`0x${v.a}`),
|
||||
b: BigInt(`0x${v.b}`),
|
||||
n: BigInt(`0x${v.n}`),
|
||||
h: BigInt(v.h),
|
||||
Gx: BigInt(`0x${v.gx}`),
|
||||
Gy: BigInt(`0x${v.gy}`),
|
||||
},
|
||||
sha256
|
||||
);
|
||||
});
|
||||
const CURVE = CURVES[v.name];
|
||||
if (!CURVE) continue;
|
||||
should(`${v.name} parms verify`, () => {
|
||||
deepStrictEqual(CURVE.CURVE.Fp.ORDER, BigInt(`0x${v.p}`));
|
||||
deepStrictEqual(CURVE.CURVE.a, BigInt(`0x${v.a}`));
|
||||
deepStrictEqual(CURVE.CURVE.b, BigInt(`0x${v.b}`));
|
||||
deepStrictEqual(CURVE.CURVE.n, BigInt(`0x${v.n}`));
|
||||
deepStrictEqual(CURVE.CURVE.Gx, BigInt(`0x${v.gx}`));
|
||||
deepStrictEqual(CURVE.CURVE.Gy, BigInt(`0x${v.gy}`));
|
||||
deepStrictEqual(CURVE.CURVE.h, BigInt(v.h));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
should('validate generator point is on curve', () => {
|
||||
throws(() =>
|
||||
createCurve(
|
||||
{
|
||||
Fp: Field(BigInt(`0x00c302f41d932a36cda7a3463093d18db78fce476de1a86297`)),
|
||||
a: BigInt(`0x00c302f41d932a36cda7a3463093d18db78fce476de1a86294`),
|
||||
b: BigInt(`0x13d56ffaec78681e68f9deb43b35bec2fb68542e27897b79`),
|
||||
n: BigInt(`0x00c302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1`),
|
||||
h: BigInt(1),
|
||||
Gx: BigInt(`0x3ae9e58c82f63c30282e1fe7bbf43fa72c446af6f4618129`),
|
||||
Gy: BigInt(`0x097e2c5667c2223a902ab5ca449d0084b7e5b3de7ccc01c8`), // last 9 -> 8
|
||||
},
|
||||
sha256
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
// ESM is broken.
|
||||
import url from 'url';
|
||||
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
|
||||
|
@ -970,7 +970,7 @@ describe('pairing', () => {
|
||||
});
|
||||
});
|
||||
// hashToCurve
|
||||
describe('hash-to-curve', () => {
|
||||
describe('hash-to-curve (against Killic)', () => {
|
||||
// Point G1
|
||||
const VECTORS_G1 = [
|
||||
{
|
||||
@ -1000,16 +1000,17 @@ describe('hash-to-curve', () => {
|
||||
'047a85d6898416a0899e26219bca7c4f0fa682717199de196b02b95eaf9fb55456ac3b810e78571a1b7f5692b7c58ab6',
|
||||
},
|
||||
];
|
||||
for (let i = 0; i < VECTORS_G1.length; i++) {
|
||||
const t = VECTORS_G1[i];
|
||||
should(`G1 Killic (${i})`, () => {
|
||||
const p = bls.G1.hashToCurve(t.msg, {
|
||||
DST: 'BLS12381G1_XMD:SHA-256_SSWU_RO_TESTGEN',
|
||||
describe('hashToCurve G1', () => {
|
||||
for (let i = 0; i < VECTORS_G1.length; i++) {
|
||||
const t = VECTORS_G1[i];
|
||||
should(`${i}`, () => {
|
||||
const p = bls.G1.hashToCurve(t.msg, {
|
||||
DST: 'BLS12381G1_XMD:SHA-256_SSWU_RO_TESTGEN',
|
||||
});
|
||||
deepStrictEqual(p.toHex(false), t.expected);
|
||||
});
|
||||
deepStrictEqual(p.toHex(false), t.expected);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
const VECTORS_ENCODE_G1 = [
|
||||
{
|
||||
msg: utf8ToBytes(''),
|
||||
@ -1038,15 +1039,17 @@ describe('hash-to-curve', () => {
|
||||
'094bfdfe3e552447433b5a00967498a3f1314b86ce7a7164c8a8f4131f99333b30a574607e301d5f774172c627fd0bca',
|
||||
},
|
||||
];
|
||||
for (let i = 0; i < VECTORS_ENCODE_G1.length; i++) {
|
||||
const t = VECTORS_ENCODE_G1[i];
|
||||
should(`hashToCurve/G1 (Killic, encodeToCurve) (${i})`, () => {
|
||||
const p = bls.G1.encodeToCurve(t.msg, {
|
||||
DST: 'BLS12381G1_XMD:SHA-256_SSWU_NU_TESTGEN',
|
||||
describe('encodeToCurve G1', () => {
|
||||
for (let i = 0; i < VECTORS_ENCODE_G1.length; i++) {
|
||||
const t = VECTORS_ENCODE_G1[i];
|
||||
should(`(${i})`, () => {
|
||||
const p = bls.G1.encodeToCurve(t.msg, {
|
||||
DST: 'BLS12381G1_XMD:SHA-256_SSWU_NU_TESTGEN',
|
||||
});
|
||||
deepStrictEqual(p.toHex(false), t.expected);
|
||||
});
|
||||
deepStrictEqual(p.toHex(false), t.expected);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
// Point G2
|
||||
const VECTORS_G2 = [
|
||||
{
|
||||
@ -1084,16 +1087,17 @@ describe('hash-to-curve', () => {
|
||||
'15c1d4f1a685bb63ee67ca1fd96155e3d091e852a684b78d085fd34f6091e5249ddddbdcf2e7ec82ce6c04c63647eeb7',
|
||||
},
|
||||
];
|
||||
for (let i = 0; i < VECTORS_G2.length; i++) {
|
||||
const t = VECTORS_G2[i];
|
||||
should(`hashToCurve/G2 Killic (${i})`, () => {
|
||||
const p = bls.G2.hashToCurve(t.msg, {
|
||||
DST: 'BLS12381G2_XMD:SHA-256_SSWU_RO_TESTGEN',
|
||||
describe('hashToCurve G2', () => {
|
||||
for (let i = 0; i < VECTORS_G2.length; i++) {
|
||||
const t = VECTORS_G2[i];
|
||||
should(`${i}`, () => {
|
||||
const p = bls.G2.hashToCurve(t.msg, {
|
||||
DST: 'BLS12381G2_XMD:SHA-256_SSWU_RO_TESTGEN',
|
||||
});
|
||||
deepStrictEqual(p.toHex(false), t.expected);
|
||||
});
|
||||
deepStrictEqual(p.toHex(false), t.expected);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
const VECTORS_ENCODE_G2 = [
|
||||
{
|
||||
msg: utf8ToBytes(''),
|
||||
@ -1130,15 +1134,17 @@ describe('hash-to-curve', () => {
|
||||
'09e5c8242dd7281ad32c03fe4af3f19167770016255fb25ad9b67ec51d62fade31a1af101e8f6172ec2ee8857662be3a',
|
||||
},
|
||||
];
|
||||
for (let i = 0; i < VECTORS_ENCODE_G2.length; i++) {
|
||||
const t = VECTORS_ENCODE_G2[i];
|
||||
should(`hashToCurve/G2 (Killic, encodeToCurve) (${i})`, () => {
|
||||
const p = bls.G2.encodeToCurve(t.msg, {
|
||||
DST: 'BLS12381G2_XMD:SHA-256_SSWU_NU_TESTGEN',
|
||||
describe('encodeToCurve G2', () => {
|
||||
for (let i = 0; i < VECTORS_ENCODE_G2.length; i++) {
|
||||
const t = VECTORS_ENCODE_G2[i];
|
||||
should(`${i}`, () => {
|
||||
const p = bls.G2.encodeToCurve(t.msg, {
|
||||
DST: 'BLS12381G2_XMD:SHA-256_SSWU_NU_TESTGEN',
|
||||
});
|
||||
deepStrictEqual(p.toHex(false), t.expected);
|
||||
});
|
||||
deepStrictEqual(p.toHex(false), t.expected);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('verify()', () => {
|
||||
|
@ -1,15 +1,11 @@
|
||||
import { sha512 } from '@noble/hashes/sha512';
|
||||
import { hexToBytes, bytesToHex, randomBytes } from '@noble/hashes/utils';
|
||||
import { deepStrictEqual, strictEqual, throws } from 'assert';
|
||||
import { hexToBytes, bytesToHex as hex } from '@noble/hashes/utils';
|
||||
import { deepStrictEqual, throws } from 'assert';
|
||||
import { describe, should } from 'micro-should';
|
||||
import { bytesToNumberLE, numberToBytesLE } from '../esm/abstract/utils.js';
|
||||
import { default as x25519vectors } from './wycheproof/x25519_test.json' assert { type: 'json' };
|
||||
import { ed25519ctx, ed25519ph, RistrettoPoint, x25519 } from '../esm/ed25519.js';
|
||||
|
||||
// const ed = ed25519;
|
||||
const hex = bytesToHex;
|
||||
// const Point = ed.ExtendedPoint;
|
||||
|
||||
const VECTORS_RFC8032_CTX = [
|
||||
{
|
||||
secretKey: '0305334e381af78f141cb666f6199f57bc3495335a256a95bd2a55bf546663f6',
|
||||
|
@ -4,7 +4,10 @@ import { bytesToHex, concatBytes, hexToBytes, randomBytes } from '@noble/hashes/
|
||||
import * as fc from 'fast-check';
|
||||
import { describe, should } from 'micro-should';
|
||||
import { ed25519, ED25519_TORSION_SUBGROUP, numberToBytesLE } from './ed25519.helpers.js';
|
||||
import { default as ed25519vectors } from './wycheproof/eddsa_test.json' assert { type: 'json' };
|
||||
// Old vectors allow to test sign() because they include private key
|
||||
import { default as ed25519vectors_OLD } from './ed25519/ed25519_test_OLD.json' assert { type: 'json' };
|
||||
import { default as ed25519vectors } from './wycheproof/ed25519_test.json' assert { type: 'json' };
|
||||
|
||||
import { default as zip215 } from './ed25519/zip215.json' assert { type: 'json' };
|
||||
|
||||
describe('ed25519', () => {
|
||||
@ -348,9 +351,9 @@ describe('ed25519', () => {
|
||||
// );
|
||||
// });
|
||||
|
||||
should(`wycheproof/ED25519`, () => {
|
||||
for (let g = 0; g < ed25519vectors.testGroups.length; g++) {
|
||||
const group = ed25519vectors.testGroups[g];
|
||||
should(`wycheproof/ED25519 (OLD)`, () => {
|
||||
for (let g = 0; g < ed25519vectors_OLD.testGroups.length; g++) {
|
||||
const group = ed25519vectors_OLD.testGroups[g];
|
||||
const key = group.key;
|
||||
deepStrictEqual(hex(ed.getPublicKey(key.sk)), key.pk, `(${g}, public)`);
|
||||
for (let i = 0; i < group.tests.length; i++) {
|
||||
@ -372,6 +375,28 @@ describe('ed25519', () => {
|
||||
}
|
||||
});
|
||||
|
||||
should(`wycheproof/ED25519`, () => {
|
||||
for (let g = 0; g < ed25519vectors.testGroups.length; g++) {
|
||||
const group = ed25519vectors.testGroups[g];
|
||||
const key = group.publicKey;
|
||||
for (let i = 0; i < group.tests.length; i++) {
|
||||
const v = group.tests[i];
|
||||
const comment = `(${g}/${i}, ${v.result}): ${v.comment}`;
|
||||
if (v.result === 'valid' || v.result === 'acceptable') {
|
||||
deepStrictEqual(ed.verify(v.sig, v.msg, key.pk), true, comment);
|
||||
} else if (v.result === 'invalid') {
|
||||
let failed = false;
|
||||
try {
|
||||
failed = !ed.verify(v.sig, v.msg, key.pk);
|
||||
} catch (error) {
|
||||
failed = true;
|
||||
}
|
||||
deepStrictEqual(failed, true, comment);
|
||||
} else throw new Error('unknown test result');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
should('not mutate inputs', () => {
|
||||
const message = new Uint8Array([12, 12, 12]);
|
||||
const signature = ed.sign(message, to32Bytes(1n));
|
||||
|
@ -4,6 +4,8 @@ import * as fc from 'fast-check';
|
||||
import { ed448, ed448ph, x448 } from '../esm/ed448.js';
|
||||
import { bytesToHex, concatBytes, hexToBytes, randomBytes } from '@noble/hashes/utils';
|
||||
import { numberToBytesLE } from '../esm/abstract/utils.js';
|
||||
// Old vectors allow to test sign() because they include private key
|
||||
import { default as ed448vectorsOld } from './ed448/ed448_test_OLD.json' assert { type: 'json' };
|
||||
import { default as ed448vectors } from './wycheproof/ed448_test.json' assert { type: 'json' };
|
||||
import { default as x448vectors } from './wycheproof/x448_test.json' assert { type: 'json' };
|
||||
|
||||
@ -439,9 +441,9 @@ describe('ed448', () => {
|
||||
}
|
||||
});
|
||||
|
||||
describe('wycheproof', () => {
|
||||
for (let g = 0; g < ed448vectors.testGroups.length; g++) {
|
||||
const group = ed448vectors.testGroups[g];
|
||||
describe('wycheproof (OLD)', () => {
|
||||
for (let g = 0; g < ed448vectorsOld.testGroups.length; g++) {
|
||||
const group = ed448vectorsOld.testGroups[g];
|
||||
const key = group.key;
|
||||
should(`ED448(${g}, public)`, () => {
|
||||
deepStrictEqual(hex(ed.getPublicKey(key.sk)), key.pk);
|
||||
@ -467,6 +469,29 @@ describe('ed448', () => {
|
||||
}
|
||||
});
|
||||
|
||||
describe('wycheproof', () => {
|
||||
for (let g = 0; g < ed448vectors.testGroups.length; g++) {
|
||||
const group = ed448vectors.testGroups[g];
|
||||
const key = group.publicKey;
|
||||
should(`ED448`, () => {
|
||||
for (let i = 0; i < group.tests.length; i++) {
|
||||
const v = group.tests[i];
|
||||
const index = `${g}/${i} ${v.comment}`;
|
||||
if (v.result === 'valid' || v.result === 'acceptable') {
|
||||
deepStrictEqual(ed.verify(v.sig, v.msg, key.pk), true, index);
|
||||
} else if (v.result === 'invalid') {
|
||||
let failed = false;
|
||||
try {
|
||||
failed = !ed.verify(v.sig, v.msg, key.pk);
|
||||
} catch (error) {
|
||||
failed = true;
|
||||
}
|
||||
deepStrictEqual(failed, true, index);
|
||||
} else throw new Error('unknown test result');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// should('X448: should convert base point to montgomery using fromPoint', () => {
|
||||
// deepStrictEqual(
|
||||
// hex(ed.montgomeryCurve.UfromPoint(Point.BASE)),
|
||||
|
908
test/ed448/ed448_test_OLD.json
Normal file
908
test/ed448/ed448_test_OLD.json
Normal file
@ -0,0 +1,908 @@
|
||||
{
|
||||
"algorithm" : "EDDSA",
|
||||
"generatorVersion" : "0.8r12",
|
||||
"numberOfTests" : 86,
|
||||
"header" : [
|
||||
"Test vectors of type EddsaVerify are intended for testing",
|
||||
"the verification of Eddsa signatures."
|
||||
],
|
||||
"notes" : {
|
||||
"SignatureMalleability" : "EdDSA signatures are non-malleable, if implemented accordingly. Failing to check the range of S allows to modify signatures. See RFC 8032, Section 5.2.7 and Section 8.4."
|
||||
},
|
||||
"schema" : "eddsa_verify_schema.json",
|
||||
"testGroups" : [
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "iDAeB2UY01N_kwLuD1Ij5LY-HwFgB9PC69_sX3CZfoEZxrrQrnuAP0h5HKjsVJqiobhi96UVkLnV",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "QZYQpTSvEn9YOwSBjNt_D_MAsCXy4BaCvK4z_Wkc7gOVEd8M3caQ7peEJuizjlDOWvfc-6UPcEwA"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "419610a534af127f583b04818cdb7f0ff300b025f2e01682bcae33fd691cee039511df0cddc690ee978426e8b38e50ce5af7dcfba50f704c00",
|
||||
"sk" : "88301e076518d3537f9302ee0f5223e4b63e1f016007d3c2ebdfec5f70997e8119c6bad0ae7b803f48791ca8ec549aa2a1b862f7a51590b9d5",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a00419610a534af127f583b04818cdb7f0ff300b025f2e01682bcae33fd691cee039511df0cddc690ee978426e8b38e50ce5af7dcfba50f704c00",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoAQZYQpTSvEn9YOwSBjNt/D/MAsCXy4BaCvK4z/Wkc7gOVEd8M3caQ7peEJuizjlDOWvfc+6UPcEwA\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 1,
|
||||
"comment" : "",
|
||||
"msg" : "",
|
||||
"sig" : "cf7953007666e12f73af9ec92e3e018da5ee5a8d5b17f5100a354c58f1d5f4bb37ab835c52f72374c72d612689149cf6d36a70db6dc5a6c400b597348e0e31e51e65bb144e63c892a367b4c055c036aa6cd7e728cdd2a098963bda863903e6dd025b5a5d891209f4e28537694804e50b0800",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 2,
|
||||
"comment" : "",
|
||||
"msg" : "78",
|
||||
"sig" : "c56e94d5c9ca860c244f33db556bf6b3cec38b024b77604a35d6a07211b1316b9a027133c374b86f72665cc45ce01583a2e0f2775c6172da801acef168717cab1196cddfb149359dfef589756257cc2d6b02fc516d8d41b4adaa3f11428f41410ef0dc3c1b008d3d052173d4389508ed0100",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 3,
|
||||
"comment" : "",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd982600",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 4,
|
||||
"comment" : "",
|
||||
"msg" : "48656c6c6f",
|
||||
"sig" : "442e33780f199dd7bc71d1335f74df7f3a0ec789e21a175c1bffddb6e50091998d969ac8194b3acefb7702f6c222f84f7eeca3b80406f1fe80687915e7925bf52deb47b6b779e26d30eec7c5fef03580f280a089eefd0bacc9fbbb6a4d73a591d1671d192e6bbcfdb79ad3db5673a1263000",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 5,
|
||||
"comment" : "",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff28060a05236fc9c1682b0e55b60a082c9a57bffe61ef4dda5ce65df539805122b3a09a05976d41ad68ab52df85428152c57da93531e5d16920e00",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 6,
|
||||
"comment" : "",
|
||||
"msg" : "000000000000000000000000",
|
||||
"sig" : "a8ca64d1ab00eae77fd2854d8422db3ae12fca91c14f274f30a44df98590786ec4cbb96a9564fc1b9b16c22d2bd00aa65f0876323729f5ac809fb0b89a4d3f27afbabb596851d835173d60ea34e0875359f3d6adb13cef1395b7eaa5f9147583ff38b4deb183062874915bf194ae61072300",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 7,
|
||||
"comment" : "",
|
||||
"msg" : "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161",
|
||||
"sig" : "b205d3e24ccef64c1e86f15f48ddfa682453503489475188b04a8f55860b3c8a9c01e6de820bb7d9b15daff8de25a4a870e987157a115ec1802da0d0606da12842ea7eab658b5eea6dd1f3a641a5174425578003cd318b8d6b8dcb4de954b5078d1912c578ad8281515d6df3672b94173f00",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 8,
|
||||
"comment" : "",
|
||||
"msg" : "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f60",
|
||||
"sig" : "3492ef66e5fdf1503e9e206c5c2f0d4b7891aad793575527d2251e0df1b97c2feac188bc382ce3c92c4bc36ba2695f32bedadd480eaa932300d0db1f9a9c60844d2ea5aea64933c7be46c4f9d21cb48b39eae23d08496de7ce9501197185cc5d4ff8aa4b018ce7ad321f6a7d778c4a070400",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 9,
|
||||
"comment" : "",
|
||||
"msg" : "ffffffffffffffffffffffffffffffff",
|
||||
"sig" : "545e1905af1b5886552eaf78e17304c6f83fcfb3444df2d1ea056486db615e3bb29131bb0c1fd295364dc515dae581967148eb23c6c9012e806d3623baff00548c648e3cb3756aaaaf659f2fb7dd2e71c7611448593ca63f2a98913ab7f182e6820eaf1334e2745e0e7bc0dccab98de71600",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 10,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 11,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 12,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f24458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 13,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 14,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 15,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 16,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 17,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f24458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 18,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 19,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 20,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "f34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 21,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "f34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 22,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "f34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3ff24458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 23,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "f34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3ff34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 24,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "f34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 25,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 26,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 27,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffff24458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 28,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffff34458ab92c27823558fc58d72c26c219036d6ae49db4ec4e923ca7cffffffffffffffffffffffffffffffffffffffffffffffffffffff3f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 29,
|
||||
"comment" : "special values for r and s",
|
||||
"msg" : "3f",
|
||||
"sig" : "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 30,
|
||||
"comment" : "empty signature",
|
||||
"msg" : "54657374",
|
||||
"sig" : "",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 31,
|
||||
"comment" : "s missing",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f280",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 32,
|
||||
"comment" : "signature too short",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd98",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 33,
|
||||
"comment" : "signature too long",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd9826002020",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 34,
|
||||
"comment" : "include pk in signature",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd982600419610a534af127f583b04818cdb7f0ff300b025f2e01682bcae33fd691cee039511df0cddc690ee978426e8b38e50ce5af7dcfba50f704c00",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 35,
|
||||
"comment" : "prepending 0 byte to signature",
|
||||
"msg" : "54657374",
|
||||
"sig" : "005d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd982600",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 36,
|
||||
"comment" : "prepending 0 byte to s",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f2800031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd982600",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 37,
|
||||
"comment" : "appending 0 byte to signature",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd98260000",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 38,
|
||||
"comment" : "removing 0 byte from signature",
|
||||
"msg" : "5465737430",
|
||||
"sig" : "dbd6384516ab6b0eb2d609414564ec217383b66040dfb0676128251ae24c1d7c179c21a9ee307dc13f8fe6550bc40187f093da85617bcf5d009d3ee8b798ad978b6e683bc4e911940ea82ea0b7e95dc24fe0b29e44663211892c2aaa3451379d22c289b94378f11fb700f1689d4a00d73e",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 39,
|
||||
"comment" : "removing 0 byte from signature",
|
||||
"msg" : "546573743535",
|
||||
"sig" : "ce2b2fff0bf445a36813cf2a76e0cc5619a4f16ee53f0fe3cd46fc0414db7248b32fbda54bbb37e708d6238076ea12bf850b964b044520bb80fbaf0e1d1ed3bcab261462df5e7f2de73ac9cbae26dfa29015039acf90575961fc9b91b9ca276dae7d5fa805bd202c5579a0f4c66e801400",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 40,
|
||||
"comment" : "dropping byte from signature",
|
||||
"msg" : "546573743633",
|
||||
"sig" : "c283ed36d78c275a5d02f7939aed2c4ef68320ae1bf6fc25e834b758046a6d52a480216a942dfe771f3bd307f4ce7d3f446e0824961bd5de80cda42b5cc38e6ec3d53f386978b9877d3c98a28ac8fc66630ffd178933a18de1aee23cab5011c9ff4c9277311b4c6c33acb8e82b8c693c00",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 41,
|
||||
"comment" : "removing leading 0 byte from signature",
|
||||
"msg" : "54657374333631",
|
||||
"sig" : "62e629bd2b8f595df401c362c766216d45de89fceecd99c69d323b5c53ad5ac3ea7224963feba2f2895551d94f548248ef8597d2a959f880d59934a5e8f07847834d66ba1a6b09de5dba692172b13f768f0c29e8196144c130d2353445d63cbd0b690794fdad30a48e8bb7cc2504f80700",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 42,
|
||||
"comment" : "modified bit 0 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5cb94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280afc33a525116cc12e0d1c3a1fde6de518a6544f360d0fe18d5be7770b057a2bf792db4b7648fa84a6eaecae909e33fa59c5dfe4804ba2623",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 43,
|
||||
"comment" : "modified bit 1 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5fb94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280f91386c3e9dd9e7c9af7ca6bbef8b7a44ae3d68eeade449d7dfbb31de8419eb943e2ecbcdd06df5227e82b9ded519a56e70f0a1c0fc17b06",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 44,
|
||||
"comment" : "modified bit 2 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "59b94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280f1aab07b4ad069dfafc01b4532e1e44cbf7177e1bdda197fc87434046db5b935afd9114ac5e1138eaead23c3b59dba9026d2da4a86fe800b",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 45,
|
||||
"comment" : "modified bit 7 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "ddb94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2807668402b7b093fc754019324077c1f842a7d2e35adf7b87094115cec459ad5419e162988ef42b1988d9b944d9d5a7ce09c6f342afa500839",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 46,
|
||||
"comment" : "modified bit 8 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db84c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280279b70338586b9e13e669191cc0dfc2a937d50a6118758de04a4ca41f4877abdb971afa87fe4b83bc243b8dfd2cb368aa389a4cb11e83e31",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 47,
|
||||
"comment" : "modified bit 16 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94d53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280c7b847556b3a6f9447483899ab730a23004c695054dd57b1c3214fa87f632f39c8ff1471f0532b8eee4154930e1ca30d574b8f9e85b0432b",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 48,
|
||||
"comment" : "modified bit 31 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94cd3101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2800b017917472b130a1cc1c8e995a252617d5ddaf1f3d48930b4876fa0d2cfedec90a8c85c8274892a1ca3b6cfce63ebfebc307210b844ae0c",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 49,
|
||||
"comment" : "modified bit 32 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53111f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2805f38f6371860fcc4f2ec515afd35cb05d8941e2448cc469a15b8537e758b16d46b123581613462c2bb20d8a07299ab795d0998e1e4277931",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 50,
|
||||
"comment" : "modified bit 63 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f529f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff28017111ba6fefd45e2490f1d53a184007fa073470706d7f4a9606fcad2954e74c32116ba7701d225b76e55164e64df3245c1031f0df734bd31",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 51,
|
||||
"comment" : "modified bit 64 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6d1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2808d7d0aa1fd81d0e31789921771c654338f96f0b557b615e3da55670271608a0e022e4e8cf393e309f8f6412281b6147e7fce42b089eb1e0c",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 52,
|
||||
"comment" : "modified bit 97 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ca4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280b08d3be6ebf4e60bf6d74e105ea2fa9b965c62816bbd22ea3bb0c1acfd12300523ca76f94b6f789488a957fbeb212d713baccf95fd594f3d",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 53,
|
||||
"comment" : "modified bit 127 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7606fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280a23f54857e9b0f72b2ef90d2768834590464d75933ed08c454faa762b3702a2b631c33c339d05b2e24c20a8214f99af31f93f80f416a1129",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 54,
|
||||
"comment" : "modified bit 240 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0881a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280734bdc399273d3403d934ceaae16e87a68c6bff6b77d8037ff41c97922498a58e704c29ab519d41bab70735f71fc26f589361e2b21754300",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 55,
|
||||
"comment" : "modified bit 247 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0800a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280ba961cc8d0765c99d57470ee1c0c77f0a562a198fd0175eddb0c033e0fb8525328c5e2c516e2b00f73609c7f769195eb1a02ff54090d781f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 56,
|
||||
"comment" : "modified bit 248 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a97b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280e72685907da9e5a64e4142ed02fc0c6bf95763201db5942aac055fa87e6fdd32e483fd21ed4110d5d7ef619b740fef2ad8a71fe821e42a2a",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 57,
|
||||
"comment" : "modified bit 253 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880887b8e55858df4cf2291a7303ffda446b82a117b4dd408cff280500646d67c74f13471f0ad034da530f7238fe7897e532af8ec2977643a410b1d054934df567e170276389e66b3f3ccb3c15aed239d04f72b",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 58,
|
||||
"comment" : "modified bit 254 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880e87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2807bb153b8e350aa736a91c921217578539600c1299ab76522ef8f6902d79c93f274073ee6beafe6200ecaf59f7cd11bb1c833f24bf30ed52d",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 59,
|
||||
"comment" : "modified bit 255 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880287b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2804a67b22be599d6433b87ea961c82c457ab50f64ac6b7efb0b2f90988927f83742303c278f8248e02d5679b41ed505aba0fb51110d0def810",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 60,
|
||||
"comment" : "modified bit 440 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff3807f452efb0cd97dab5506028b7b876830dee02a9c0cbd140dcde509638d4d546c30856b2151bdf79930df5bbb11f2beb66bcdc25ad75f2116",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 61,
|
||||
"comment" : "modified bit 441 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff0808d78231bb3c9a87c5b8d168fe05f8197503a3d73a6d700f436b5a76ab866388baa6930191a077aca7970058932c88b7f9e6ecb13c89dcd1d",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 62,
|
||||
"comment" : "modified bit 447 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cf72809e5a8406063fb3545f0fb627f841b2e3a85ad5d378018e8b58fe58e14ee5520d57abc9140e9c5a75a8b09ac3334dd0cad69b48771284321d",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 63,
|
||||
"comment" : "modified bit 448 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2811adf92201088e051ee48b57aecf46edfc68e5baeed5ae4910ba5681d370f75ab593811e18293ef0808581c254196bcbf2b4c454136a6711b",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 64,
|
||||
"comment" : "modified bit 449 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2825e06c3999e8308be439c40940b0075d3e4f65147c1608cbe6e9c432e33bed6686f9393ae2568f0ad60febcb4b6179c0d90d034e7c3c46810",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 65,
|
||||
"comment" : "modified bit 454 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2c02456bbd141df048dbf1843be6d5fef402483314c2af547b361a09f3319489eaede43404df9faf634c1298d678b5261c808b0be3726013e39",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 66,
|
||||
"comment" : "modified bit 455 in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "5db94c53101f521f6c1f43b60ea4d7e06fbd49c2e8afaf4fcc289e645e0880a87b8e55858df4cf2291a7303ffda446b82a117b4dd408cff2007106d2a896a7fec6dee53eea272d9b6e738c340295416b50f39a9463a5635450b9f93c4c06737affd42ae06cee5879c96c0bd58a91345503",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 67,
|
||||
"comment" : "R==0",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027ab98ab862e4e7ec3361a45ac1993e9b47d9ac40db91faed752399cee0413122b47346594fd7d2c8949b43e4cabaf17d8339ea0e307023f",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 68,
|
||||
"comment" : "invalid R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd11bae33a0999fd3fd2bed6fa5577685e8fd595e79c006e58fd35f69f91b1d853553fb4006019a07725aa37773883dbe12253812887ac828",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 69,
|
||||
"comment" : "all bits flipped in R",
|
||||
"msg" : "313233343030",
|
||||
"sig" : "a246b3acefe0ade093e0bc49f15b281f9042b63d175050b033d7619ba1f77f578471aa7a720b30dd6e58cfc0025bb947d5ee84b22bf7300d7f334e48141af0fade1469f5dedb851c9e725d27bd65012bada05e70cde641aad9ce0bea4983164f73816b6f13095e6b93eb03e850cad0cf0d",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 70,
|
||||
"comment" : "checking malleability ",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f280241bd6142ddb02c0f9fa133955d3e610b4b27cb814227de8b241ef4e86402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd9866",
|
||||
"result" : "invalid",
|
||||
"flags" : [
|
||||
"SignatureMalleability"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tcId" : 71,
|
||||
"comment" : "checking malleability ",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28017602ec0bf9d7be34e8ad9c6c795533244e952675efdcbac9c65b9cb85402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd98a6",
|
||||
"result" : "invalid",
|
||||
"flags" : [
|
||||
"SignatureMalleability"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tcId" : 72,
|
||||
"comment" : "checking malleability ",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f280fde9de16e5226d2af9a864e2ac1a2d756456ffc4f1b3693570ad4dc584402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd9826",
|
||||
"result" : "invalid",
|
||||
"flags" : [
|
||||
"SignatureMalleability"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tcId" : 73,
|
||||
"comment" : "checking malleability ",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f280c9fd3fc42f2d50b84de67a197724e0faa43058801821a546173d76b882402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd9826",
|
||||
"result" : "invalid",
|
||||
"flags" : [
|
||||
"SignatureMalleability"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tcId" : 74,
|
||||
"comment" : "checking malleability ",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd9866",
|
||||
"result" : "invalid",
|
||||
"flags" : [
|
||||
"SignatureMalleability"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tcId" : 75,
|
||||
"comment" : "checking malleability ",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd98a6",
|
||||
"result" : "invalid",
|
||||
"flags" : [
|
||||
"SignatureMalleability"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tcId" : 76,
|
||||
"comment" : "checking malleability ",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28031d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d286402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd9826",
|
||||
"result" : "invalid",
|
||||
"flags" : [
|
||||
"SignatureMalleability"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tcId" : 77,
|
||||
"comment" : "checking malleability ",
|
||||
"msg" : "54657374",
|
||||
"sig" : "5d053ff5b71f6ec3284525d35d77933178c8e19879886d08eccc6c7d27e9e5b5e02537dbc4d4723506e8d171fc1733857573dd02d18f48f28030d67d699a188a9ca46b4eabe2107aef237ca609cb462e24c91d25d285402b6ef7862b78a386950246ff38d6d2f458136d12e3c97fdd9826",
|
||||
"result" : "invalid",
|
||||
"flags" : [
|
||||
"SignatureMalleability"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "bIKlYsuAjRDWMr6JyFE-v2ySnzTd-oyfY8mWDvbjSKNSjIo_zC8ETjmj_FuUSS-PAy51SaIAmPlb",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "X9dEm1m0Yf0s54fsYWrUah2hNCSFpw4fig6nXYDpZ3jt8SR2m0bHBhvWeD3x5Q9s0foavq_oJWGA"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "5fd7449b59b461fd2ce787ec616ad46a1da1342485a70e1f8a0ea75d80e96778edf124769b46c7061bd6783df1e50f6cd1fa1abeafe8256180",
|
||||
"sk" : "6c82a562cb808d10d632be89c8513ebf6c929f34ddfa8c9f63c9960ef6e348a3528c8a3fcc2f044e39a3fc5b94492f8f032e7549a20098f95b",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a005fd7449b59b461fd2ce787ec616ad46a1da1342485a70e1f8a0ea75d80e96778edf124769b46c7061bd6783df1e50f6cd1fa1abeafe8256180",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoAX9dEm1m0Yf0s54fsYWrUah2hNCSFpw4fig6nXYDpZ3jt8SR2m0bHBhvWeD3x5Q9s0foavq/oJWGA\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 78,
|
||||
"comment" : "RFC 8032",
|
||||
"msg" : "",
|
||||
"sig" : "533a37f6bbe457251f023c0d88f976ae2dfb504a843e34d2074fd823d41a591f2b233f034f628281f2fd7a22ddd47d7828c59bd0a21bfd3980ff0d2028d4b18a9df63e006c5d1c2d345b925d8dc00b4104852db99ac5c7cdda8530a113a0f4dbb61149f05a7363268c71d95808ff2e652600",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "xOqwXTVwB8Yy89u0hImSTVUrCP4MNToNSh8ArNosRjr76mfF6NKHfF47w5emWZSe-AIelU4KEidO",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "Q7oo9DDN_0Vq5TFUX37NCsg0pV2TWMA3K_oMbGeYwIZq6gHrAHQoArhDjqTLghacI1FgYntMOpSA"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "43ba28f430cdff456ae531545f7ecd0ac834a55d9358c0372bfa0c6c6798c0866aea01eb00742802b8438ea4cb82169c235160627b4c3a9480",
|
||||
"sk" : "c4eab05d357007c632f3dbb48489924d552b08fe0c353a0d4a1f00acda2c463afbea67c5e8d2877c5e3bc397a659949ef8021e954e0a12274e",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a0043ba28f430cdff456ae531545f7ecd0ac834a55d9358c0372bfa0c6c6798c0866aea01eb00742802b8438ea4cb82169c235160627b4c3a9480",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoAQ7oo9DDN/0Vq5TFUX37NCsg0pV2TWMA3K/oMbGeYwIZq6gHrAHQoArhDjqTLghacI1FgYntMOpSA\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 79,
|
||||
"comment" : "RFC 8032: 1 octet",
|
||||
"msg" : "03",
|
||||
"sig" : "26b8f91727bd62897af15e41eb43c377efb9c610d48f2335cb0bd0087810f4352541b143c4b981b7e18f62de8ccdf633fc1bf037ab7cd779805e0dbcc0aae1cbcee1afb2e027df36bc04dcecbf154336c19f0af7e0a6472905e799f1953d2a0ff3348ab21aa4adafd1d234441cf807c03a00",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
},
|
||||
{
|
||||
"tcId" : 80,
|
||||
"comment" : "RFC 8032: 1 octet with context",
|
||||
"msg" : "03",
|
||||
"sig" : "d4f8f6131770dd46f40867d6fd5d5055de43541f8c5e35abbcd001b32a89f7d2151f7647f11d8ca2ae279fb842d607217fce6e042f6815ea000c85741de5c8da1144a6a1aba7f96de42505d7a7298524fda538fccbbb754f578c1cad10d54d0d5428407e85dcbc98a49155c13764e66c3c00",
|
||||
"result" : "invalid",
|
||||
"flags" : []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "zSPST3FCdOdENDI3uTKQ9RH2Ql-Y5kRZ_yA-iYUIP_32BQBVOrwOBc0CGEvbicTM1n4YeVEmfrMo",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "3OqeePNaG_NJmoMbELhskKrAHNhLZ6AQm1WjbpMoseNl_OFh1xznExpUPqTLX36fHYsAaWRHABQA"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "dcea9e78f35a1bf3499a831b10b86c90aac01cd84b67a0109b55a36e9328b1e365fce161d71ce7131a543ea4cb5f7e9f1d8b00696447001400",
|
||||
"sk" : "cd23d24f714274e744343237b93290f511f6425f98e64459ff203e8985083ffdf60500553abc0e05cd02184bdb89c4ccd67e187951267eb328",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a00dcea9e78f35a1bf3499a831b10b86c90aac01cd84b67a0109b55a36e9328b1e365fce161d71ce7131a543ea4cb5f7e9f1d8b00696447001400",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoA3OqeePNaG/NJmoMbELhskKrAHNhLZ6AQm1WjbpMoseNl/OFh1xznExpUPqTLX36fHYsAaWRHABQA\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 81,
|
||||
"comment" : "RFC 8032: 11 bytes",
|
||||
"msg" : "0c3e544074ec63b0265e0c",
|
||||
"sig" : "1f0a8888ce25e8d458a21130879b840a9089d999aaba039eaf3e3afa090a09d389dba82c4ff2ae8ac5cdfb7c55e94d5d961a29fe0109941e00b8dbdeea6d3b051068df7254c0cdc129cbe62db2dc957dbb47b51fd3f213fb8698f064774250a5028961c9bf8ffd973fe5d5c206492b140e00",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "JYzdStoy7Zyf9U5jdWrlgvuPqyrHIfLI5nanJ2hRPZOfY93bVWCRM_Ka34bsmSncy1LBxf0v9-Ib",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "O6FtoMbyzB8wGHdAdW9eeY1rxfwBXXxjzJUQ7j_UStwk2OlotuRub5TRm5RTYXJr114UnvCYF_WA"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "3ba16da0c6f2cc1f30187740756f5e798d6bc5fc015d7c63cc9510ee3fd44adc24d8e968b6e46e6f94d19b945361726bd75e149ef09817f580",
|
||||
"sk" : "258cdd4ada32ed9c9ff54e63756ae582fb8fab2ac721f2c8e676a72768513d939f63dddb55609133f29adf86ec9929dccb52c1c5fd2ff7e21b",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a003ba16da0c6f2cc1f30187740756f5e798d6bc5fc015d7c63cc9510ee3fd44adc24d8e968b6e46e6f94d19b945361726bd75e149ef09817f580",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoAO6FtoMbyzB8wGHdAdW9eeY1rxfwBXXxjzJUQ7j/UStwk2OlotuRub5TRm5RTYXJr114UnvCYF/WA\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 82,
|
||||
"comment" : "RFC 8032: 12 bytes",
|
||||
"msg" : "64a65f3cdedcdd66811e2915",
|
||||
"sig" : "7eeeab7c4e50fb799b418ee5e3197ff6bf15d43a14c34389b59dd1a7b1b85b4ae90438aca634bea45e3a2695f1270f07fdcdf7c62b8efeaf00b45c2c96ba457eb1a8bf075a3db28e5c24f6b923ed4ad747c3c9e03c7079efb87cb110d3a99861e72003cbae6d6b8b827e4e6c143064ff3c00",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "fvToRUQjZ1L7tWuPMaI6EOQoFPX1XKA3zcwRxkyaOylJwbtgcAMUYRcypsL-qY7rwCZqEak5cBAO",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "s9oHmwqkk6V3ICnwRnuuvuWoES2dOiJTI2HaKU97s4FcXcWeF2tNnzgcoJOOE8bAexdL5l36V46A"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "b3da079b0aa493a5772029f0467baebee5a8112d9d3a22532361da294f7bb3815c5dc59e176b4d9f381ca0938e13c6c07b174be65dfa578e80",
|
||||
"sk" : "7ef4e84544236752fbb56b8f31a23a10e42814f5f55ca037cdcc11c64c9a3b2949c1bb60700314611732a6c2fea98eebc0266a11a93970100e",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a00b3da079b0aa493a5772029f0467baebee5a8112d9d3a22532361da294f7bb3815c5dc59e176b4d9f381ca0938e13c6c07b174be65dfa578e80",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoAs9oHmwqkk6V3ICnwRnuuvuWoES2dOiJTI2HaKU97s4FcXcWeF2tNnzgcoJOOE8bAexdL5l36V46A\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 83,
|
||||
"comment" : "RFC 8032: 13 bytes",
|
||||
"msg" : "64a65f3cdedcdd66811e2915e7",
|
||||
"sig" : "6a12066f55331b6c22acd5d5bfc5d71228fbda80ae8dec26bdd306743c5027cb4890810c162c027468675ecf645a83176c0d7323a2ccde2d80efe5a1268e8aca1d6fbc194d3f77c44986eb4ab4177919ad8bec33eb47bbb5fc6e28196fd1caf56b4e7e0ba5519234d047155ac727a1053100",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "1l3zQa0T4AhWdoi67dqOnc3BfcAkl06ltCJ7ZTDjOb_yH5nmjKaWjzzKbf4PufT6tPoTXVVC6j8B",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "35cF9Y7bq4Asf4Njz-VWCrHGEywgqfHdFjSDom-KxTo51oCL9KHfvSYbCZuwOz-1CQbLKL2KCB8A"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "df9705f58edbab802c7f8363cfe5560ab1c6132c20a9f1dd163483a26f8ac53a39d6808bf4a1dfbd261b099bb03b3fb50906cb28bd8a081f00",
|
||||
"sk" : "d65df341ad13e008567688baedda8e9dcdc17dc024974ea5b4227b6530e339bff21f99e68ca6968f3cca6dfe0fb9f4fab4fa135d5542ea3f01",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a00df9705f58edbab802c7f8363cfe5560ab1c6132c20a9f1dd163483a26f8ac53a39d6808bf4a1dfbd261b099bb03b3fb50906cb28bd8a081f00",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoA35cF9Y7bq4Asf4Njz+VWCrHGEywgqfHdFjSDom+KxTo51oCL9KHfvSYbCZuwOz+1CQbLKL2KCB8A\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 84,
|
||||
"comment" : "RFC 8032: 64 bytes",
|
||||
"msg" : "bd0f6a3747cd561bdddf4640a332461a4a30a12a434cd0bf40d766d9c6d458e5512204a30c17d1f50b5079631f64eb3112182da3005835461113718d1a5ef944",
|
||||
"sig" : "554bc2480860b49eab8532d2a533b7d578ef473eeb58c98bb2d0e1ce488a98b18dfde9b9b90775e67f47d4a1c3482058efc9f40d2ca033a0801b63d45b3b722ef552bad3b4ccb667da350192b61c508cf7b6b5adadc2c8d9a446ef003fb05cba5f30e88e36ec2703b349ca229c2670833900",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "LsX-PBcEWr2xNqXmqRPjKrda5otT0vwUm3flBBMtN1abfnZrp0oZvWFiNDohyFkKqc68qQFMY231",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "eXVvAU3P4gefXdnnGL5BceLvJIagjyUYb2v_Q6mTa5v-EkArCK5leYo9geIunsgOdpCGLvPU7ToA"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "79756f014dcfe2079f5dd9e718be4171e2ef2486a08f25186f6bff43a9936b9bfe12402b08ae65798a3d81e22e9ec80e7690862ef3d4ed3a00",
|
||||
"sk" : "2ec5fe3c17045abdb136a5e6a913e32ab75ae68b53d2fc149b77e504132d37569b7e766ba74a19bd6162343a21c8590aa9cebca9014c636df5",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a0079756f014dcfe2079f5dd9e718be4171e2ef2486a08f25186f6bff43a9936b9bfe12402b08ae65798a3d81e22e9ec80e7690862ef3d4ed3a00",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoAeXVvAU3P4gefXdnnGL5BceLvJIagjyUYb2v/Q6mTa5v+EkArCK5leYo9geIunsgOdpCGLvPU7ToA\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 85,
|
||||
"comment" : "RFC 8032: 256 bytes",
|
||||
"msg" : "15777532b0bdd0d1389f636c5f6b9ba734c90af572877e2d272dd078aa1e567cfa80e12928bb542330e8409f3174504107ecd5efac61ae7504dabe2a602ede89e5cca6257a7c77e27a702b3ae39fc769fc54f2395ae6a1178cab4738e543072fc1c177fe71e92e25bf03e4ecb72f47b64d0465aaea4c7fad372536c8ba516a6039c3c2a39f0e4d832be432dfa9a706a6e5c7e19f397964ca4258002f7c0541b590316dbc5622b6b2a6fe7a4abffd96105eca76ea7b98816af0748c10df048ce012d901015a51f189f3888145c03650aa23ce894c3bd889e030d565071c59f409a9981b51878fd6fc110624dcbcde0bf7a69ccce38fabdf86f3bef6044819de11",
|
||||
"sig" : "c650ddbb0601c19ca11439e1640dd931f43c518ea5bea70d3dcde5f4191fe53f00cf966546b72bcc7d58be2b9badef28743954e3a44a23f880e8d4f1cfce2d7a61452d26da05896f0a50da66a239a8a188b6d825b3305ad77b73fbac0836ecc60987fd08527c1a8e80d5823e65cafe2a3d00",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"jwk" : {
|
||||
"crv" : "Ed448",
|
||||
"d" : "hy0JN4D103MN98ISZks3uKDyT1aBDaqDgs1Po_d2NOxE3FTxwu2b6ob6-3Yy2L4ZnqFl9a1V3Zzo",
|
||||
"kid" : "none",
|
||||
"kty" : "OKP",
|
||||
"x" : "qBsuinClrJT_28ybrfw_6wgB8lhXi7EUrUTs4ewOeZ2gjv-4HF1oXAxW9k7srvjN8RzDhzeDjPQA"
|
||||
},
|
||||
"key" : {
|
||||
"curve" : "edwards448",
|
||||
"keySize" : 448,
|
||||
"pk" : "a81b2e8a70a5ac94ffdbcc9badfc3feb0801f258578bb114ad44ece1ec0e799da08effb81c5d685c0c56f64eecaef8cdf11cc38737838cf400",
|
||||
"sk" : "872d093780f5d3730df7c212664b37b8a0f24f56810daa8382cd4fa3f77634ec44dc54f1c2ed9bea86fafb7632d8be199ea165f5ad55dd9ce8",
|
||||
"type" : "EDDSAKeyPair"
|
||||
},
|
||||
"keyDer" : "3043300506032b6571033a00a81b2e8a70a5ac94ffdbcc9badfc3feb0801f258578bb114ad44ece1ec0e799da08effb81c5d685c0c56f64eecaef8cdf11cc38737838cf400",
|
||||
"keyPem" : "-----BEGIN PUBLIC KEY-----\nMEMwBQYDK2VxAzoAqBsuinClrJT/28ybrfw/6wgB8lhXi7EUrUTs4ewOeZ2gjv+4HF1oXAxW9k7srvjN8RzDhzeDjPQA\n-----END PUBLIC KEY-----\n",
|
||||
"type" : "EddsaVerify",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 86,
|
||||
"comment" : "RFC 8032: 1023 bytes",
|
||||
"msg" : "6ddf802e1aae4986935f7f981ba3f0351d6273c0a0c22c9c0e8339168e675412a3debfaf435ed651558007db4384b650fcc07e3b586a27a4f7a00ac8a6fec2cd86ae4bf1570c41e6a40c931db27b2faa15a8cedd52cff7362c4e6e23daec0fbc3a79b6806e316efcc7b68119bf46bc76a26067a53f296dafdbdc11c77f7777e972660cf4b6a9b369a6665f02e0cc9b6edfad136b4fabe723d2813db3136cfde9b6d044322fee2947952e031b73ab5c603349b307bdc27bc6cb8b8bbd7bd323219b8033a581b59eadebb09b3c4f3d2277d4f0343624acc817804728b25ab797172b4c5c21a22f9c7839d64300232eb66e53f31c723fa37fe387c7d3e50bdf9813a30e5bb12cf4cd930c40cfb4e1fc622592a49588794494d56d24ea4b40c89fc0596cc9ebb961c8cb10adde976a5d602b1c3f85b9b9a001ed3c6a4d3b1437f52096cd1956d042a597d561a596ecd3d1735a8d570ea0ec27225a2c4aaff26306d1526c1af3ca6d9cf5a2c98f47e1c46db9a33234cfd4d81f2c98538a09ebe76998d0d8fd25997c7d255c6d66ece6fa56f11144950f027795e653008f4bd7ca2dee85d8e90f3dc315130ce2a00375a318c7c3d97be2c8ce5b6db41a6254ff264fa6155baee3b0773c0f497c573f19bb4f4240281f0b1f4f7be857a4e59d416c06b4c50fa09e1810ddc6b1467baeac5a3668d11b6ecaa901440016f389f80acc4db977025e7f5924388c7e340a732e554440e76570f8dd71b7d640b3450d1fd5f0410a18f9a3494f707c717b79b4bf75c98400b096b21653b5d217cf3565c9597456f70703497a078763829bc01bb1cbc8fa04eadc9a6e3f6699587a9e75c94e5bab0036e0b2e711392cff0047d0d6b05bd2a588bc109718954259f1d86678a579a3120f19cfb2963f177aeb70f2d4844826262e51b80271272068ef5b3856fa8535aa2a88b2d41f2a0e2fda7624c2850272ac4a2f561f8f2f7a318bfd5caf9696149e4ac824ad3460538fdc25421beec2cc6818162d06bbed0c40a387192349db67a118bada6cd5ab0140ee273204f628aad1c135f770279a651e24d8c14d75a6059d76b96a6fd857def5e0b354b27ab937a5815d16b5fae407ff18222c6d1ed263be68c95f32d908bd895cd76207ae726487567f9a67dad79abec316f683b17f2d02bf07e0ac8b5bc6162cf94697b3c27cd1fea49b27f23ba2901871962506520c392da8b6ad0d99f7013fbc06c2c17a569500c8a7696481c1cd33e9b14e40b82e79a5f5db82571ba97bae3ad3e0479515bb0e2b0f3bfcd1fd33034efc6245eddd7ee2086ddae2600d8ca73e214e8c2b0bdb2b047c6a464a562ed77b73d2d841c4b34973551257713b753632efba348169abc90a68f42611a40126d7cb21b58695568186f7e569d2ff0f9e745d0487dd2eb997cafc5abf9dd102e62ff66cba87",
|
||||
"sig" : "e301345a41a39a4d72fff8df69c98075a0cc082b802fc9b2b6bc503f926b65bddf7f4c8f1cb49f6396afc8a70abe6d8aef0db478d4c6b2970076c6a0484fe76d76b3a97625d79f1ce240e7c576750d295528286f719b413de9ada3e8eb78ed573603ce30d8bb761785dc30dbc320869e1a00",
|
||||
"result" : "valid",
|
||||
"flags" : []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
import { deepStrictEqual } from 'assert';
|
||||
import { deepStrictEqual, throws } from 'assert';
|
||||
import { describe, should } from 'micro-should';
|
||||
import { secp192r1, secp224r1, P192, P224 } from './_more-curves.helpers.js';
|
||||
import { DER } from '../esm/abstract/weierstrass.js';
|
||||
import { secp256r1, P256 } from '../esm/p256.js';
|
||||
import { secp384r1, P384 } from '../esm/p384.js';
|
||||
import { secp521r1, P521 } from '../esm/p521.js';
|
||||
@ -22,29 +23,50 @@ import { default as secp224r1_sha3_224_test } from './wycheproof/ecdsa_secp224r1
|
||||
import { default as secp224r1_sha3_256_test } from './wycheproof/ecdsa_secp224r1_sha3_256_test.json' assert { type: 'json' };
|
||||
import { default as secp224r1_sha3_512_test } from './wycheproof/ecdsa_secp224r1_sha3_512_test.json' assert { type: 'json' };
|
||||
import { default as secp224r1_sha512_test } from './wycheproof/ecdsa_secp224r1_sha512_test.json' assert { type: 'json' };
|
||||
import { default as secp224r1_shake128_test } from './wycheproof/ecdsa_secp224r1_shake128_test.json' assert { type: 'json' };
|
||||
|
||||
import { default as secp256k1_sha256_bitcoin_test } from './wycheproof/ecdsa_secp256k1_sha256_bitcoin_test.json' assert { type: 'json' };
|
||||
import { default as secp256k1_sha256_test } from './wycheproof/ecdsa_secp256k1_sha256_test.json' assert { type: 'json' };
|
||||
import { default as secp256k1_sha3_256_test } from './wycheproof/ecdsa_secp256k1_sha3_256_test.json' assert { type: 'json' };
|
||||
import { default as secp256k1_sha3_512_test } from './wycheproof/ecdsa_secp256k1_sha3_512_test.json' assert { type: 'json' };
|
||||
import { default as secp256k1_sha512_test } from './wycheproof/ecdsa_secp256k1_sha512_test.json' assert { type: 'json' };
|
||||
import { default as secp256k1_shake128_test } from './wycheproof/ecdsa_secp256k1_shake128_test.json' assert { type: 'json' };
|
||||
import { default as secp256k1_shake256_test } from './wycheproof/ecdsa_secp256k1_shake256_test.json' assert { type: 'json' };
|
||||
|
||||
import { default as secp256r1_sha256_test } from './wycheproof/ecdsa_secp256r1_sha256_test.json' assert { type: 'json' };
|
||||
import { default as secp256r1_sha3_256_test } from './wycheproof/ecdsa_secp256r1_sha3_256_test.json' assert { type: 'json' };
|
||||
import { default as secp256r1_sha3_512_test } from './wycheproof/ecdsa_secp256r1_sha3_512_test.json' assert { type: 'json' };
|
||||
import { default as secp256r1_sha512_test } from './wycheproof/ecdsa_secp256r1_sha512_test.json' assert { type: 'json' };
|
||||
import { default as secp256r1_shake128_test } from './wycheproof/ecdsa_secp256r1_shake128_test.json' assert { type: 'json' };
|
||||
|
||||
import { default as secp384r1_sha384_test } from './wycheproof/ecdsa_secp384r1_sha384_test.json' assert { type: 'json' };
|
||||
import { default as secp384r1_sha3_384_test } from './wycheproof/ecdsa_secp384r1_sha3_384_test.json' assert { type: 'json' };
|
||||
import { default as secp384r1_sha3_512_test } from './wycheproof/ecdsa_secp384r1_sha3_512_test.json' assert { type: 'json' };
|
||||
import { default as secp384r1_sha512_test } from './wycheproof/ecdsa_secp384r1_sha512_test.json' assert { type: 'json' };
|
||||
import { default as secp384r1_shake256_test } from './wycheproof/ecdsa_secp384r1_shake256_test.json' assert { type: 'json' };
|
||||
|
||||
import { default as secp521r1_sha3_512_test } from './wycheproof/ecdsa_secp521r1_sha3_512_test.json' assert { type: 'json' };
|
||||
import { default as secp521r1_sha512_test } from './wycheproof/ecdsa_secp521r1_sha512_test.json' assert { type: 'json' };
|
||||
import { default as secp521r1_shake256_test } from './wycheproof/ecdsa_secp521r1_shake256_test.json' assert { type: 'json' };
|
||||
|
||||
import { sha3_224, sha3_256, sha3_384, sha3_512 } from '@noble/hashes/sha3';
|
||||
import { sha3_224, sha3_256, sha3_384, sha3_512, shake128, shake256 } from '@noble/hashes/sha3';
|
||||
import { sha512, sha384 } from '@noble/hashes/sha512';
|
||||
import { sha224, sha256 } from '@noble/hashes/sha256';
|
||||
|
||||
// TODO: maybe add to noble-hashes?
|
||||
const wrapShake = (shake, dkLen) => {
|
||||
const hashC = (msg) => shake(msg, { dkLen });
|
||||
hashC.outputLen = dkLen;
|
||||
hashC.blockLen = shake.blockLen;
|
||||
hashC.create = () => shake.create({ dkLen });
|
||||
return hashC;
|
||||
};
|
||||
const shake128_224 = wrapShake(shake128, 224 / 8);
|
||||
const shake128_256 = wrapShake(shake128, 256 / 8);
|
||||
const shake256_256 = wrapShake(shake256, 256 / 8);
|
||||
const shake256_384 = wrapShake(shake256, 384 / 8);
|
||||
const shake256_512 = wrapShake(shake256, 512 / 8);
|
||||
|
||||
const hex = bytesToHex;
|
||||
|
||||
// prettier-ignore
|
||||
@ -74,9 +96,6 @@ should('fields', () => {
|
||||
|
||||
describe('wycheproof ECDH', () => {
|
||||
for (const group of ecdh.testGroups) {
|
||||
// // Tested in secp256k1.test.js
|
||||
// if (group.key.curve === 'secp256k1') continue;
|
||||
// We don't have SHA-224
|
||||
const CURVE = NIST[group.curve];
|
||||
if (!CURVE) continue;
|
||||
should(group.curve, () => {
|
||||
@ -190,6 +209,10 @@ const WYCHEPROOF_ECDSA = {
|
||||
hash: sha512,
|
||||
tests: [secp224r1_sha512_test],
|
||||
},
|
||||
shake128: {
|
||||
hash: shake128_224,
|
||||
tests: [secp224r1_shake128_test],
|
||||
},
|
||||
},
|
||||
},
|
||||
secp256k1: {
|
||||
@ -197,7 +220,7 @@ const WYCHEPROOF_ECDSA = {
|
||||
hashes: {
|
||||
sha256: {
|
||||
hash: sha256,
|
||||
tests: [secp256k1_sha256_test],
|
||||
tests: [secp256k1_sha256_test, secp256k1_sha256_bitcoin_test],
|
||||
},
|
||||
sha3_256: {
|
||||
hash: sha3_256,
|
||||
@ -211,6 +234,14 @@ const WYCHEPROOF_ECDSA = {
|
||||
hash: sha512,
|
||||
tests: [secp256k1_sha512_test],
|
||||
},
|
||||
shake128: {
|
||||
hash: shake128_256,
|
||||
tests: [secp256k1_shake128_test],
|
||||
},
|
||||
shake256: {
|
||||
hash: shake256_256,
|
||||
tests: [secp256k1_shake256_test],
|
||||
},
|
||||
},
|
||||
},
|
||||
P256: {
|
||||
@ -232,6 +263,10 @@ const WYCHEPROOF_ECDSA = {
|
||||
hash: sha512,
|
||||
tests: [secp256r1_sha512_test],
|
||||
},
|
||||
shake128: {
|
||||
hash: shake128_256,
|
||||
tests: [secp256r1_shake128_test],
|
||||
},
|
||||
},
|
||||
},
|
||||
P384: {
|
||||
@ -253,6 +288,10 @@ const WYCHEPROOF_ECDSA = {
|
||||
hash: sha512,
|
||||
tests: [secp384r1_sha512_test],
|
||||
},
|
||||
shake256: {
|
||||
hash: shake256_384,
|
||||
tests: [secp384r1_shake256_test],
|
||||
},
|
||||
},
|
||||
},
|
||||
P521: {
|
||||
@ -266,19 +305,23 @@ const WYCHEPROOF_ECDSA = {
|
||||
hash: sha512,
|
||||
tests: [secp521r1_sha512_test],
|
||||
},
|
||||
shake256: {
|
||||
hash: shake256_512,
|
||||
tests: [secp521r1_shake256_test],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
function runWycheproof(name, CURVE, group, index) {
|
||||
const pubKey = CURVE.ProjectivePoint.fromHex(group.key.uncompressed);
|
||||
deepStrictEqual(pubKey.x, BigInt(`0x${group.key.wx}`));
|
||||
deepStrictEqual(pubKey.y, BigInt(`0x${group.key.wy}`));
|
||||
const key = group.publicKey;
|
||||
const pubKey = CURVE.ProjectivePoint.fromHex(key.uncompressed);
|
||||
deepStrictEqual(pubKey.x, BigInt(`0x${key.wx}`));
|
||||
deepStrictEqual(pubKey.y, BigInt(`0x${key.wy}`));
|
||||
const pubR = pubKey.toRawBytes();
|
||||
for (const test of group.tests) {
|
||||
const m = CURVE.CURVE.hash(hexToBytes(test.msg));
|
||||
const { sig } = test;
|
||||
|
||||
if (test.result === 'valid' || test.result === 'acceptable') {
|
||||
try {
|
||||
CURVE.Signature.fromDER(sig);
|
||||
@ -310,7 +353,6 @@ describe('wycheproof ECDSA', () => {
|
||||
should('generic', () => {
|
||||
for (const group of ecdsa.testGroups) {
|
||||
// Tested in secp256k1.test.js
|
||||
if (group.key.curve === 'secp256k1') continue;
|
||||
let CURVE = NIST[group.key.curve];
|
||||
if (!CURVE) continue;
|
||||
if (group.key.curve === 'secp224r1' && group.sha !== 'SHA-224') {
|
||||
@ -323,6 +365,9 @@ describe('wycheproof ECDSA', () => {
|
||||
if (['Hash weaker than DL-group'].includes(test.comment)) {
|
||||
continue;
|
||||
}
|
||||
// These old Wycheproof vectors which still accept missing zero, new one is not.
|
||||
if (test.flags.includes('MissingZero') && test.result === 'acceptable')
|
||||
test.result = 'invalid';
|
||||
const m = CURVE.CURVE.hash(hexToBytes(test.msg));
|
||||
if (test.result === 'valid' || test.result === 'acceptable') {
|
||||
try {
|
||||
@ -333,7 +378,12 @@ describe('wycheproof ECDSA', () => {
|
||||
throw e;
|
||||
}
|
||||
const verified = CURVE.verify(test.sig, m, pubKey.toHex());
|
||||
deepStrictEqual(verified, true, 'valid');
|
||||
if (group.key.curve === 'secp256k1') {
|
||||
// lowS: true for secp256k1
|
||||
deepStrictEqual(verified, !CURVE.Signature.fromDER(test.sig).hasHighS(), `valid`);
|
||||
} else {
|
||||
deepStrictEqual(verified, true, `valid`);
|
||||
}
|
||||
} else if (test.result === 'invalid') {
|
||||
let failed = false;
|
||||
try {
|
||||
@ -388,6 +438,33 @@ describe('RFC6979', () => {
|
||||
}
|
||||
});
|
||||
|
||||
should('DER Leading zero', () => {
|
||||
// Valid DER
|
||||
deepStrictEqual(
|
||||
DER.toSig(
|
||||
'303c021c70049af31f8348673d56cece2b27e587a402f2a48f0b21a7911a480a021c2840bf24f6f66be287066b7cbf38788e1b7770b18fd1aa6a26d7c6dc'
|
||||
),
|
||||
{
|
||||
r: 11796871166002955884468185727465595477481802908758874298363724580874n,
|
||||
s: 4239126896857047637966364941684493209162496401998708914961872570076n,
|
||||
}
|
||||
);
|
||||
// Invalid DER (missing trailing zero)
|
||||
throws(() =>
|
||||
DER.toSig(
|
||||
'303c021c70049af31f8348673d56cece2b27e587a402f2a48f0b21a7911a480a021cd7bf40db0909941d78f9948340c69e14c5417f8c840b7edb35846361'
|
||||
)
|
||||
);
|
||||
// Correctly adds trailing zero
|
||||
deepStrictEqual(
|
||||
DER.hexFromSig({
|
||||
r: 11796871166002955884468185727465595477481802908758874298363724580874n,
|
||||
s: 22720819770293592156700650145335132731295311312425682806720849797985n,
|
||||
}),
|
||||
'303d021c70049af31f8348673d56cece2b27e587a402f2a48f0b21a7911a480a021d00d7bf40db0909941d78f9948340c69e14c5417f8c840b7edb35846361'
|
||||
);
|
||||
});
|
||||
|
||||
// ESM is broken.
|
||||
import url from 'url';
|
||||
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
|
||||
|
@ -3,7 +3,7 @@ import { readFileSync } from 'fs';
|
||||
import { should, describe } from 'micro-should';
|
||||
import { bytesToHex as hex } from '@noble/hashes/utils';
|
||||
import { schnorr } from '../esm/secp256k1.js';
|
||||
const schCsv = readFileSync('./test/vectors/schnorr.csv', 'utf-8');
|
||||
const schCsv = readFileSync('./test/vectors/secp256k1/schnorr.csv', 'utf-8');
|
||||
|
||||
describe('schnorr.sign()', () => {
|
||||
// index,secret key,public key,aux_rand,message,signature,verification result,comment
|
||||
|
@ -9,6 +9,3 @@ export const sigFromDER = (der) => {
|
||||
export const sigToDER = (sig) => sig.toDERHex();
|
||||
export const selectHash = (secp) => secp.CURVE.hash;
|
||||
export const normVerifySig = (s) => _secp.Signature.fromDER(s);
|
||||
// export const bytesToNumberBE = secp256k1.utils.bytesToNumberBE;
|
||||
// export const numberToBytesBE = secp256k1.utils.numberToBytesBE;
|
||||
// export const mod = mod_;
|
||||
|
@ -8,14 +8,14 @@ import {
|
||||
secp, sigFromDER, sigToDER, selectHash, normVerifySig, mod, bytesToNumberBE, numberToBytesBE
|
||||
} from './secp256k1.helpers.js';
|
||||
|
||||
import { default as ecdsa } from './vectors/ecdsa.json' assert { type: 'json' };
|
||||
import { default as ecdh } from './vectors/ecdh.json' assert { type: 'json' };
|
||||
import { default as privates } from './vectors/privates.json' assert { type: 'json' };
|
||||
import { default as points } from './vectors/points.json' assert { type: 'json' };
|
||||
import { default as wp } from './vectors/wychenproof.json' assert { type: 'json' };
|
||||
import { default as ecdsa } from './vectors/secp256k1/ecdsa.json' assert { type: 'json' };
|
||||
import { default as ecdh } from './wycheproof/ecdh_secp256k1_test.json' assert { type: 'json' };
|
||||
import { default as privates } from './vectors/secp256k1/privates.json' assert { type: 'json' };
|
||||
import { default as points } from './vectors/secp256k1/points.json' assert { type: 'json' };
|
||||
import { default as wp } from './wycheproof/ecdsa_secp256k1_sha256_test.json' assert { type: 'json' };
|
||||
|
||||
const Point = secp.ProjectivePoint;
|
||||
const privatesTxt = readFileSync('./test/vectors/privates-2.txt', 'utf-8');
|
||||
const privatesTxt = readFileSync('./test/vectors/secp256k1/privates-2.txt', 'utf-8');
|
||||
|
||||
const FC_BIGINT = fc.bigInt(1n + 1n, secp.CURVE.n - 1n);
|
||||
// prettier-ignore
|
||||
@ -500,14 +500,24 @@ describe('secp256k1', () => {
|
||||
should('wycheproof vectors', () => {
|
||||
for (let group of wp.testGroups) {
|
||||
// const pubKey = Point.fromHex().toRawBytes();
|
||||
const pubKey = group.key.uncompressed;
|
||||
const key = group.publicKey;
|
||||
const pubKey = key.uncompressed;
|
||||
|
||||
for (let test of group.tests) {
|
||||
const h = selectHash(secp);
|
||||
|
||||
const m = h(hexToBytes(test.msg));
|
||||
if (test.result === 'valid' || test.result === 'acceptable') {
|
||||
let sig;
|
||||
try {
|
||||
sig = sigFromDER(test.sig);
|
||||
} catch (e) {
|
||||
// These old Wycheproof vectors which allows invalid behaviour of DER parser
|
||||
if (e.message === 'Invalid signature integer: negative') continue;
|
||||
throw e;
|
||||
}
|
||||
const verified = secp.verify(normVerifySig(test.sig), m, pubKey);
|
||||
if (sigFromDER(test.sig).hasHighS()) {
|
||||
if (sig.hasHighS()) {
|
||||
deepStrictEqual(verified, false);
|
||||
} else {
|
||||
deepStrictEqual(verified, true);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
434
test/wycheproof/ec_prime_order_curves_test.json
Normal file
434
test/wycheproof/ec_prime_order_curves_test.json
Normal file
@ -0,0 +1,434 @@
|
||||
{
|
||||
"algorithm" : "EcCurveTest",
|
||||
"schema" : "ec_curve_test_schema.json",
|
||||
"generatorVersion" : "0.9rc5",
|
||||
"numberOfTests" : 26,
|
||||
"header" : [
|
||||
"Test vectors of type EcCurveTest are for checking curve parameters."
|
||||
],
|
||||
"notes" : {
|
||||
},
|
||||
"testGroups" : [
|
||||
{
|
||||
"type" : "EcCurveTest",
|
||||
"tests" : [
|
||||
{
|
||||
"tcId" : 1,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp224r1",
|
||||
"oid" : "1.3.132.0.33",
|
||||
"ref" : "ANSI X9.62",
|
||||
"p" : "00ffffffffffffffffffffffffffffffff000000000000000000000001",
|
||||
"n" : "00ffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d",
|
||||
"a" : "00fffffffffffffffffffffffffffffffefffffffffffffffffffffffe",
|
||||
"b" : "00b4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4",
|
||||
"gx" : "00b70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21",
|
||||
"gy" : "00bd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 2,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp256r1",
|
||||
"oid" : "1.2.840.10045.3.1.7",
|
||||
"ref" : "ANSI X9.62",
|
||||
"p" : "00ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",
|
||||
"n" : "00ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",
|
||||
"a" : "00ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",
|
||||
"b" : "5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",
|
||||
"gx" : "6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",
|
||||
"gy" : "4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 3,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp384r1",
|
||||
"oid" : "1.3.132.0.34",
|
||||
"ref" : "ANSI X9.62",
|
||||
"p" : "00fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff",
|
||||
"n" : "00ffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973",
|
||||
"a" : "00fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc",
|
||||
"b" : "00b3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef",
|
||||
"gx" : "00aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7",
|
||||
"gy" : "3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 4,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp521r1",
|
||||
"oid" : "1.3.132.0.35",
|
||||
"ref" : "ANSI X9.62",
|
||||
"p" : "01ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"n" : "01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409",
|
||||
"a" : "01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc",
|
||||
"b" : "51953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00",
|
||||
"gx" : "00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66",
|
||||
"gy" : "011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 5,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp256k1",
|
||||
"oid" : "1.3.132.0.10",
|
||||
"ref" : "https://www.secg.org/sec2-v2.pdf",
|
||||
"p" : "00fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
|
||||
"n" : "00fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",
|
||||
"a" : "00",
|
||||
"b" : "07",
|
||||
"gx" : "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
|
||||
"gy" : "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 6,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp224k1",
|
||||
"oid" : "1.3.132.0.32",
|
||||
"ref" : "ANSI X9.62",
|
||||
"p" : "00fffffffffffffffffffffffffffffffffffffffffffffffeffffe56d",
|
||||
"n" : "010000000000000000000000000001dce8d2ec6184caf0a971769fb1f7",
|
||||
"a" : "00",
|
||||
"b" : "05",
|
||||
"gx" : "00a1455b334df099df30fc28a169a467e9e47075a90f7e650eb6b7a45c",
|
||||
"gy" : "7e089fed7fba344282cafbd6f7e319f7c0b0bd59e2ca4bdb556d61a5",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 7,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP224r1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.5",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00d7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0ff",
|
||||
"n" : "00d7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939f",
|
||||
"a" : "68a5e62ca9ce6c1c299803a6c1530b514e182ad8b0042a59cad29f43",
|
||||
"b" : "2580f63ccfe44138870713b1a92369e33e2135d266dbb372386c400b",
|
||||
"gx" : "0d9029ad2c7e5cf4340823b2a87dc68c9e4ce3174c1e6efdee12c07d",
|
||||
"gy" : "58aa56f772c0726f24c6b89e4ecdac24354b9e99caa3f6d3761402cd",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 8,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP256r1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.7",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5377",
|
||||
"n" : "00a9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7",
|
||||
"a" : "7d5a0975fc2c3057eef67530417affe7fb8055c126dc5c6ce94a4b44f330b5d9",
|
||||
"b" : "26dc5c6ce94a4b44f330b5d9bbd77cbf958416295cf7e1ce6bccdc18ff8c07b6",
|
||||
"gx" : "008bd2aeb9cb7e57cb2c4b482ffc81b7afb9de27e1e3bd23c23a4453bd9ace3262",
|
||||
"gy" : "547ef835c3dac4fd97f8461a14611dc9c27745132ded8e545c1d54c72f046997",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 9,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP320r1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.9",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00d35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28fcd412b1f1b32e27",
|
||||
"n" : "00d35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59311",
|
||||
"a" : "3ee30b568fbab0f883ccebd46d3f3bb8a2a73513f5eb79da66190eb085ffa9f492f375a97d860eb4",
|
||||
"b" : "520883949dfdbc42d3ad198640688a6fe13f41349554b49acc31dccd884539816f5eb4ac8fb1f1a6",
|
||||
"gx" : "43bd7e9afb53d8b85289bcc48ee5bfe6f20137d10a087eb6e7871e2a10a599c710af8d0d39e20611",
|
||||
"gy" : "14fdd05545ec1cc8ab4093247f77275e0743ffed117182eaa9c77877aaac6ac7d35245d1692e8ee1",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 10,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP384r1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.11",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "008cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec53",
|
||||
"n" : "008cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046565",
|
||||
"a" : "7bc382c63d8c150c3c72080ace05afa0c2bea28e4fb22787139165efba91f90f8aa5814a503ad4eb04a8c7dd22ce2826",
|
||||
"b" : "04a8c7dd22ce28268b39b55416f0447c2fb77de107dcd2a62e880ea53eeb62d57cb4390295dbc9943ab78696fa504c11",
|
||||
"gx" : "1d1c64f068cf45ffa2a63a81b7c13f6b8847a3e77ef14fe3db7fcafe0cbd10e8e826e03436d646aaef87b2e247d4af1e",
|
||||
"gy" : "008abe1d7520f9c2a45cb1eb8e95cfd55262b70b29feec5864e19c054ff99129280e4646217791811142820341263c5315",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 11,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP512r1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.13",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00aadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f3",
|
||||
"n" : "00aadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90069",
|
||||
"a" : "7830a3318b603b89e2327145ac234cc594cbdd8d3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94ca",
|
||||
"b" : "3df91610a83441caea9863bc2ded5d5aa8253aa10a2ef1c98b9ac8b57f1117a72bf2c7b9e7c1ac4d77fc94cadc083e67984050b75ebae5dd2809bd638016f723",
|
||||
"gx" : "0081aee4bdd82ed9645a21322e9c4c6a9385ed9f70b5d916c1b43b62eef4d0098eff3b1f78e2d0d48d50d1687b93b97d5f7c6d5047406a5e688b352209bcb9f822",
|
||||
"gy" : "7dde385d566332ecc0eabfa9cf7822fdf209f70024a57b1aa000c55b881f8111b2dcde494a5f485e5bca4bd88a2763aed1ca2b2fa8f0540678cd1e0f3ad80892",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 12,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP224t1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.6",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00d7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0ff",
|
||||
"n" : "00d7c134aa264366862a18302575d0fb98d116bc4b6ddebca3a5a7939f",
|
||||
"a" : "00d7c134aa264366862a18302575d1d787b09f075797da89f57ec8c0fc",
|
||||
"b" : "4b337d934104cd7bef271bf60ced1ed20da14c08b3bb64f18a60888d",
|
||||
"gx" : "6ab1e344ce25ff3896424e7ffe14762ecb49f8928ac0c76029b4d580",
|
||||
"gy" : "0374e9f5143e568cd23f3f4d7c0d4b1e41c8cc0d1c6abd5f1a46db4c",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 13,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP256t1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.8",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5377",
|
||||
"n" : "00a9fb57dba1eea9bc3e660a909d838d718c397aa3b561a6f7901e0e82974856a7",
|
||||
"a" : "00a9fb57dba1eea9bc3e660a909d838d726e3bf623d52620282013481d1f6e5374",
|
||||
"b" : "662c61c430d84ea4fe66a7733d0b76b7bf93ebc4af2f49256ae58101fee92b04",
|
||||
"gx" : "00a3e8eb3cc1cfe7b7732213b23a656149afa142c47aafbc2b79a191562e1305f4",
|
||||
"gy" : "2d996c823439c56d7f7b22e14644417e69bcb6de39d027001dabe8f35b25c9be",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 14,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP320t1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.10",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00d35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28fcd412b1f1b32e27",
|
||||
"n" : "00d35e472036bc4fb7e13c785ed201e065f98fcfa5b68f12a32d482ec7ee8658e98691555b44c59311",
|
||||
"a" : "00d35e472036bc4fb7e13c785ed201e065f98fcfa6f6f40def4f92b9ec7893ec28fcd412b1f1b32e24",
|
||||
"b" : "00a7f561e038eb1ed560b3d147db782013064c19f27ed27c6780aaf77fb8a547ceb5b4fef422340353",
|
||||
"gx" : "00925be9fb01afc6fb4d3e7d4990010f813408ab106c4f09cb7ee07868cc136fff3357f624a21bed52",
|
||||
"gy" : "63ba3a7a27483ebf6671dbef7abb30ebee084e58a0b077ad42a5a0989d1ee71b1b9bc0455fb0d2c3",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 15,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP384t1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.12",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "008cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec53",
|
||||
"n" : "008cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b31f166e6cac0425a7cf3ab6af6b7fc3103b883202e9046565",
|
||||
"a" : "008cb91e82a3386d280f5d6f7e50e641df152f7109ed5456b412b1da197fb71123acd3a729901d1a71874700133107ec50",
|
||||
"b" : "7f519eada7bda81bd826dba647910f8c4b9346ed8ccdc64e4b1abd11756dce1d2074aa263b88805ced70355a33b471ee",
|
||||
"gx" : "18de98b02db9a306f2afcd7235f72a819b80ab12ebd653172476fecd462aabffc4ff191b946a5f54d8d0aa2f418808cc",
|
||||
"gy" : "25ab056962d30651a114afd2755ad336747f93475b7a1fca3b88f2b6a208ccfe469408584dc2b2912675bf5b9e582928",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 16,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP512t1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.14",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00aadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f3",
|
||||
"n" : "00aadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca70330870553e5c414ca92619418661197fac10471db1d381085ddaddb58796829ca90069",
|
||||
"a" : "00aadd9db8dbe9c48b3fd4e6ae33c9fc07cb308db3b3c9d20ed6639cca703308717d4d9b009bc66842aecda12ae6a380e62881ff2f2d82c68528aa6056583a48f0",
|
||||
"b" : "7cbbbcf9441cfab76e1890e46884eae321f70c0bcb4981527897504bec3e36a62bcdfa2304976540f6450085f2dae145c22553b465763689180ea2571867423e",
|
||||
"gx" : "640ece5c12788717b9c1ba06cbc2a6feba85842458c56dde9db1758d39c0313d82ba51735cdb3ea499aa77a7d6943a64f7a3f25fe26f06b51baa2696fa9035da",
|
||||
"gy" : "5b534bd595f5af0fa2c892376c84ace1bb4e3019b71634c01131159cae03cee9d9932184beef216bd71df2dadf86a627306ecff96dbb8bace198b61e00f8b332",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 17,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "FRP256v1",
|
||||
"oid" : "1.2.250.1.223.101.256.1",
|
||||
"ref" : "https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000024668816",
|
||||
"p" : "00f1fd178c0b3ad58f10126de8ce42435b3961adbcabc8ca6de8fcf353d86e9c03",
|
||||
"n" : "00f1fd178c0b3ad58f10126de8ce42435b53dc67e140d2bf941ffdd459c6d655e1",
|
||||
"a" : "00f1fd178c0b3ad58f10126de8ce42435b3961adbcabc8ca6de8fcf353d86e9c00",
|
||||
"b" : "00ee353fca5428a9300d4aba754a44c00fdfec0c9ae4b1a1803075ed967b7bb73f",
|
||||
"gx" : "00b6b3d4c356c139eb31183d4749d423958c27d2dcaf98b70164c97a2dd98f5cff",
|
||||
"gy" : "6142e0f7c8b204911f9271f0f3ecef8c2701c307e8e4c9e183115a1554062cfb",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 18,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp192k1",
|
||||
"oid" : "1.3.132.0.31",
|
||||
"ref" : "ANSI X9.62",
|
||||
"p" : "00fffffffffffffffffffffffffffffffffffffffeffffee37",
|
||||
"n" : "00fffffffffffffffffffffffe26f2fc170f69466a74defd8d",
|
||||
"a" : "00",
|
||||
"b" : "03",
|
||||
"gx" : "00db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",
|
||||
"gy" : "009b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 19,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp192r1",
|
||||
"oid" : "1.2.840.10045.3.1.1",
|
||||
"ref" : "ANSI X9.62",
|
||||
"p" : "00fffffffffffffffffffffffffffffffeffffffffffffffff",
|
||||
"n" : "00ffffffffffffffffffffffff99def836146bc9b1b4d22831",
|
||||
"a" : "00fffffffffffffffffffffffffffffffefffffffffffffffc",
|
||||
"b" : "64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",
|
||||
"gx" : "188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",
|
||||
"gy" : "07192b95ffc8da78631011ed6b24cdd573f977a11e794811",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 20,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp160k1",
|
||||
"oid" : "1.3.132.0.9",
|
||||
"ref" : "https://www.secg.org/SEC2-Ver-1.0.pdf",
|
||||
"p" : "00fffffffffffffffffffffffffffffffeffffac73",
|
||||
"n" : "0100000000000000000001b8fa16dfab9aca16b6b3",
|
||||
"a" : "00",
|
||||
"b" : "07",
|
||||
"gx" : "3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",
|
||||
"gy" : "00938cf935318fdced6bc28286531733c3f03c4fee",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 21,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp160r1",
|
||||
"oid" : "1.3.132.0.8",
|
||||
"ref" : "https://www.secg.org/SEC2-Ver-1.0.pdf",
|
||||
"p" : "00ffffffffffffffffffffffffffffffff7fffffff",
|
||||
"n" : "0100000000000000000001f4c8f927aed3ca752257",
|
||||
"a" : "00ffffffffffffffffffffffffffffffff7ffffffc",
|
||||
"b" : "1c97befc54bd7a8b65acf89f81d4d4adc565fa45",
|
||||
"gx" : "4a96b5688ef573284664698968c38bb913cbfc82",
|
||||
"gy" : "23a628553168947d59dcc912042351377ac5fb32",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 22,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "secp160r2",
|
||||
"oid" : "1.3.132.0.30",
|
||||
"ref" : "https://www.secg.org/SEC2-Ver-1.0.pdf",
|
||||
"p" : "00fffffffffffffffffffffffffffffffeffffac73",
|
||||
"n" : "0100000000000000000000351ee786a818f3a1a16b",
|
||||
"a" : "00fffffffffffffffffffffffffffffffeffffac70",
|
||||
"b" : "00b4e134d3fb59eb8bab57274904664d5af50388ba",
|
||||
"gx" : "52dcb034293a117e1f4ff11b30f7199d3144ce6d",
|
||||
"gy" : "00feaffef2e331f296e071fa0df9982cfea7d43f2e",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 23,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP160r1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.1",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00e95e4a5f737059dc60dfc7ad95b3d8139515620f",
|
||||
"n" : "00e95e4a5f737059dc60df5991d45029409e60fc09",
|
||||
"a" : "340e7be2a280eb74e2be61bada745d97e8f7c300",
|
||||
"b" : "1e589a8595423412134faa2dbdec95c8d8675e58",
|
||||
"gx" : "00bed5af16ea3f6a4f62938c4631eb5af7bdbcdbc3",
|
||||
"gy" : "1667cb477a1a8ec338f94741669c976316da6321",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 24,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP160t1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.2",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00e95e4a5f737059dc60dfc7ad95b3d8139515620f",
|
||||
"n" : "00e95e4a5f737059dc60df5991d45029409e60fc09",
|
||||
"a" : "00e95e4a5f737059dc60dfc7ad95b3d8139515620c",
|
||||
"b" : "7a556b6dae535b7b51ed2c4d7daa7a0b5c55f380",
|
||||
"gx" : "00b199b13b9b34efc1397e64baeb05acc265ff2378",
|
||||
"gy" : "00add6718b7c7c1961f0991b842443772152c9e0ad",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 25,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP192r1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.3",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00c302f41d932a36cda7a3463093d18db78fce476de1a86297",
|
||||
"n" : "00c302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1",
|
||||
"a" : "6a91174076b1e0e19c39c031fe8685c1cae040e5c69a28ef",
|
||||
"b" : "469a28ef7c28cca3dc721d044f4496bcca7ef4146fbf25c9",
|
||||
"gx" : "00c0a0647eaab6a48753b033c56cb0f0900a2f5c4853375fd6",
|
||||
"gy" : "14b690866abd5bb88b5f4828c1490002e6773fa2fa299b8f",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
},
|
||||
{
|
||||
"tcId" : 26,
|
||||
"comment" : "",
|
||||
"flags" : [],
|
||||
"name" : "brainpoolP192t1",
|
||||
"oid" : "1.3.36.3.3.2.8.1.1.4",
|
||||
"ref" : "RFC 5639",
|
||||
"p" : "00c302f41d932a36cda7a3463093d18db78fce476de1a86297",
|
||||
"n" : "00c302f41d932a36cda7a3462f9e9e916b5be8f1029ac4acc1",
|
||||
"a" : "00c302f41d932a36cda7a3463093d18db78fce476de1a86294",
|
||||
"b" : "13d56ffaec78681e68f9deb43b35bec2fb68542e27897b79",
|
||||
"gx" : "3ae9e58c82f63c30282e1fe7bbf43fa72c446af6f4618129",
|
||||
"gy" : "097e2c5667c2223a902ab5ca449d0084b7e5b3de7ccc01c9",
|
||||
"h" : 1,
|
||||
"result" : "valid"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
5578
test/wycheproof/ecdsa_secp224k1_sha224_test.json
Normal file
5578
test/wycheproof/ecdsa_secp224k1_sha224_test.json
Normal file
File diff suppressed because one or more lines are too long
5882
test/wycheproof/ecdsa_secp224k1_sha256_test.json
Normal file
5882
test/wycheproof/ecdsa_secp224k1_sha256_test.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6406
test/wycheproof/ecdsa_secp224r1_shake128_test.json
Normal file
6406
test/wycheproof/ecdsa_secp224r1_shake128_test.json
Normal file
File diff suppressed because one or more lines are too long
6360
test/wycheproof/ecdsa_secp256k1_sha256_bitcoin_test.json
Normal file
6360
test/wycheproof/ecdsa_secp256k1_sha256_bitcoin_test.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6416
test/wycheproof/ecdsa_secp256k1_shake128_test.json
Normal file
6416
test/wycheproof/ecdsa_secp256k1_shake128_test.json
Normal file
File diff suppressed because one or more lines are too long
7120
test/wycheproof/ecdsa_secp256k1_shake256_test.json
Normal file
7120
test/wycheproof/ecdsa_secp256k1_shake256_test.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6562
test/wycheproof/ecdsa_secp256r1_shake128_test.json
Normal file
6562
test/wycheproof/ecdsa_secp256r1_shake128_test.json
Normal file
File diff suppressed because one or more lines are too long
6252
test/wycheproof/ecdsa_secp384r1_sha256_test.json
Normal file
6252
test/wycheproof/ecdsa_secp384r1_sha256_test.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7016
test/wycheproof/ecdsa_secp384r1_shake256_test.json
Normal file
7016
test/wycheproof/ecdsa_secp384r1_shake256_test.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7040
test/wycheproof/ecdsa_secp521r1_shake256_test.json
Normal file
7040
test/wycheproof/ecdsa_secp521r1_shake256_test.json
Normal file
File diff suppressed because one or more lines are too long
3020
test/wycheproof/ed25519_test.json
Normal file
3020
test/wycheproof/ed25519_test.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user