Commit graph

1097 commits

Author SHA1 Message Date
Henry de Valence
e3bf9b0213 Add MultiscalarMul and VartimeMultiscalarMul traits.
These traits have the same interface, but with different names, so that it's
not possible to use them interchangeably.  (Constant-time and variable-time
routines should not be used interchangeably).

This commit changes the external API to use these traits, replacing
```
edwards::multiscalar_mul
edwards::vartime::multiscalar_mul
```
with
```
EdwardsPoint::multiscalar_mul (as an impl)
EdwardsPoint::vartime_multiscalar_mul (as an impl)
```
and similarly for Ristretto.

Refactoring the backend is for a later commit.

Multiscalar multiplication with precomputation is for a later commit.

The `edwards::vartime` module is retained since it's used for
`vartime_double_base_scalar_mul`.

It should be subsumed into the precomputation API in a later commit.
2018-05-15 11:33:38 -07:00
Isis Lovecruft
83280ca181
Fix travis no_std builds after merging #143. 2018-05-15 02:56:29 +00:00
Isis Lovecruft
32b561013f
Merge remote-tracking branch 'dalek/select-backend-in-build.rs' into develop 2018-05-15 02:27:41 +00:00
Henry de Valence
34c43c20a9 Rework backend selection code.
Each backend can now be selected by an individual feature:

- `u32_backend` for `backend::u32`;
- `u64_backend` for `backend::u64`;
- `avx2_backend` for `backend::avx2`;

