Giter Club home page Giter Club logo

Comments (1)

burdges avatar burdges commented on June 26, 2024

How should constant-time be handled in arkworks?

We could provide constant time methods within the regular traits, or use a feature gate, but could we really implement constant-time operations uniformly for all curves of a given type? Is constant-time a guarantee that requires testing? If we used a feature gate, then what performance cost?

We could provide some new ConstantTimeGroup trait with constant-time operations, but now code cannot be polymorphic over constant-time and non-constant-time operations. An issue with constant time methods too.

I'd tentatively suggest we have separate constant-time curves models implemented on a pub struct ConstantTime<C>(pub C); wrapper over the original non-constant-time representation, but which implement the non-constant-time operations. If you need constant-time then you need where A: AffineRepr, ConstantTime<A>: AffineRepr or where G: CurveGroup, ConstantTime<G>: CurveGroup. Yet, you could pass ConstantTime<A> into polymorphic code to get constant-time code, well hopefully.

We've two initial questions: Does mul_bigint make doing this tricky? We've few constant-time uses for pairings, but IBE makes sense, so could a wrapper like this play nicely with pairings? If no and yes, we'd provide constant-time BLS12 pairings but not MNT or BN or CP or BW, but constant-time SW code might still works outside BLS12, or maybe we only provide constant-time TE curves.

As an aside, miracl/amcl claimed constant-time, but this claim disappeared when deprecated for miracl/core.

from algebra.

Related Issues (20)

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.