Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Switched to coincurve #713

Closed
wants to merge 2 commits into from
Closed

Switched to coincurve #713

wants to merge 2 commits into from

Conversation

cag
Copy link
Contributor

@cag cag commented Apr 28, 2017

See #708

Basically secp256k1-py looks like it is not maintained anymore. I don't know where the original maintainer went, but coincurve seems actively maintained, so here it is.

@ofek I do have one gripe with this migration: I don't like having to use the identity function as the hasher parameter: that feels like a hack. As far as deviating from the original API goes, I feel like the right move would have been to accept hashlib objects, default to hashlib.sha256, and have None indicate a lack of a need for a hasher. Still, this is up for debate, and I don't want to throw the baby out with the bathwater, as this library is still overall an improvement.

P.S. I had to regenerate my tox environment in order to test this with tox.

@ofek
Copy link
Contributor

ofek commented Apr 28, 2017

@cag Thanks for the interest in coincurve.

  1. I'm open to accepting None for hasher param to indicate no hashing is needed. However, please keep in mind that if we choose to do that then it would be necessary to check that the message is already 32 bytes long. It's an ECDSA invariant that must be maintained due to our particular curve's group.
  2. In the spirit of giving users as many options as possible, I won't mandate hasher have any particular API e.g. hasher(data).digest(). Coincurve will continue assuming hasher(data) returns the necessary hash as bytes. After all, users might want to use a non-stdlib hashing function. Also fyi, hasher does default to sha256.

Let me know want you'd like me to do :)

@cag
Copy link
Contributor Author

cag commented Apr 28, 2017 via email

@ofek
Copy link
Contributor

ofek commented Apr 28, 2017

@cag Travis will deploy 4.5.0 soon ofek/coincurve@6da9164

@cag
Copy link
Contributor Author

cag commented Apr 28, 2017 via email

@ofek
Copy link
Contributor

ofek commented Apr 28, 2017

I'll inform you when deploy is finished as Travis is choking today https://travis-ci.org/ofek/coincurve/builds/226951924

@ofek
Copy link
Contributor

ofek commented Apr 29, 2017

@cag 4.5.1 is ready

@cag
Copy link
Contributor Author

cag commented Apr 29, 2017 via email

@ofek
Copy link
Contributor

ofek commented Apr 29, 2017

All tests pass.

@ofek
Copy link
Contributor

ofek commented May 11, 2017

@cag Hey could you please rebase when you get a chance?

@cag
Copy link
Contributor Author

cag commented May 12, 2017

Good lord, I tried rebasing and got hit with a ton of py3.6 compat issues and other such things. :(

Just confirmed develop tests error for me...

@ofek
Copy link
Contributor

ofek commented May 12, 2017

What tests?

@cag
Copy link
Contributor Author

cag commented May 12, 2017

This repo's tests. I am getting the same as TravisCI, and I can't really test any changes to until this gets resolved:

https://travis-ci.org/ethereum/pyethereum/jobs/229488532

@ofek
Copy link
Contributor

ofek commented Jul 19, 2017

@cag Could you please see if this works now?

@cag
Copy link
Contributor Author

cag commented Jul 19, 2017 via email

@cag cag closed this Aug 4, 2017
@cag cag mentioned this pull request Aug 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants