Henry de Valence
1febf3f753
Add an invsqrt_ratio function.
2017-02-22 20:59:50 -08:00
Henry de Valence
a202f36916
Rewrite invsqrt to avoid using an Option type.
2017-02-22 16:24:11 -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
ee5958c407
Add is_[non]negative_decaf functions.
...
Computes whether a point is nonnegative in the same way as Mike Hamburg's code.
2017-02-21 13:37:50 -08:00
Henry de Valence
3fc5f75300
Rename is_negative to is_negative_ed25519
2017-02-21 13:23:57 -08:00
Henry de Valence
cb4ff3097c
Add FieldElement::is_zero()
2017-02-21 13:23:10 -08:00
Isis Lovecruft
e4d041836e
Move load3 and load4 to new utils module and remove #[allow(dead_code)].
2017-02-21 06:15:08 +00:00
Isis Lovecruft
6f67a7d716
Rename util module to subtle.
...
* CHANGE subtle module documentation slightly to clarify the module's purpose.
* FIXES issue #25 .
2017-02-21 06:01:22 +00:00
Isis Lovecruft
b1afdf5204
Implement CTEq for FieldElement.
2017-02-21 05:44:35 +00:00
Isis Lovecruft
51f59565f5
Typo fix; Negateable → Negatable.
...
* Fixup on #22 .
2017-02-21 04:15:15 +00:00
Henry de Valence
8a1c13ef49
Make a CTNegateable trait with a generic impl for better ergonomics
2017-02-20 15:30:59 -08:00
Henry de Valence
5f4de0074d
Add a conditional negation function.
2017-02-20 15:30:59 -08:00
Isis Lovecruft
5f70ab55f8
Obsessive compulsive whitespace fix.
2017-02-20 01:58:56 +00:00
Isis Lovecruft
d88b6c01c4
Merge remote-tracking branch 'tarcieri/no-std' into develop
2017-01-27 02:13:04 +00:00
Tony Arcieri
d08bc7395e
Add #![no_std] ( fixes #16 )
...
Use ::core in lieu of ::std, allowing this crate to be usable in #![no_std]
environments.
Gates features that presently depend on ::std (presently just rand) behind a
"std" cargo feature, which is enabled by default.
2017-01-18 15:16:01 -08:00
Henry de Valence
74049e039e
Make FieldElement's conditional_assign a trait impl
2017-01-06 12:34:57 -05:00
Henry de Valence
c92ebdd0ac
Remove unused conditional_choose function
2017-01-06 12:29:24 -05:00
Isis Lovecruft
387a56fe2c
Initial commit.
2016-12-08 05:12:00 +00:00