Giter VIP home page Giter VIP logo

ecfactory's Issues

OverflowError - int too large to convert to C long

Hello,

While trying to run in cocks_pinch_example.py the first example cp.gen_params_from_r(r,k) using large values for r, for example a 256-bit long integer, I run into this issue :

   5361         """
   5362         if isinstance(b, int):
-> 5363             return mpz_kronecker_si(self.value, b)
   5364         if not isinstance(b, Integer):
   5365             b = Integer(b)

OverflowError: Python int too large to convert to C long

Have you run into this issue before ? If yes, how can you handle large integers that fit the standard recommandation of 128-bit level ?

Thanks !

Subgroup security of the BN curve searching

The current implementation in ecfactory to search BN curves did not evaluate the subgroup security, as discussed in https://eprint.iacr.org/2015/247.pdf.

Mainly, pairing might be subject to subgroup attacks. To prevent such attacks, this paper adds additional criteria on selecting good curves, by also requiring the h of the G_2 and G_T to have a large prime factor. This new requirement places a lot of constraints on the choices of parameters.

Note that the parameters of BN254 (which indeed has a historical meaning) in arkworks do not have such properties, since those parameters are sampled before this paper.

Therefore, it is left as a TODO to add BN curve searching algorithms that have subgroup security guarantees.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.