Isis Lovecruft
9363690191
Fix outdated docstring for verify_batch().
2019-12-11 22:48:33 +00:00
Isis Lovecruft
1be2a65777
Maybe I should try compiling my code before showing other cryptographers?
...
lol
2019-11-26 22:57:24 +00:00
Isis Lovecruft
ec551145e9
Add message lengths into nonce generator protocol transcript.
2019-11-22 23:21:01 +00:00
Isis Lovecruft
bd6a897729
Actually use the transcript PRNG.
2019-11-22 23:40:46 +00:00
Isis Lovecruft
85a218ac40
Implement deterministic batch verification and synthetic nonce generation.
2019-11-22 23:29:14 +00:00
Isis Lovecruft
ee67f36ba9
Move verify_batch() to new batch module.
2019-11-21 00:31:10 +00:00
Isis Lovecruft
8f848793f3
Merge branch 'feature/no-panics' into develop
2019-11-21 00:09:32 +00:00
Isis Lovecruft
15d0a6596f
Document batch verification on docs.rs and fix false autolinking.
2019-11-14 22:01:34 +00:00
Isis Lovecruft
81f906ca30
Replace failure dependency with impls of std::error::Error.
2019-10-26 04:16:33 +00:00
Isis Lovecruft
fe782cd896
Merge remote-tracking branch 'mikelodder7/master' into develop
2019-10-25 21:50:57 +00:00
Michael Lodder
c3f4c7a67e
Update to latest rand
...
Signed-off-by: Michael Lodder <redmike7@gmail.com>
2019-10-21 09:03:08 -06:00
Isis Lovecruft
f1d4c4a732
Remove panics from batch verification API in lieu of better error handling.
2019-10-18 20:20:34 +00:00
Isis Lovecruft
deca36d074
Add an optimisation to succeed fast for scalars whose 4th MSB is unset.
...
This is only done during signature verification.
2019-10-11 21:33:55 +00:00
Isis Lovecruft
de3eb13dcf
Merge branch 'feature/97-verify-strict_1' into develop
2019-10-11 21:24:34 +00:00
Isis Lovecruft
3773f56d15
Merge branch 'feature/rust-2018' into develop
2019-10-10 22:10:28 +00:00
Isis Lovecruft
a065bee381
Enable Rust 2018.
2019-10-07 23:01:10 +00:00
isis agora lovecruft
29622ec10b
Merge pull request #96 from Arnaz87/master
...
Drop the static lifetime for context in sign_prehashed
2019-10-07 20:06:48 +00:00
Isis Lovecruft
2d5fe86f30
Document anti-malleability features/functionality.
2019-10-07 19:03:15 +00:00
Isis Lovecruft
ce2260afab
Implement stricter scalar malleability checking for signatures.
...
Previously, we were checking that the highest 3 bits were unset, which still
leaves 2^253 - 2^252 + 27742317777372353535851937790883648493 potential scalars
for the `s` component of a signature which are not strictly mod \ell.
This change fixes that.
Note: This change makes ed25519-dalek incompatible with ed25519-donna in that
some signatures produced by donna will be verifiable by donna but NOT VERIFIABLE
by dalek. On the other hand, libsodium exports a -DED25519_COMPAT feature,
which when enabled, means it is compatible with dalek with the
`legacy_compatibility` feature disabled. Otherwise, libsodium's behaviour is
identical to the behaviour enabled by default in this patch.
2019-10-04 19:34:00 +00:00
Isis Lovecruft
28eed1cba0
Add PublicKey::verify_strict() and Keypair::verify_strict() methods.
2019-10-04 02:54:13 +00:00
Isis Lovecruft
7dd99afb67
Remove most of the rand_os crate, which is only used for testing.
2019-10-04 02:46:02 +00:00
Isis Lovecruft
1342e2a3a4
Fix no_std+alloc builds.
2019-10-04 02:05:20 +00:00
Isis Lovecruft
aa49b4cd8d
Fix two failing doctests.
2019-10-04 01:19:23 +00:00
Arnaud Castellanos Galea
1c9f484d97
Drop the static lifetime for context in sign_prehashed
2019-09-30 16:42:52 +08:00
Isis Lovecruft
d31df0aaa8
Remove sha2 dep; limit rand depends; fixes after PR#68 merge.
...
* ADD new "batch" feature for feature-gating ed25519 batch verification; off by
default. The "batch" feature is the only thing which depends on all of the
`rand` crate, since it requires the functionality of `rand::thread_rng()`.
Without batch verification, the rest of ed25519-dalek only depends on
`rand_os` and `rand_core`.
2019-04-02 01:46:23 +00:00
Isis Lovecruft
1bec256418
Merge remote-tracking branch 'newpavlov/rand_core' into develop
2019-03-12 22:22:19 +00:00
Nicolas Stalder
1dfe00b79d
Fix rand dependency, deal with unusedness warnings
2019-01-27 03:06:18 +01:00
Isis Lovecruft
ae8764fbef
Update copyright year to 2019 and destroy capitalism.
2019-01-18 04:59:12 +00:00
Артём Павлов [Artyom Pavlov]
762eb0c470
use rand_core
2019-01-05 15:58:59 +03:00
Isis Lovecruft
0ddf39e443
Revise some module descriptions.
2018-12-30 04:27:40 +00:00
Isis Lovecruft
8b30d4084a
Run rustfmt on src/ed25519.rs.
2018-12-30 04:16:03 +00:00
Isis Lovecruft
fa726cfdcc
Run rustfmt on src/lib.rs.
2018-12-30 04:12:33 +00:00
Isis Lovecruft
ad49d31bbc
Run rustfmt on src/errors.rs.
2018-12-30 04:10:59 +00:00
Isis Lovecruft
811793ba2b
Run rustfmt on src/secret.rs.
2018-12-30 04:10:09 +00:00
Isis Lovecruft
d853856c36
Run rustfmt on src/public.rs.
2018-12-30 04:07:50 +00:00
Isis Lovecruft
a141863542
Run rustfmt on src/signature.rs.
2018-12-30 04:05:20 +00:00
Isis Lovecruft
e6528bd683
Create new module for public key code.
2018-12-30 03:53:42 +00:00
Isis Lovecruft
e3d7c16aac
Make errors module private.
2018-12-30 03:53:42 +00:00
Isis Lovecruft
6fea2e1ea0
Realphabetise extern crates.
2018-12-30 03:53:42 +00:00
Isis Lovecruft
f6ec28c077
Create module for secret key types.
2018-12-30 03:53:42 +00:00
Isis Lovecruft
1cf581d67d
Add lints (and fix warnings) for Rust 2018 code.
2018-12-30 03:27:01 +00:00
Isis Lovecruft
ce857a50e7
Remove unnecessary #![allow(unused_features)] lint.
2018-12-30 03:11:28 +00:00
Isis Lovecruft
d748a41894
Create new module for Signature type.
2018-12-30 03:03:40 +00:00
Isis Lovecruft
80e72db677
Create new module for constants.
2018-12-30 02:36:49 +00:00
Isis Lovecruft
e88da5ea85
Move integration tests to their own directory.
2018-12-30 02:32:21 +00:00
Isis Lovecruft
4ee77b915e
Avoid using deprecated import path for rand::rngs::OsRng.
2018-12-30 02:31:47 +00:00
Isis Lovecruft
486f23f1ad
Fix some inconsistent terminology in docstrings.
2018-12-30 02:31:47 +00:00
Isis Lovecruft
d81d43e3ae
Hardcode use of sha2::Sha512 in most cases.
...
This implements https://github.com/dalek-cryptography/ed25519-dalek/issues/64
You can still choose the "prehash" algorithm, as long as it has 64 bytes of
output. Otherwise, everything is hardcoded to use sha2::Sha512. To use a
different implementation you'll need a [patch.crates-io] section in cargo
config.
2018-12-30 00:40:01 +00:00
Isis Lovecruft
7877a7fa00
WARNING: Remove #[repr(C)] from all types.
2018-12-23 12:00:59 +00:00
Isis Lovecruft
8dbaf9a8d2
Move PublicKey point decompression into initialisation.
...
This caches the public key internally so that we effectively get a free
speedup on key reuse in regular signature verification, similar to that in
batch verification. (However, this also "speeds up"¹ batch verifications.)
¹ Less of a speed up than moving the computation elsewhere, but the speed up
on reuse still also applies to key reuse for batch verification.
2018-12-23 12:00:59 +00:00