The `u64_backend` is selected by default, since most people use X64 and we have
no way to select based on target (see discussion in #126).  However, these
changes mean that it is possible to select the backend explicitly, and if we
had the ability to select target-default features, we could do so easily.
2018-05-14 17:43:54 -07:00
Henry de Valence
9b6c932635 Rename 'precomputed_tables' to the more accurate 'stage2_build' 2018-05-14 15:41:45 -07:00
Henry de Valence
615095817b Merge branch 'master' into develop 2018-05-10 17:50:33 -07:00
Henry de Valence
696e965c39 Merge branch 'release/0.16.4' 2018-05-10 17:50:17 -07:00
Henry de Valence
7b802c7bf5 Bump version to 0.16.4 2018-05-10 17:46:37 -07:00
Henry de Valence
4bc75792e6
Merge pull request #138 from oleganza/byteorder-nostd
Disable default features in byteorder dependency to be no_std-compatible
2018-05-10 17:18:34 -07:00
Oleg Andreev
2a1e122300 disable default features in byteorder dependency to be no_std-compatible 2018-05-10 15:13:50 -07:00
Henry de Valence
62bb6b79a1
Merge pull request #134 from Mandragorian/feature-scalar-traits
Implement Product and Sum traits
2018-05-03 13:56:45 -07:00
Henry de Valence
9375405f20
Merge pull request #136 from dalek-cryptography/fix-avx2-build
Fix AVX2 build on recent nightlies (was broken due to type inference failure)
2018-05-03 13:53:20 -07:00
mandragore
96d2fe4905 Implement Sum trait for RistrettoPoint
Closes #131.
2018-05-03 03:42:37 +03:00
mandragore
aff69a58a4 Implement Sum trait for EdwardsPoint 2018-05-03 03:42:37 +03:00
Henry de Valence
185bbd3da8 Fix build on recent nightlies (was broken due to type inference failure) 2018-05-02 17:30:10 -07:00
mandragore
01fd44ffd2 Remove trailing whitespaces 2018-05-02 23:53:52 +03:00
mandragore
3ab087ea7f Implement Sum trait for Scalar 2018-05-02 23:53:49 +03:00
mandragore
afffe962f9 Implement Product trait for Scalar 2018-05-02 23:53:24 +03:00
Henry de Valence
c326d8b665 Merge branch 'master' into develop 2018-04-09 12:27:09 -07:00
Henry de Valence
d44a0c9e04 Merge branch 'release/0.16.3' 2018-04-09 12:26:54 -07:00
Henry de Valence
e492ac63d0 Bump version to 0.16.3 2018-04-09 09:50:03 -07:00
Henry de Valence
285e57f2ff
Merge pull request #128 from hdevalence/feature/avx2-docs
Update docs for AVX2 backend
2018-04-08 17:16:05 -07:00
Henry de Valence
67ba201835 Update AVX2 documentation 2018-04-08 16:59:57 -07:00
Henry de Valence
6bb2c02a1f
Merge pull request #127 from hdevalence/feature/generalize-naf
Generalize NAF code to wider window sizes.
2018-04-08 16:39:45 -07:00
Henry de Valence
1464c4101d change LSB to least significant bit 2018-04-08 16:29:54 -07:00
Henry de Valence
9fc5602ce7 Split AVX2 docs into markdown file 2018-04-08 15:15:23 -07:00
Henry de Valence
85dd3329fb Merge branch 'master' into develop 2018-04-06 15:14:06 -07:00
Henry de Valence
5d1f0a4ca6 Merge branch 'release/0.16.2' 2018-04-06 15:13:53 -07:00
Henry de Valence
dc563c7415 Bump version to 0.16.2
Only change is better Ristretto docs
2018-04-06 15:11:08 -07:00
Henry de Valence
d2cdc878d6
Merge pull request #124 from hdevalence/feature/ristretto-docs
Update & expand Ristretto docs
2018-04-06 15:07:58 -07:00
Henry de Valence
68bbd1bd03 Document algorithm for NAFs 2018-04-06 12:11:59 -07:00
Henry de Valence
6b768c2a1a Change AVX2 backend to use width-8 tables 2018-04-05 16:20:47 -07:00
Henry de Valence
e30d764b7f Add eq testing stub 2018-04-05 14:52:01 -07:00
Henry de Valence
9aa208959d split into new Ristretto Group section 2018-04-05 14:52:01 -07:00
Henry de Valence
dbca373639 Promote headers 2018-04-05 14:52:01 -07:00
Henry de Valence
f446ea82e0 Explicit decoding formulas 2018-04-05 14:52:01 -07:00
Henry de Valence
35c18cfc51 Stub out remaining sections, add overview of batching 2018-04-05 14:52:01 -07:00
Henry de Valence
b713274890 Describe encoding better and more generally 2018-04-05 14:52:01 -07:00
Henry de Valence
5385399854 Use Q_4 instead of T_4
T_4 is nicer because it sounds like "torsion", but T is also used as a variable in ext. coordinates, so Q is better overall since it avoids conflicts later.
2018-04-05 14:52:01 -07:00
Henry de Valence
34a6de83e0 Split out torquing section to cover cof=4 case better 2018-04-05 14:52:01 -07:00
Henry de Valence
fbee5e252c Split explanation of encoding formulas 2018-04-05 14:52:01 -07:00
Henry de Valence
25024a63bc Add dual isogeny 2018-04-05 14:52:01 -07:00
Henry de Valence
3f68349480 Fix whitespace characters 2018-04-05 14:52:01 -07:00
Henry de Valence
862dd33695 Add link to curve models 2018-04-05 14:52:01 -07:00
Henry de Valence
83c3d97651 clarify wording 2018-04-05 14:52:01 -07:00
Henry de Valence
c2d409788a Add links, tweak intro 2018-04-05 14:52:01 -07:00
Henry de Valence
ff787c2f12 Clarify Ristretto / Decaf relation in user docs 2018-04-05 14:52:00 -07:00
Henry de Valence
c99bd62b25 Add example to RistrettoBasepointTable 2018-04-05 14:52:00 -07:00
Henry de Valence
46048e451b Clarify wording on canonical scalars 2018-04-05 14:52:00 -07:00
Henry de Valence
35e1b07e72 Clarify abstraction layers in Ristretto intro 2018-04-05 14:52:00 -07:00