-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
crypto.ecdsa: expand ecdsa module to support another curve. #23407
base: master
Are you sure you want to change the base?
Conversation
Hmm... if this is tied directly to openssl, that's not a good thing. V ships with mbedtls, so it should work with that (if it can). Otherwise, there is a command line option to tell V to work with openssl, so that option should be checked, rather than hard-coding openssl support. |
The current |
Ugh. I missed that in ecdsa, then. That should be fixed, too. Hard-coding to wrap openssl can lead to too many problems, especially on Windows (or any other os/distro) which doesn't have it installed by default. |
@JalonSolov that's a decision I made after lots of research. Writing it in pure V was not an option, can't translate from Go due to assembly usage. mbedtls is 2.5 times slower, and this needs critical performance. |
|
I would check it and try to resolve on next iteration |
There are lack of functionality commonly
needed in the
crypto.ecdsa
module.Some of them are
ecdaa.PrivateKey.sign(message)
does not work on hash (digest) of the message, but its work on message directly.. Its not recommended working on signing messages directly.This PR address some of them issue, by adding and expand support for another popular ecc curve, ie,
secp384r1
curvesecp521r1
curve|secp256k1
curve used in bitcoin ecosystem.This PR also add a routine to sign message with options to use irecommended hash function or custom hash (maybe its can be unified with the current sign routine)
This PR also add a routine to load a public key part from bytes array, commonly parsed from pem-formatted public key file.
This PR was a first time i was working with c wrapping, so, i'm totally noob in the sense, please give its a review.
Huly®: V_0.6-21838