Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Native: extend CryptoLib's
verifyWithECDsa
with compatible `NamedCu…
…rveHash` argument (#1035) * Native: mark NamedCurve enum as deprecated It will be replaced by NamedCurveHash in the next commit. A part of neo-project/neo#3209. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * Native: replace NamedCurve enum with NamedCurveHash enum Mark VerifyWithECDsa method as obsolete. Ref. native CryptoLib update from neo-project/neo#3209. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * Native: update NamedCurveHash values for Keccak256 hasher Use 122 and 123 respectively for secp256k1Keccak256 and secp256r1Keccak256. Port the neo-project/neo@e7d9122. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * neo: fetch 3.7.1 version of the neo core Released commit 1d957922a1aec90d0ec852402dc6eca496841ed4. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> --------- Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
- Loading branch information
1 parent
160e8b7
commit ac6e7c3
Showing
8 changed files
with
101 additions
and
9 deletions.
There are no files selected for viewing
Submodule neo
updated
9 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (C) 2015-2024 The Neo Project. | ||
// | ||
// The Neo.SmartContract.Framework is free software distributed under the MIT | ||
// software license, see the accompanying file LICENSE in the main directory | ||
// of the project or http://www.opensource.org/licenses/mit-license.php | ||
// for more details. | ||
// | ||
// Redistribution and use in source and binary forms with or without | ||
// modifications are permitted. | ||
|
||
using System; | ||
|
||
namespace Neo.SmartContract.Framework.Native | ||
{ | ||
/// <summary> | ||
/// 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> | ||
public enum NamedCurveHash : byte | ||
{ | ||
/// <summary> | ||
/// The secp256k1 curve and SHA256 hash algorithm. | ||
/// </summary> | ||
secp256k1SHA256 = 22, | ||
|
||
/// <summary> | ||
/// The secp256r1 curve, which known as prime256v1 or nistP-256, and SHA256 hash algorithm. | ||
/// </summary> | ||
secp256r1SHA256 = 23, | ||
|
||
/// <summary> | ||
/// The secp256k1 curve and Keccak256 hash algorithm. | ||
/// </summary> | ||
secp256k1Keccak256 = 122, | ||
|
||
/// <summary> | ||
/// The secp256r1 curve, which known as prime256v1 or nistP-256, and Keccak256 hash algorithm. | ||
/// </summary> | ||
secp256r1Keccak256 = 123 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters