From b8b12671acc84f4b8d1343252eda0313c09aba1e Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sun, 10 Dec 2023 18:47:25 +0000 Subject: [PATCH] test: rename hash-to-curve vectors, remove colons. closes gh-102 --- test/hash-to-curve.test.js | 32 +++++++++---------- ...n => BLS12381G1_XMD_SHA-256_SSWU_NU_.json} | 0 ...n => BLS12381G1_XMD_SHA-256_SSWU_RO_.json} | 0 ...n => BLS12381G2_XMD_SHA-256_SSWU_NU_.json} | 0 ...n => BLS12381G2_XMD_SHA-256_SSWU_RO_.json} | 0 ...U_.json => P256_XMD_SHA-256_SSWU_NU_.json} | 0 ...O_.json => P256_XMD_SHA-256_SSWU_RO_.json} | 0 ...U_.json => P384_XMD_SHA-384_SSWU_NU_.json} | 0 ...O_.json => P384_XMD_SHA-384_SSWU_RO_.json} | 0 ...U_.json => P521_XMD_SHA-512_SSWU_NU_.json} | 0 ...O_.json => P521_XMD_SHA-512_SSWU_RO_.json} | 0 ...n => curve25519_XMD_SHA-512_ELL2_NU_.json} | 0 ...n => curve25519_XMD_SHA-512_ELL2_RO_.json} | 0 ...on => curve448_XOF_SHAKE256_ELL2_NU_.json} | 0 ...on => curve448_XOF_SHAKE256_ELL2_RO_.json} | 0 ...=> edwards25519_XMD_SHA-512_ELL2_NU_.json} | 0 ...=> edwards25519_XMD_SHA-512_ELL2_RO_.json} | 0 ... => edwards448_XOF_SHAKE256_ELL2_NU_.json} | 0 ... => edwards448_XOF_SHAKE256_ELL2_RO_.json} | 0 ...on => secp256k1_XMD_SHA-256_SSWU_NU_.json} | 0 ...on => secp256k1_XMD_SHA-256_SSWU_RO_.json} | 0 21 files changed, 16 insertions(+), 16 deletions(-) rename test/hash-to-curve/{BLS12381G1_XMD:SHA-256_SSWU_NU_.json => BLS12381G1_XMD_SHA-256_SSWU_NU_.json} (100%) rename test/hash-to-curve/{BLS12381G1_XMD:SHA-256_SSWU_RO_.json => BLS12381G1_XMD_SHA-256_SSWU_RO_.json} (100%) rename test/hash-to-curve/{BLS12381G2_XMD:SHA-256_SSWU_NU_.json => BLS12381G2_XMD_SHA-256_SSWU_NU_.json} (100%) rename test/hash-to-curve/{BLS12381G2_XMD:SHA-256_SSWU_RO_.json => BLS12381G2_XMD_SHA-256_SSWU_RO_.json} (100%) rename test/hash-to-curve/{P256_XMD:SHA-256_SSWU_NU_.json => P256_XMD_SHA-256_SSWU_NU_.json} (100%) rename test/hash-to-curve/{P256_XMD:SHA-256_SSWU_RO_.json => P256_XMD_SHA-256_SSWU_RO_.json} (100%) rename test/hash-to-curve/{P384_XMD:SHA-384_SSWU_NU_.json => P384_XMD_SHA-384_SSWU_NU_.json} (100%) rename test/hash-to-curve/{P384_XMD:SHA-384_SSWU_RO_.json => P384_XMD_SHA-384_SSWU_RO_.json} (100%) rename test/hash-to-curve/{P521_XMD:SHA-512_SSWU_NU_.json => P521_XMD_SHA-512_SSWU_NU_.json} (100%) rename test/hash-to-curve/{P521_XMD:SHA-512_SSWU_RO_.json => P521_XMD_SHA-512_SSWU_RO_.json} (100%) rename test/hash-to-curve/{curve25519_XMD:SHA-512_ELL2_NU_.json => curve25519_XMD_SHA-512_ELL2_NU_.json} (100%) rename test/hash-to-curve/{curve25519_XMD:SHA-512_ELL2_RO_.json => curve25519_XMD_SHA-512_ELL2_RO_.json} (100%) rename test/hash-to-curve/{curve448_XOF:SHAKE256_ELL2_NU_.json => curve448_XOF_SHAKE256_ELL2_NU_.json} (100%) rename test/hash-to-curve/{curve448_XOF:SHAKE256_ELL2_RO_.json => curve448_XOF_SHAKE256_ELL2_RO_.json} (100%) rename test/hash-to-curve/{edwards25519_XMD:SHA-512_ELL2_NU_.json => edwards25519_XMD_SHA-512_ELL2_NU_.json} (100%) rename test/hash-to-curve/{edwards25519_XMD:SHA-512_ELL2_RO_.json => edwards25519_XMD_SHA-512_ELL2_RO_.json} (100%) rename test/hash-to-curve/{edwards448_XOF:SHAKE256_ELL2_NU_.json => edwards448_XOF_SHAKE256_ELL2_NU_.json} (100%) rename test/hash-to-curve/{edwards448_XOF:SHAKE256_ELL2_RO_.json => edwards448_XOF_SHAKE256_ELL2_RO_.json} (100%) rename test/hash-to-curve/{secp256k1_XMD:SHA-256_SSWU_NU_.json => secp256k1_XMD_SHA-256_SSWU_NU_.json} (100%) rename test/hash-to-curve/{secp256k1_XMD:SHA-256_SSWU_RO_.json => secp256k1_XMD_SHA-256_SSWU_RO_.json} (100%) diff --git a/test/hash-to-curve.test.js b/test/hash-to-curve.test.js index a23b67f..a77a52a 100644 --- a/test/hash-to-curve.test.js +++ b/test/hash-to-curve.test.js @@ -23,29 +23,29 @@ import { default as xof_shake128_36 } from './hash-to-curve/expand_message_xof_S import { default as xof_shake128_256 } from './hash-to-curve/expand_message_xof_SHAKE128_256.json' assert { type: 'json' }; import { default as xof_shake256_36 } from './hash-to-curve/expand_message_xof_SHAKE256_36.json' assert { type: 'json' }; // P256 -import { default as p256_ro } from './hash-to-curve/P256_XMD:SHA-256_SSWU_RO_.json' assert { type: 'json' }; -import { default as p256_nu } from './hash-to-curve/P256_XMD:SHA-256_SSWU_NU_.json' assert { type: 'json' }; +import { default as p256_ro } from './hash-to-curve/P256_XMD_SHA-256_SSWU_RO_.json' assert { type: 'json' }; +import { default as p256_nu } from './hash-to-curve/P256_XMD_SHA-256_SSWU_NU_.json' assert { type: 'json' }; // P384 -import { default as p384_ro } from './hash-to-curve/P384_XMD:SHA-384_SSWU_RO_.json' assert { type: 'json' }; -import { default as p384_nu } from './hash-to-curve/P384_XMD:SHA-384_SSWU_NU_.json' assert { type: 'json' }; +import { default as p384_ro } from './hash-to-curve/P384_XMD_SHA-384_SSWU_RO_.json' assert { type: 'json' }; +import { default as p384_nu } from './hash-to-curve/P384_XMD_SHA-384_SSWU_NU_.json' assert { type: 'json' }; // P521 -import { default as p521_ro } from './hash-to-curve/P521_XMD:SHA-512_SSWU_RO_.json' assert { type: 'json' }; -import { default as p521_nu } from './hash-to-curve/P521_XMD:SHA-512_SSWU_NU_.json' assert { type: 'json' }; +import { default as p521_ro } from './hash-to-curve/P521_XMD_SHA-512_SSWU_RO_.json' assert { type: 'json' }; +import { default as p521_nu } from './hash-to-curve/P521_XMD_SHA-512_SSWU_NU_.json' assert { type: 'json' }; // secp256k1 -import { default as secp256k1_ro } from './hash-to-curve/secp256k1_XMD:SHA-256_SSWU_RO_.json' assert { type: 'json' }; -import { default as secp256k1_nu } from './hash-to-curve/secp256k1_XMD:SHA-256_SSWU_NU_.json' assert { type: 'json' }; +import { default as secp256k1_ro } from './hash-to-curve/secp256k1_XMD_SHA-256_SSWU_RO_.json' assert { type: 'json' }; +import { default as secp256k1_nu } from './hash-to-curve/secp256k1_XMD_SHA-256_SSWU_NU_.json' assert { type: 'json' }; // bls-G1 -import { default as g1_ro } from './hash-to-curve/BLS12381G1_XMD:SHA-256_SSWU_RO_.json' assert { type: 'json' }; -import { default as g1_nu } from './hash-to-curve/BLS12381G1_XMD:SHA-256_SSWU_NU_.json' assert { type: 'json' }; +import { default as g1_ro } from './hash-to-curve/BLS12381G1_XMD_SHA-256_SSWU_RO_.json' assert { type: 'json' }; +import { default as g1_nu } from './hash-to-curve/BLS12381G1_XMD_SHA-256_SSWU_NU_.json' assert { type: 'json' }; // bls-G2 -import { default as g2_ro } from './hash-to-curve/BLS12381G2_XMD:SHA-256_SSWU_RO_.json' assert { type: 'json' }; -import { default as g2_nu } from './hash-to-curve/BLS12381G2_XMD:SHA-256_SSWU_NU_.json' assert { type: 'json' }; +import { default as g2_ro } from './hash-to-curve/BLS12381G2_XMD_SHA-256_SSWU_RO_.json' assert { type: 'json' }; +import { default as g2_nu } from './hash-to-curve/BLS12381G2_XMD_SHA-256_SSWU_NU_.json' assert { type: 'json' }; // ed25519 -import { default as ed25519_ro } from './hash-to-curve/edwards25519_XMD:SHA-512_ELL2_RO_.json' assert { type: 'json' }; -import { default as ed25519_nu } from './hash-to-curve/edwards25519_XMD:SHA-512_ELL2_NU_.json' assert { type: 'json' }; +import { default as ed25519_ro } from './hash-to-curve/edwards25519_XMD_SHA-512_ELL2_RO_.json' assert { type: 'json' }; +import { default as ed25519_nu } from './hash-to-curve/edwards25519_XMD_SHA-512_ELL2_NU_.json' assert { type: 'json' }; // ed448 -import { default as ed448_ro } from './hash-to-curve/edwards448_XOF:SHAKE256_ELL2_RO_.json' assert { type: 'json' }; -import { default as ed448_nu } from './hash-to-curve/edwards448_XOF:SHAKE256_ELL2_NU_.json' assert { type: 'json' }; +import { default as ed448_ro } from './hash-to-curve/edwards448_XOF_SHAKE256_ELL2_RO_.json' assert { type: 'json' }; +import { default as ed448_nu } from './hash-to-curve/edwards448_XOF_SHAKE256_ELL2_NU_.json' assert { type: 'json' }; function testExpandXMD(hash, vectors) { describe(`${vectors.hash}/${vectors.DST.length}`, () => { diff --git a/test/hash-to-curve/BLS12381G1_XMD:SHA-256_SSWU_NU_.json b/test/hash-to-curve/BLS12381G1_XMD_SHA-256_SSWU_NU_.json similarity index 100% rename from test/hash-to-curve/BLS12381G1_XMD:SHA-256_SSWU_NU_.json rename to test/hash-to-curve/BLS12381G1_XMD_SHA-256_SSWU_NU_.json diff --git a/test/hash-to-curve/BLS12381G1_XMD:SHA-256_SSWU_RO_.json b/test/hash-to-curve/BLS12381G1_XMD_SHA-256_SSWU_RO_.json similarity index 100% rename from test/hash-to-curve/BLS12381G1_XMD:SHA-256_SSWU_RO_.json rename to test/hash-to-curve/BLS12381G1_XMD_SHA-256_SSWU_RO_.json diff --git a/test/hash-to-curve/BLS12381G2_XMD:SHA-256_SSWU_NU_.json b/test/hash-to-curve/BLS12381G2_XMD_SHA-256_SSWU_NU_.json similarity index 100% rename from test/hash-to-curve/BLS12381G2_XMD:SHA-256_SSWU_NU_.json rename to test/hash-to-curve/BLS12381G2_XMD_SHA-256_SSWU_NU_.json diff --git a/test/hash-to-curve/BLS12381G2_XMD:SHA-256_SSWU_RO_.json b/test/hash-to-curve/BLS12381G2_XMD_SHA-256_SSWU_RO_.json similarity index 100% rename from test/hash-to-curve/BLS12381G2_XMD:SHA-256_SSWU_RO_.json rename to test/hash-to-curve/BLS12381G2_XMD_SHA-256_SSWU_RO_.json diff --git a/test/hash-to-curve/P256_XMD:SHA-256_SSWU_NU_.json b/test/hash-to-curve/P256_XMD_SHA-256_SSWU_NU_.json similarity index 100% rename from test/hash-to-curve/P256_XMD:SHA-256_SSWU_NU_.json rename to test/hash-to-curve/P256_XMD_SHA-256_SSWU_NU_.json diff --git a/test/hash-to-curve/P256_XMD:SHA-256_SSWU_RO_.json b/test/hash-to-curve/P256_XMD_SHA-256_SSWU_RO_.json similarity index 100% rename from test/hash-to-curve/P256_XMD:SHA-256_SSWU_RO_.json rename to test/hash-to-curve/P256_XMD_SHA-256_SSWU_RO_.json diff --git a/test/hash-to-curve/P384_XMD:SHA-384_SSWU_NU_.json b/test/hash-to-curve/P384_XMD_SHA-384_SSWU_NU_.json similarity index 100% rename from test/hash-to-curve/P384_XMD:SHA-384_SSWU_NU_.json rename to test/hash-to-curve/P384_XMD_SHA-384_SSWU_NU_.json diff --git a/test/hash-to-curve/P384_XMD:SHA-384_SSWU_RO_.json b/test/hash-to-curve/P384_XMD_SHA-384_SSWU_RO_.json similarity index 100% rename from test/hash-to-curve/P384_XMD:SHA-384_SSWU_RO_.json rename to test/hash-to-curve/P384_XMD_SHA-384_SSWU_RO_.json diff --git a/test/hash-to-curve/P521_XMD:SHA-512_SSWU_NU_.json b/test/hash-to-curve/P521_XMD_SHA-512_SSWU_NU_.json similarity index 100% rename from test/hash-to-curve/P521_XMD:SHA-512_SSWU_NU_.json rename to test/hash-to-curve/P521_XMD_SHA-512_SSWU_NU_.json diff --git a/test/hash-to-curve/P521_XMD:SHA-512_SSWU_RO_.json b/test/hash-to-curve/P521_XMD_SHA-512_SSWU_RO_.json similarity index 100% rename from test/hash-to-curve/P521_XMD:SHA-512_SSWU_RO_.json rename to test/hash-to-curve/P521_XMD_SHA-512_SSWU_RO_.json diff --git a/test/hash-to-curve/curve25519_XMD:SHA-512_ELL2_NU_.json b/test/hash-to-curve/curve25519_XMD_SHA-512_ELL2_NU_.json similarity index 100% rename from test/hash-to-curve/curve25519_XMD:SHA-512_ELL2_NU_.json rename to test/hash-to-curve/curve25519_XMD_SHA-512_ELL2_NU_.json diff --git a/test/hash-to-curve/curve25519_XMD:SHA-512_ELL2_RO_.json b/test/hash-to-curve/curve25519_XMD_SHA-512_ELL2_RO_.json similarity index 100% rename from test/hash-to-curve/curve25519_XMD:SHA-512_ELL2_RO_.json rename to test/hash-to-curve/curve25519_XMD_SHA-512_ELL2_RO_.json diff --git a/test/hash-to-curve/curve448_XOF:SHAKE256_ELL2_NU_.json b/test/hash-to-curve/curve448_XOF_SHAKE256_ELL2_NU_.json similarity index 100% rename from test/hash-to-curve/curve448_XOF:SHAKE256_ELL2_NU_.json rename to test/hash-to-curve/curve448_XOF_SHAKE256_ELL2_NU_.json diff --git a/test/hash-to-curve/curve448_XOF:SHAKE256_ELL2_RO_.json b/test/hash-to-curve/curve448_XOF_SHAKE256_ELL2_RO_.json similarity index 100% rename from test/hash-to-curve/curve448_XOF:SHAKE256_ELL2_RO_.json rename to test/hash-to-curve/curve448_XOF_SHAKE256_ELL2_RO_.json diff --git a/test/hash-to-curve/edwards25519_XMD:SHA-512_ELL2_NU_.json b/test/hash-to-curve/edwards25519_XMD_SHA-512_ELL2_NU_.json similarity index 100% rename from test/hash-to-curve/edwards25519_XMD:SHA-512_ELL2_NU_.json rename to test/hash-to-curve/edwards25519_XMD_SHA-512_ELL2_NU_.json diff --git a/test/hash-to-curve/edwards25519_XMD:SHA-512_ELL2_RO_.json b/test/hash-to-curve/edwards25519_XMD_SHA-512_ELL2_RO_.json similarity index 100% rename from test/hash-to-curve/edwards25519_XMD:SHA-512_ELL2_RO_.json rename to test/hash-to-curve/edwards25519_XMD_SHA-512_ELL2_RO_.json diff --git a/test/hash-to-curve/edwards448_XOF:SHAKE256_ELL2_NU_.json b/test/hash-to-curve/edwards448_XOF_SHAKE256_ELL2_NU_.json similarity index 100% rename from test/hash-to-curve/edwards448_XOF:SHAKE256_ELL2_NU_.json rename to test/hash-to-curve/edwards448_XOF_SHAKE256_ELL2_NU_.json diff --git a/test/hash-to-curve/edwards448_XOF:SHAKE256_ELL2_RO_.json b/test/hash-to-curve/edwards448_XOF_SHAKE256_ELL2_RO_.json similarity index 100% rename from test/hash-to-curve/edwards448_XOF:SHAKE256_ELL2_RO_.json rename to test/hash-to-curve/edwards448_XOF_SHAKE256_ELL2_RO_.json diff --git a/test/hash-to-curve/secp256k1_XMD:SHA-256_SSWU_NU_.json b/test/hash-to-curve/secp256k1_XMD_SHA-256_SSWU_NU_.json similarity index 100% rename from test/hash-to-curve/secp256k1_XMD:SHA-256_SSWU_NU_.json rename to test/hash-to-curve/secp256k1_XMD_SHA-256_SSWU_NU_.json diff --git a/test/hash-to-curve/secp256k1_XMD:SHA-256_SSWU_RO_.json b/test/hash-to-curve/secp256k1_XMD_SHA-256_SSWU_RO_.json similarity index 100% rename from test/hash-to-curve/secp256k1_XMD:SHA-256_SSWU_RO_.json rename to test/hash-to-curve/secp256k1_XMD_SHA-256_SSWU_RO_.json