ethereum / eth-keys

A common API for Ethereum key operations.
MIT License
159 stars 64 forks source link

Remove local ECDSA utils in favor of using py_ecc API #47

Open pipermerriam opened 5 years ago

pipermerriam commented 5 years ago

What was wrong?

The py_ecc library is now the canonical location for the native python ecc code. This library still contains copies of that code and uses them

How can it be fixed?

Update to use the py_ecc versions and remove the local implementations from this library.

pipermerriam commented 5 years ago

Noting here that py-ecc is dropping some older python 3 version support: https://github.com/ethereum/py_ecc/pull/22

aashutoshrathi commented 5 years ago

Hey, @pipermerriam Is this issue similar to what I did here? I would like to take this up.

pipermerriam commented 5 years ago

Not exactly.

It'd be focused on removing these dependencies:

https://github.com/ethereum/eth-keys/blob/ce2aade354c77531babaa16669529082a7835f39/eth_keys/backends/native/main.py#L5-L9

In favor of using them directly from py_ecc, but.... currently, py_ecc doesn't expose these as public APIs so we would need to elevate them to be public APIs in the py_ecc library, and document them (probably in the README.md in the py_ecc repo. Then this library can import and use those primitives and remove the ecdsa.py and jacobian.py modules.

Also, it may be that the ecdsa.py and jacobian.py modules that are local here in this repo are favorable in terms of code style and organization so migrating that into the py_ecc repo might be good, but use your best judgement.