forked from tornado-packages/noble-curves
secp256k1 tests: remove test skips
This commit is contained in:
parent
ba121ff24c
commit
4b5560ab4b
@ -390,7 +390,6 @@ should('secp256k1.recoverPublicKey()/should handle all-zeros msghash', () => {
|
|||||||
});
|
});
|
||||||
should('secp256k1.recoverPublicKey()/should handle RFC 6979 vectors', () => {
|
should('secp256k1.recoverPublicKey()/should handle RFC 6979 vectors', () => {
|
||||||
for (const vector of ecdsa.valid) {
|
for (const vector of ecdsa.valid) {
|
||||||
if (secp.utils.mod(hexToNumber(vector.m), secp.CURVE.n) === 0n) continue;
|
|
||||||
let usig = secp.sign(vector.m, vector.d);
|
let usig = secp.sign(vector.m, vector.d);
|
||||||
let sig = usig.toDERHex();
|
let sig = usig.toDERHex();
|
||||||
const vpub = secp.getPublicKey(vector.d);
|
const vpub = secp.getPublicKey(vector.d);
|
||||||
@ -407,8 +406,6 @@ should('secp256k1.getSharedSecret()/should produce correct results', () => {
|
|||||||
// TODO: Once der is there, run all tests.
|
// TODO: Once der is there, run all tests.
|
||||||
for (const vector of ecdh.testGroups[0].tests.slice(0, 230)) {
|
for (const vector of ecdh.testGroups[0].tests.slice(0, 230)) {
|
||||||
if (vector.result === 'invalid' || vector.private.length !== 64) {
|
if (vector.result === 'invalid' || vector.private.length !== 64) {
|
||||||
// We support eth-like hexes
|
|
||||||
if (vector.private.length < 64) continue;
|
|
||||||
throws(() => {
|
throws(() => {
|
||||||
secp.getSharedSecret(vector.private, derToPub(vector.public), true);
|
secp.getSharedSecret(vector.private, derToPub(vector.public), true);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user