Comments (1)
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)
- Implement `Deref` trait for `BigInt` HOT 3
- Use `in_place` suffix for `BigInteger` operations HOT 1
- Optimize `add_assign` operation for Projective coordinates in Short Weierstrass model
- Unify `BitIteratorBE` and `BitIteratorLE` with an `Endian` enum
- TWO_ADICITY check in Radix2EvaluationDomain for BW6-767 HOT 5
- Add normalization to `FpConfig` for `PartialEq` and `Eq` HOT 3
- The current GLV implementation may not be correct HOT 3
- Can arm64 also be optimized for field arithmetic operation? HOT 1
- Ark-ec pulls in full hashbrown without feature gate HOT 6
- New release? HOT 4
- Final exponentiation in BLS12-381not producing `(p ^ k - 1) / r` HOT 1
- Support mapping to all Weierstrass curves (Shallue-van de Woestijne method) HOT 1
- why is `Validate::No` hardcoded in some `impl`s? HOT 3
- know if a serialized piece of Arkworks structure has been compressed HOT 3
- Support for ristretto255 / sr25519 curve HOT 3
- `Affine - Projective` produces incorrect results
- `SparseMultillinearExtension::evaluate` is slow HOT 1
- Constant time curve arithmetic HOT 1
- Release with #794 HOT 1
- Necessity to retire "derivative" crate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from algebra.