Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native: extend CryptoLib's verifyWithECDsa with compatible NamedCurveHash argument #1035

Merged
merged 4 commits into from May 11, 2024

Conversation

AnnaShaleva
Copy link
Member

@AnnaShaleva AnnaShaleva commented May 6, 2024

Port protocol-related part of neo-project/neo#3209.

Note, that build and tests are failing because we need to update neo git submodule. We can merge neo-project/neo#3209 firstly, and then update the neo submodule onto the fresh master. Then I'll rebase this PR and check that tests are passed.

@Jim8y
Copy link
Contributor

Jim8y commented May 6, 2024

@AnnaShaleva anna, we are not going to add secp256k1 support here. Core only do verification, no construction.

@AnnaShaleva
Copy link
Member Author

AnnaShaleva commented May 6, 2024

This code is needed for verification only. In neo-project/neo#3209 we extend the native CryptoLib's verifyWithECDsa parameter, so that both Sha256 and Keccak256 hashes may be checked. We need this PR.

Jim8y
Jim8y previously approved these changes May 6, 2024
Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will wait until the dependent PR is merged.

Jim8y
Jim8y previously approved these changes May 10, 2024
@AnnaShaleva
Copy link
Member Author

AnnaShaleva commented May 10, 2024

Can’t be merged yet, I need to update dependencies.

@vncoelho
Copy link
Member

I imagined that, fetch git as well

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>
Mark VerifyWithECDsa method as obsolete.

Ref. native CryptoLib update from neo-project/neo#3209.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Use 122 and 123 respectively for secp256k1Keccak256 and
secp256r1Keccak256.

Port the
neo-project/neo@e7d9122.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Released commit 1d957922a1aec90d0ec852402dc6eca496841ed4.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva
Copy link
Member Author

Updated, ready for review and merge.

@Jim8y Jim8y merged commit ac6e7c3 into master May 11, 2024
4 checks passed
@Jim8y Jim8y deleted the cryptolib-upd branch May 11, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants