ethereum / py_ecc

Python implementation of ECC pairing and bn_128 and bls12_381 curve operations
MIT License
191 stars 82 forks source link

derive constants from BN parameter #3

Open cdetrio opened 6 years ago

cdetrio commented 6 years ago

Its a bit more intuitive to derive the various constants from the minimal set of magic numbers.

pipermerriam commented 6 years ago

@cdetrio I'm not really qualified to judge the correctness of this PR but if you'd still like to merge these changes what do you think about:

  1. Rebasing and fixing the conflicts
  2. Adding some basic test cases (assuming there are some worth adding)