Henry de Valence
0678e619cc
Implement Mul for basepoint tables
2017-05-03 19:32:30 -07:00
Henry de Valence
6ea1d4dad2
Add an implementation of Scalar inversion
2017-04-28 22:59:56 -07:00
Henry de Valence
b5ccb42759
Rename lminus1 to l_minus_1
2017-04-28 22:54:00 -07:00
Henry de Valence
73e172484c
Add tick marks around code items in docs
2017-04-02 23:12:18 +02:00
Henry de Valence
cf9f9aa402
Enable radix_51 on nightly
2017-03-13 17:04:37 -07:00
Henry de Valence
d6465ccd5e
Fix remaining compile errors for radix_51
2017-03-13 16:38:05 -07:00
Henry de Valence
3eab4acbd8
Add p constant for subtraction
2017-03-13 16:38:05 -07:00
Henry de Valence
08ef9e5d1e
Add constants in radix_51 form
2017-03-13 16:38:05 -07:00
Henry de Valence
afd42a4628
More feature-gating
2017-03-13 16:38:05 -07:00
Henry & Isis
c873f725a5
Rename BasepointTable as EdwardsBasepointTable.
2017-03-13 15:50:43 -07:00
Henry de Valence
640f40287f
Wrap the existing basepoint table as a BasepointTable
2017-03-13 15:50:43 -07:00
Henry de Valence
b61ed818b8
Remove all remaining warnings
2017-03-07 01:37:31 -08:00
Henry de Valence
0585af6c68
Move sqrt(-(A+2)) test to constants.rs
2017-03-07 00:03:59 -08:00
Henry & Isis
e5f5dea444
Rename to_{cached,precomputed} to to_{projective,affine}_niels
2017-03-05 15:27:26 -08:00
Henry de Valence
45fbcb45f6
First notes and code on Montgomery conversion
2017-02-27 13:41:50 -08:00
Isis Lovecruft
e6b7192d5e
Merge branch 'feature/rename-niels-point' into develop
2017-02-25 01:26:33 +00:00
Isis Lovecruft
a649ea38ee
Rename {PreComputed,Cached}Point → {Affine,Projective}NielsPoint.
...
* FIXES Issue #28 : https://github.com/isislovecruft/curve25519-dalek/issues/28
2017-02-25 00:47:06 +00:00
Henry de Valence
a202f36916
Rewrite invsqrt to avoid using an Option type.
2017-02-22 16:24:11 -08:00
Henry de Valence
f93dd4ccf5
Use is_identity() in the torsion subgroup tests.
...
ht @dconnolly for pointing this out
2017-02-21 15:13:18 -08:00
Henry & Isis
f52e2ee37e
Create BasepointMult and ScalarMult traits.
2017-02-21 13:38:59 -08:00
Henry de Valence
a415caa9fb
Add a seperate invsqrt function.
...
This code isn't constant-time, but maybe should be. However that would
prevent a bunch of nice things (e.g., Option types). Probably good to
think about this.
2017-02-21 13:38:58 -08:00
Henry de Valence
5720e249ab
Add constants for points of the eight-torsion subgroup.
2017-02-21 13:23:57 -08:00
Henry de Valence
82041c2c67
Add constant for bytes of (p-1)/2.
2017-02-21 13:23:11 -08:00
Henry de Valence
363ea405d4
Add constant for a-d = -1-d
2017-02-21 13:23:11 -08:00
Henry de Valence
6fd3028956
Add constant for 4*d
2017-02-21 13:23:10 -08:00
Henry de Valence
fb0c431184
Add constant for MSQRT_M1, equal to -SQRT_M1
2017-02-21 13:23:10 -08:00
Henry de Valence
e1feb653be
Add constant value of 1/2 (mod p)
2017-02-21 13:23:10 -08:00
Isis Lovecruft
32da4c7d50
Implement Neg for Scalar.
2017-02-21 05:41:14 +00:00
Isis Lovecruft
d4cccbc4d8
Whitespace cleanup in constants module.
2017-01-27 01:38:56 +00:00
Isis Lovecruft
8c986fb3da
Allow non-snakecase in constants.
...
We follow the standard mathematical naming convention of lowercase to
denote affine coordinates and uppercase to for projective.
2017-01-27 00:34:38 +00:00
Isis Lovecruft
3f900e60bd
Change CompressedPoint in constants module to CompressedEdwardsY.
2017-01-27 00:33:59 +00:00
Henry de Valence
46bf69b80e
Test basepoint multiple generation
2017-01-09 16:15:23 -05:00
Henry de Valence
d94edc6a36
Move compressed basepoint into constants
...
Would be good to have the basepoint itself, but this doesn't seem possible: the
fields of an ExtendedPoint are not public, so we can't construct them outside
of curve.rs (by design, to prevent constructing invalid points). Maybe const
fn support could change this.
2017-01-09 16:15:22 -05:00
Henry de Valence
16b4be6663
Add fixme on SQRT_MINUS_A
2017-01-08 15:11:16 -05:00
Henry de Valence
7ee568780b
Shorten docstring on monty A value
2017-01-08 15:11:16 -05:00
Henry de Valence
8a5332b220
Remove unused, incorrect a value
...
This was presumably added for use with formulas that use two multiplications by
small constants (i.e., 121665 and 121666) instead of one multiplication by a
large constant (i.e., -121665/121666), but we don't use those formulas.
2017-01-08 15:11:16 -05:00
Henry de Valence
8fb9e44dd2
Test that d = -121665/121666
2017-01-08 15:11:16 -05:00
Henry de Valence
3f7d06138a
Test that SQRT_M1 is a square root of -1
2017-01-08 15:11:15 -05:00
Henry de Valence
a9e3c330a6
Move constants into its own module
2017-01-08 14:39:25 -05:00