Henry de Valence
7f39656b4a
Apply the Elligator map twice to ensure a uniform distribution
...
As noted in the Decaf paper, mapping twice and adding the results ensures a
uniform distribution over the group. This changes our random point and
hash-to-point functions to do this, matching the Sage script.
2018-03-19 15:37:38 -07:00
Isis Lovecruft
de90f16994
Merge branch 'feature/dalek-rs-assets' into develop
2018-03-12 19:50:56 +00:00
Henry de Valence
3969d80c89
Add links to dalek.rs
2018-02-21 11:11:17 -08:00
Henry de Valence
0f185d3e28
Generalize trait bounds on multiscalar multiplication.
...
This allows iterators returning either &Scalars or Scalars, so that it's
possible to use map() and friends to adjust scalars as they're being fed into
the multiscalar multiplication.
2018-02-20 18:31:23 -08:00
Isis Lovecruft
cd112afff5
Whitespace EOL fixes.
2018-01-31 02:19:53 +00:00
Henry de Valence
d4d9d86d72
Fix up coffee/ristretto reference
2018-01-26 15:35:51 -08:00
Henry de Valence
12e658401c
Reword Ristretto intro
2018-01-26 14:53:31 -08:00
Henry de Valence
52904b5c3e
Use math for multiscalar docs
2018-01-26 13:39:11 -08:00
Henry de Valence
4b47087b40
Refactor Ristretto notes into doc and doc-internal sections.
2018-01-26 13:35:30 -08:00
Henry de Valence
fbd84af767
Ristretto API docs fixups
2018-01-25 17:34:57 -08:00
Isis Lovecruft
4f37785f0e
Rename ExtendedPoint to EdwardsPoint.
2018-01-25 02:56:38 +00:00
Henry de Valence
52d600db95
Implement public-facing ops traits on all combos of &T/T
...
The public-facing types with arithmetic operations are:
- `Scalar`s
- `ExtendedPoint`s
- `RistrettoPoint`s
For these types we define operators with all combinations of borrowed and
non-borrowed inputs, to avoid forcing API consumers to write extra ampersands.
Since all of the operations involved with these types are expensive relative to
the cost of an unnecessary copy, this isn't a big deal.
The `MontgomeryPoint` struct isn't included in the above because it's only
useful for scalar multiplication.
This commit is based on work by @UnlawfulMonad.
2018-01-24 11:05:06 -08:00
Henry de Valence
1f821d34a5
Feature-gate batch inversion and compression on alloc
2018-01-19 17:22:28 -08:00
Henry de Valence
b20ccbd685
Implement batched encoding for RistrettoPoints
2018-01-19 17:22:28 -08:00
Isis Lovecruft
9a49263752
Add to_bytes() convenience method for CompressedRistretto points.
2017-11-26 03:22:28 +00:00
Henry de Valence
2d69a8a7dc
Eliminate array_ref dependency
2017-11-20 14:53:08 -08:00
Henry de Valence
0cb70ae032
Hide the underlying ExtendedPoint from a Ristretto point
2017-11-17 15:50:58 -08:00
Henry de Valence
8d0808a077
Split internal curve models into a private submodule
2017-11-16 17:34:28 -08:00
Henry de Valence
83e20b5387
cfg-gate all tests using precomputed tables
2017-11-16 12:13:13 -08:00
Henry de Valence
a7835a1246
UPPERCASE_GLOBALS and add documentation
2017-10-30 17:33:23 -07:00
Henry de Valence
d08c3d252b
fix std/alloc dep for multiscalar_mult for RistrettoPoints
2017-10-30 16:34:36 -07:00
Henry de Valence
8c3ae7f010
Remove 'yolocrypto' from Ristretto
2017-10-30 16:34:36 -07:00
Henry de Valence
b6bfc79cd1
Fix up Elligator tests to match ristretto.sage
2017-10-30 16:34:36 -07:00
Henry de Valence
f4135da5c9
Remove is_negative_decaf since ristretto uses the low bit
2017-10-30 16:34:36 -07:00
Henry de Valence
21101a7d71
Add test vectors from ristretto.sage
2017-10-30 16:34:36 -07:00
Henry de Valence
8e21c0b4f0
Start writing down some notes on the compression procedure
2017-10-30 16:34:36 -07:00
Henry de Valence
98c34adf6d
Change to Ristretto test vectors.
2017-10-30 16:34:36 -07:00
Henry de Valence
7097d8f98e
Add Ristretto equality
2017-10-30 16:34:36 -07:00
Henry de Valence
fafdae7a60
Prototype of Ristretto encoding
2017-10-30 16:34:36 -07:00
Henry de Valence
58a55117be
Rename Decaf to Ristretto
2017-10-30 16:34:36 -07:00