Isis Lovecruft
f6930997d2
Make #[feature(test)] depend on #[cfg(all(test, feature = "bench"))].
...
* FIXES Issue #38 :
https://github.com/isislovecruft/curve25519-dalek/pull/38
2017-03-14 01:59:08 +00:00
Isis Lovecruft
3882a41d27
Remove test_ prefix from tests in scalar module.
2017-03-14 01:58:39 +00:00
Isis Lovecruft
4afe4ae37f
Move scalar module benchmarks to separate module.
2017-03-14 01:52:42 +00:00
Henry de Valence
b61ed818b8
Remove all remaining warnings
2017-03-07 01:37:31 -08:00
Isis Lovecruft
f48947fb57
Merge remote-tracking branch 'hdevalence/feature/some-cleanup-tweaks' into develop
2017-02-28 05:50:22 +00:00
Henry de Valence
fe15bc1d0b
Add note on fn main() in doctest
2017-02-27 11:22:07 -08:00
Henry de Valence
a93798d209
Add a function to hash a byte slice to a scalar.
2017-02-27 11:19:06 -08:00
Henry de Valence
e5c0d789fd
Add a Scalar::as_bytes() method.
2017-02-26 15:25:05 -08:00
Henry de Valence
950519b97b
Implement Debug for Scalar
2017-02-26 15:25:05 -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
5308fef210
Add CTEq trait and implement it for Scalar.
2017-02-21 05:44:35 +00:00
Isis Lovecruft
7b57be69fd
Implement constant time equality check for scalars.
2017-02-21 05:41:14 +00:00
Isis Lovecruft
32da4c7d50
Implement Neg for Scalar.
2017-02-21 05:41:14 +00:00
Isis Lovecruft
8c432ef78a
Another obsessive compulsive whitespace fix.
2017-02-21 01:46:01 +00:00
Isis Lovecruft
1e7199dcc4
Remove now unused core::clone::Clone from scalar.
2017-01-27 02:16:30 +00:00
Isis Lovecruft
d88b6c01c4
Merge remote-tracking branch 'tarcieri/no-std' into develop
2017-01-27 02:13:04 +00:00
Isis Lovecruft
39f417f75e
Merge remote-tracking branch 'hdevalence/feature/move-ct-traits' into develop
2017-01-20 21:51:19 +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
63e7e9f8de
Implement CTAssignable for Scalar
2017-01-06 12:56:53 -05:00
Henry de Valence
ef2987349f
Add bench for unpacked multiply_add
2016-12-23 13:01:16 -08:00
Henry de Valence
85d4b7e98c
Split the Scalar type into Scalar and UnpackedScalar
...
The Scalar type is stored in memory as an array of bytes. This allows easy
access to the bits of a scalar for Scalar x Point operations, at the cost of
forcing a pack/unpack for Scalar x Scalar. This commit splits the Scalar type
into Scalar (packed) and UnpackedScalar (limbs).
2016-12-23 12:49:00 -08:00
Henry de Valence
e2dfa17879
Add fixme on load3/4 as utilities
2016-12-23 10:03:30 -08:00
Isis Lovecruft
c9b0e45afb
Specify the RNG for Scalar::random.
2016-12-14 05:54:22 +00:00
Henry de Valence
c6b1b497b0
Add benchmark for Scalar::random()
2016-12-09 17:45:54 -08:00
Henry de Valence
d8476fe6cf
Add a Scalar::random() constructor
...
This adds a dependency on the `rand` crate, used to construct an
OS-backed CSPRNG. The implementation in this commit is somewhat
inefficient as it constructs a new OsRng object every time; it might be
better to construct it once. (Seems like a lot of overhead for a few
getrandom(2) calls...)
2016-12-09 17:38:51 -08:00
Isis Lovecruft
387a56fe2c
Initial commit.
2016-12-08 05:12:00 +00:00