native: adjust NamedCurveHash values

Use 122 and 123 respectively for Secp256k1Keccak256 and
Secp256r1Keccak256, ref.
https://github.com/neo-project/neo/pull/3209#issuecomment-2095798056.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2024-05-06 16:57:38 +03:00
parent 988440949b
commit 6e0926e59f
5 changed files with 13 additions and 13 deletions

View file

@ -199,7 +199,7 @@ func testECDSAVerify(t *testing.T, curve NamedCurveHash) {
runCase(t, true, false, msg, priv.PublicKey().Bytes(), sign, new(big.Int).Add(big.NewInt(math.MaxInt64), big.NewInt(1)))
})
t.Run("unknown curve", func(t *testing.T) {
runCase(t, true, false, msg, priv.PublicKey().Bytes(), sign, int64(123))
runCase(t, true, false, msg, priv.PublicKey().Bytes(), sign, int64(124))
})
t.Run("invalid signature", func(t *testing.T) {
s := priv.Sign(msg)