-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
Use libsecp256k1 for scalar mult in ECDH in ECIES #883
Labels
Comments
2 tasks
There is now a PR which adds ECDH at the API level: bitcoin-core/secp256k1#252 Once it's merged we should be able to use it for ECDH in ECIES. |
Sure. Let's integrate that post frontier |
This is now done on develop (#1862). |
tony-ricciardi
pushed a commit
to tony-ricciardi/go-ethereum
that referenced
this issue
Jan 20, 2022
maoueh
pushed a commit
to streamingfast/go-ethereum
that referenced
this issue
Jun 9, 2023
) * updated Indore HF related changes by adding stateSyncConfirmationDelay * converted StateSyncConfirmationDelay to map[string]uint64 and cleanup * calculate last state ID from incoming state object with eth call (ethereum#883) * removed IndoreBlock from configs * fix * remove code duplication and refactor --------- Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Profiling of a running Go node shows that we spend a significant amount of CPU time in the EC scalar multiplication used when deriving the shared secret in ECDH in ECIES for the encrypted handshake: https://github.com/ethereum/devp2p/blob/master/rlpx.md#encrypted-handshake
The idea is that we should be able to replace the Go code for this multiplication with libsecp256k1 which is highly optimized for this operations.
See: https://github.com/ethereum/go-ethereum/blob/develop/crypto/curve.go#L182
And: https://github.com/bitcoin/secp256k1/blob/master/src/ecmult.h
First attempt at integrating this: https://github.com/Gustav-Simonsson/go-ethereum/tree/scalar_mult
Why the result is different for the same input is unknown - could be we're using the library wrong somehow.
The text was updated successfully, but these errors were encountered: