Commit graph

17 commits

Author SHA1 Message Date
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