Commit graph

424 commits

Author SHA1 Message Date
Isis Lovecruft
d3a5b3bd81
Remove unsafe trait impls. 2020-07-16 23:02:27 +00:00
Isis Lovecruft
7243d7151d
Fix handling of external error types. 2020-07-16 22:19:40 +00:00
Isis Lovecruft
69004599c5
Fix misnamed error type. 2020-07-16 21:49:14 +00:00
Isis Lovecruft
b84f1df47b
Merge branch 'fix/ed25519ph-context' into develop 2020-07-15 17:44:54 +00:00
Isis Lovecruft
b8f36d48d8
Fix proc_macro crate name resolution for serde integration tests. 2020-07-15 17:39:23 +00:00
Isis Lovecruft
e7a88c2c7f
Try compiling tests using serde_crate instead. 2020-07-14 23:58:35 +00:00
Isis Lovecruft
980ed6445f
Add missing toml dev-dependency. 2020-07-14 22:23:31 +00:00
Isis Lovecruft
97787d3716
Remove impl of std::error::Error for SignatureError.
We're now aliasing SignatureError to the error type from the signature
crate.
2020-07-14 00:37:56 +00:00
Isis Lovecruft
989c5e4c18
Fix ed25519ph context length error handling in sign_prehashed().
RFC8032 specifies that the context cannot be greater than 255 octets,
but in the previous implementation in ed25519-dalek, this error would
only be caught by a debug_assert.  This changes the sign_prehashed()
function to return a Result so that the error can be handled at
runtime and the library no longer allows misuse by creating signatures
that other libraries cannot handle.
2020-07-14 00:25:40 +00:00
isis agora lovecruft
33bb760ea8
Merge pull request #134 from isislovecruft/fix/signature-error
Impl std::error::Error for SignatureError.
2020-07-13 23:40:12 +00:00
Isis Lovecruft
f1d8576f12
Impl std::error::Error for SignatureError. 2020-07-13 23:19:55 +00:00
Isis Lovecruft
3a9435df94
Fixup serde and ed25519 trait errors in tests/benches. 2020-07-13 23:16:30 +00:00
Isis Lovecruft
84047448da
Merge remote-tracking branch 'tarcieri/ed25519-crate' into develop 2020-07-13 23:00:23 +00:00
isis agora lovecruft
8ebbbe5f5b
Merge pull request #127 from huitseeker/update-merlin
Updates the merlin dependency to ^2 and the correct repo
2020-06-30 22:58:39 +00:00
isis agora lovecruft
005fc35f52
Merge pull request #116 from NikVolf/nv-fix-alloc
Fix alloc feature compilation
2020-06-30 22:51:07 +00:00
Isis Lovecruft
c5386c0df9
Merge branch 'master' into develop 2020-06-30 22:44:29 +00:00
Isis Lovecruft
3ffa9ff530
Merge remote-tracking branch 'dalek/master' 2020-06-30 22:43:56 +00:00
isis agora lovecruft
db004cbd41
Merge pull request #119 from phayes/master
Removing double 'does'
2020-06-30 22:43:28 +00:00
Isis Lovecruft
9e247c493c
Add additional tests for keypair (de)serialisation. 2020-06-30 22:40:24 +00:00
isis agora lovecruft
6dfcc4ba27
Merge pull request #112 from jamesmunns/improve-deserialize
Add additional visitor methods for deserialization
2020-06-30 22:05:16 +00:00
Tony Arcieri
6e0667d429 Use ed25519 + signature interop crates
The `signature` crate provides `Signer` and `Verifier` traits generic
over signature types:

https://github.com/RustCrypto/traits/tree/master/signature

There's presently an open call to stabilize the parts of its API needed
by Ed25519 signatures and release a 1.0 version:

https://github.com/RustCrypto/traits/issues/78

The `ed25519` crate, based on the `signature` crate, provides an
`ed25519::Signature` type which can be shared across multiple Ed25519
crates (e.g. it is also used by the `yubihsm` crate):

https://github.com/RustCrypto/signatures/tree/master/ed25519

