Use uECC instead of Crypto++ for ECDH#11
Conversation
|
One of the steps to get rid of libcrypto++ |
|
Nice! Will test on the various OSs (hopefully jenkins can do this too!) |
There was a problem hiding this comment.
I don't think we should remove this check and/or may need to add a flag (default to verify) for toPublic.
There was a problem hiding this comment.
The check is done in toPublic anyway, it will return zero in case of invalid key. As far as I understand crypto++ validate() checks for curve validity, which is not needed for libsecp256k1 anyway and also checks that the point is valid on the curve, which secp256k1_ec_pubkey_create also does.
The previous behavior of this function for invalid secret was to set m_secret to invalid key, but leave m_public and m_address to the previous value. With this change m_public and m_address will be set to zero, which is better since these don't throw anyway.
|
Maybe a newbe question, but why not ECDH from secp256k1? |
|
Last time I checked It was not supported. At least the version in webthree-helpers does not have any API for ECDH |
|
It is implemented as a module in upstream repo: Can you verify that this short implementation is good for us? |
|
This header is not enough, we need to update the library. I will try and do that |
|
@subtly had opinions about upgrading secp256k1. |
|
Go integration of libsecp256k1 ECDH: ethereum/go-ethereum#1862 |
|
dropped in favor of libsecp256k1 |
No description provided.