Skip to content

Commit

Permalink
Native: update NamedCurveHash values for Keccak256 hasher
Browse files Browse the repository at this point in the history
Use 122 and 123 respectively for secp256k1Keccak256 and
secp256r1Keccak256.

Port the
neo-project/neo@e7d9122.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
  • Loading branch information
AnnaShaleva committed May 6, 2024
1 parent 5936f6e commit 60bfc54
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Neo.SmartContract.Framework/Native/NamedCurveHash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ namespace Neo.SmartContract.Framework.Native
/// Represents a pair of the named curve used in ECDSA and a hash algorithm used to hash message.
/// This is a compatible extension of an obsolete <see cref="NamedCurve"/> enum.
/// </summary>
/// <remarks>
/// https://tools.ietf.org/html/rfc4492#section-5.1.1
/// </remarks>
public enum NamedCurveHash : byte
{
/// <summary>
Expand All @@ -34,11 +31,11 @@ public enum NamedCurveHash : byte
/// <summary>
/// The secp256k1 curve and Keccak256 hash algorithm.
/// </summary>
secp256k1Keccak256 = 24,
secp256k1Keccak256 = 122,

/// <summary>
/// The secp256r1 curve, which known as prime256v1 or nistP-256, and Keccak256 hash algorithm.
/// </summary>
secp256r1Keccak256 = 25
secp256r1Keccak256 = 123
}
}

0 comments on commit 60bfc54

Please sign in to comment.