This commit integrates the `ed25519::Signature` type, and changes the
existing `sign` and `verify` methods (where applicable) to use the
`Signer` and `Verifier` traits from the `signature` crate. Additionally,
it replaces `SignatureError` with the `signature` crate's error type.

This has the drawback of requiring the `Signer` and/or `Verifier` traits
are in scope in order to create and/or verify signatures, but with the
benefit of supporting interoperability with other Ed25519 crates which
also make use of these traits.
2020-04-20 09:15:10 -07:00
François Garillot
aa38c6419d
Updates the merlin dependency to ^2 and the correct repo
This fixes the "batch" feature, see #126.
2020-04-16 20:48:49 -07:00
phayes
2dad99a60e
Removing double 2020-02-23 07:32:45 -08:00
NikVolf
dedbb9b96a fix alloc feature 2020-02-22 15:10:21 +03:00
James Munns
3d9d11dcdf Add additional visitor methods for deserialization 2020-01-13 00:59:08 +01:00
Isis Lovecruft
3a9101933b
Enable serde/std if std is enabled.
* FIXES part of https://github.com/dalek-cryptography/ed25519-dalek/pull/107
2019-12-11 23:14:29 +00:00
isis agora lovecruft
2ed9fa932d
Merge pull request #107 from cbeck88/serde_no_std
Use `default-features = false` with `serde`
2019-12-11 23:11:24 +00:00
Isis Lovecruft
8a2e9af9d6
Fix breakage on builds with the rand crate disabled.
* CLOSES https://github.com/dalek-cryptography/ed25519-dalek/issues/108
 * THANKS TO @tarcieri
2019-12-11 23:02:44 +00:00
Isis Lovecruft
af15a0e553
Merge remote-tracking branch 'dalek/develop' into develop 2019-12-11 22:49:06 +00:00
Isis Lovecruft
9363690191
Fix outdated docstring for verify_batch(). 2019-12-11 22:48:33 +00:00
Chris Beck
0a191a86f6 Use default-features = false with serde
It doesn't appear to me that ed25519-dalek crate needs any of the std-related
features of serde. But it turns them on anyways because it doesn't put
`default-features = false`.

This breaks no_std builds. Otherwise I think we could use 1.0.0-pre3 in mobilecoin.
I'm going to test this revision in our build and see if I'm right. I don't think
this is a breaking change from dalek's point of view.
2019-12-10 13:30:56 -08:00
isis agora lovecruft
7c38546f97
Merge pull request #106 from isislovecruft/feature/zeroize
Switch to using zeroize rather than clear_on_drop.
2019-12-10 20:37:30 +00:00
Isis Lovecruft
8ca3be99e9
Switch to using zeroize rather than clear_on_drop. 2019-12-09 22:39:57 +00:00
Isis Lovecruft
7db743bd43
Merge branch 'master' into develop 2019-12-07 01:25:10 +00:00
Isis Lovecruft
36a51acbf0
Merge branch 'release/1.0.0-pre.3' 2019-12-07 01:24:30 +00:00
Isis Lovecruft
29a06e494d
Bump ed25519-dalek version to 1.0.0-pre.3. 2019-12-06 23:42:52 +00:00
Isis Lovecruft
52a7fc88b6
Update README w.r.t. new features, malleability, synthethic randomness. 2019-11-27 22:26:58 +00:00
Isis Lovecruft
b5ffcdf3ac
Merge branch 'feature/batch_deterministic' into develop 2019-11-26 23:06:14 +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
8938069053
Update curve25519-dalek dependency to 2.0.0. 2019-11-26 22:54:53 +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
21b3257196
Merge branch 'feature/cleanup-cargo-toml' into develop 2019-10-25 22:22:03 +00:00
Isis Lovecruft
ecb6fd8ec4
Cleanup dependencies in Cargo.toml. 2019-10-25 22:18:42 +00:00
Isis Lovecruft
fe782cd896
Merge remote-tracking branch 'mikelodder7/master' into develop 2019-10-25 21:50:57 +00:00