commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
3fd8ac7fa787cfbea275306fab011a592206b1b2
Tony Arcieri
2020-07-27T20:47:50
[WIP] elliptic-curve: extract toplevel `Curve` trait (#223) This is a fairly substantial refactoring of the `elliptic-curve` crate which extracts a toplevel `elliptic_curve::Curve` trait and redefines all types to use it. The `elliptic_curve::weierstrass::Curve` trait is maintained, but relegated to a marker tra...
diff --git a/elliptic-curve/src/lib.rs b/elliptic-curve/src/lib.rs index f763f5e..9918f76 100644 --- a/elliptic-curve/src/lib.rs +++ b/elliptic-curve/src/lib.rs @@ -36,16 +36,46 @@ pub use subtle; #[cfg(feature = "rand_core")] pub use rand_core; +use core::{fmt::Debug, ops::Add}; +use generic_array::{typenum::Unsig...
6
148
149
8d67bb6c48fc54bfe76a52eebeb4cee0f8cd579c
Tony Arcieri
2020-07-27T15:18:33
elliptic-curve: simplify GenerateSecretKey signature (#222) Removes the reference requirement on the argument, since the traits are impl'd for reference types
diff --git a/elliptic-curve/src/weierstrass.rs b/elliptic-curve/src/weierstrass.rs index 23be637..f9a5cfd 100644 --- a/elliptic-curve/src/weierstrass.rs +++ b/elliptic-curve/src/weierstrass.rs @@ -42,5 +42,5 @@ where pub trait GenerateSecretKey: Curve { /// Generate a random [`SecretKey`] for this elliptic curve ...
1
1
1
51f97b6f0976f70eb31bd3f9839bf7ed15f9b977
Tony Arcieri
2020-07-27T14:28:10
elliptic-curve: add doc_cfg label to Generate (#221)
diff --git a/elliptic-curve/src/lib.rs b/elliptic-curve/src/lib.rs index 11c2c17..f763f5e 100644 --- a/elliptic-curve/src/lib.rs +++ b/elliptic-curve/src/lib.rs @@ -44,6 +44,7 @@ pub type ScalarBytes<Size> = generic_array::GenericArray<u8, Size>; /// Trait for randomly generating a value #[cfg(feature = "rand_core"...
1
1
0
d009349c109f557b4f223c27969df613808a9931
Tony Arcieri
2020-07-25T18:48:39
elliptic-curve: add `Generate` trait (#220) Trait for randomly generating types using a `rand_core::CryptoRng`. Potentially useful in trait bounds that need to generate e.g. `Scalar` types.
diff --git a/elliptic-curve/src/lib.rs b/elliptic-curve/src/lib.rs index 35cdb5b..11c2c17 100644 --- a/elliptic-curve/src/lib.rs +++ b/elliptic-curve/src/lib.rs @@ -21,21 +21,30 @@ #[cfg(feature = "std")] extern crate std; -#[cfg(feature = "rand_core")] -pub use rand_core; - pub mod error; pub mod secret_key; -...
1
15
6
2b02a1b4f5a2a3aeb6e5e947db8096ac1f2a8c80
Tony Arcieri
2020-07-25T18:14:46
elliptic-curve: add `Arithmetic` trait (#219) Several potentially useful traits (including the ECDSA ones) need access to these types, so it's helpful to have a single trait that defines them as associated types. Some additional bounds would really be helpful, but we can add those as they come up in practice.
diff --git a/elliptic-curve/src/weierstrass/curve.rs b/elliptic-curve/src/weierstrass/curve.rs index c7fdf62..1d00792 100644 --- a/elliptic-curve/src/weierstrass/curve.rs +++ b/elliptic-curve/src/weierstrass/curve.rs @@ -16,5 +16,14 @@ pub trait Curve: Clone + Debug + Default + Eq + Ord + Send + Sync { type Scalar...
1
9
0
3e7b861581185d7350db3315cd1a99b4c6d382e4
Tony Arcieri
2020-07-13T17:14:59
elliptic-curve: bump version to v0.5.0-pre (#215) This commit isn't intended to be a release, but just bumps the version number in Cargo.toml to a `-pre` to distinguish it from the currently released v0.4.0. Several backwards incompatible / semver breaking changes have been introduced since the release.
diff --git a/Cargo.lock b/Cargo.lock index bed9f72..b3471b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,7 +109,7 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.4.0" +version = "0.5.0-pre" dependencies = [ "generic-array 0.14.3", "rand_core", diff --git a/cryptography/Cargo.toml b/cr...
3
3
3
cbe0f2ae5902ef5f0750b48ce526febc05dcb20d
Tony Arcieri
2020-07-13T13:59:50
elliptic-curve: remove dev-dependency on `hex` (#214) It's not used in this crate
diff --git a/Cargo.lock b/Cargo.lock index 9d551c7..bed9f72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,7 +112,6 @@ name = "elliptic-curve" version = "0.4.0" dependencies = [ "generic-array 0.14.3", - "hex", "rand_core", "subtle", "zeroize", @@ -167,12 +166,6 @@ dependencies = [ "stable_deref_trait", ...
2
0
10
54ded886927531793e62b6b49635c7074141f2f8
Artyom Pavlov
2020-07-10T14:59:49
Add blanket trait impls for references (#210)
diff --git a/Cargo.lock b/Cargo.lock index 155efe4..2e23d42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "block-cipher" -version = "0.7.1" +version = "0.8.0" dependencies = [ - "blobby 0.2.0", + "blobby 0.3.0", "generic-array 0.14.2", ] @@ -252,9 +252,9 @@ che...
8
71
45
8ded2942c16f49e3d349478a3d78cc81cd8dade6
Tony Arcieri
2020-06-21T21:41:42
cryptography: rustdoc improvements (#205)
diff --git a/cryptography/Cargo.toml b/cryptography/Cargo.toml index 89e92a7..30d66bd 100644 --- a/cryptography/Cargo.toml +++ b/cryptography/Cargo.toml @@ -19,3 +19,6 @@ mac = { version = "0.8", package = "crypto-mac", optional = true, path = "../cry signature = { version = "1.1.0", optional = true, default-features ...
2
10
7
2895b6b357b7ef5875cffcb4b8d8e0c94c5438e1
Tony Arcieri
2020-06-21T18:07:40
cryptography: fix rustdoc by linking directly to https://docs.rs (#202) Unfortunately even after #200 the links to the documentation for the various trait crates is still broken in the exact same way. I suspect this might be some kind of rustdoc/docs.rs bug around re-exports. This commit explicitly links to https...
diff --git a/cryptography/src/lib.rs b/cryptography/src/lib.rs index 8747c4d..1920e7f 100644 --- a/cryptography/src/lib.rs +++ b/cryptography/src/lib.rs @@ -17,29 +17,23 @@ //! //! # Traits //! -//! - [`aead`] - Authenticated Encryption with Associated Data -//! (i.e. high-level symmetric encryption) -//! - [`bloc...
1
14
20
094b83655142546fb78f1673aa4d192f87827dc8
Tony Arcieri
2020-06-21T15:37:39
cryptography: add explicit rustdoc links (#200) For whatever reason https://docs.rs did not render the links to the various trait crates (despite `cargo +nightly doc` rendering them fine for me). Even stranger still, there was one exception: it was happy with the `signature` crate (possibly because it's post-1.0...
diff --git a/cryptography/src/lib.rs b/cryptography/src/lib.rs index 6413e22..8747c4d 100644 --- a/cryptography/src/lib.rs +++ b/cryptography/src/lib.rs @@ -32,6 +32,14 @@ //! //! [1]: https://github.com/RustCrypto/traits //! [2]: https://github.com/RustCrypto +//! +//! [`aead`]: https://docs.rs/aead +//! [`block_ci...
1
8
0
0b404c80b42796170c1c3e6c4649e819764e480c
Tony Arcieri
2020-06-11T21:55:38
aead: add `NewAead::new_varkey` method (#191) Adds a method which accepts a slice for a key, similar to the methods in the `block-cipher` and `stream-cipher` crates.
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index 1f33c5b..d5c50d7 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -67,8 +67,22 @@ pub trait NewAead { /// The size of the key array required by this algorithm. type KeySize: ArrayLength<u8>; - /// Construct a new stateful instance for the given ke...
1
15
1
00fd43d39d94705af6a83409aa943ff2e7acab07
Tony Arcieri
2020-06-10T22:16:46
stream-cipher: add Key and Nonce type aliases (#188) These are useful for removing `GenericArray` boilerplate, particularly in type signatures for arguments.
diff --git a/stream-cipher/src/lib.rs b/stream-cipher/src/lib.rs index 505c67f..5755858 100644 --- a/stream-cipher/src/lib.rs +++ b/stream-cipher/src/lib.rs @@ -31,20 +31,24 @@ use generic_array::{ArrayLength, GenericArray}; #[cfg(feature = "block-cipher")] use block_cipher::{BlockCipher, NewBlockCipher}; +/// Key ...
1
9
5
b6c5fad59c4079b915a1df20c47bf3154b3612b1
Tony Arcieri
2020-06-09T19:50:45
digest: document three levels of organization (#185) * digest: document three levels of organization The new `*Dirty` traits add another level of organization to the crate's design. This commit updates the documentation to reflect that. * minor update Co-authored-by: Artyom Pavlov <newpavlov@gmail.com>
diff --git a/digest/src/fixed.rs b/digest/src/fixed.rs index 4f0e220..432a6c4 100644 --- a/digest/src/fixed.rs +++ b/digest/src/fixed.rs @@ -49,7 +49,9 @@ pub trait FixedOutputDirty { /// Retrieve result into provided buffer and leave hasher in a dirty state. /// - /// Implementations should panic if thi...
4
27
12
63816fc6f27dc0ace87a1671fb22ee438d3ffecf
Tony Arcieri
2020-06-09T18:55:50
digest: factor out `fixed`, `variable`, and `xof` modules (#184) Each of these now defines two traits and a blanket impl, so `lib.rs` was getting rather bloated. This commit factors each of them into their own modules.
diff --git a/digest/src/dyn_digest.rs b/digest/src/dyn_digest.rs index 4515c29..156f9bd 100644 --- a/digest/src/dyn_digest.rs +++ b/digest/src/dyn_digest.rs @@ -6,6 +6,7 @@ use generic_array::typenum::Unsigned; /// The `DynDigest` trait is a modification of `Digest` trait suitable /// for trait objects. +#[cfg_attr...
5
281
262
35d745984b65aad87551f592872b27c9472fc33d
Tony Arcieri
2020-06-09T18:48:44
digest: add `ExtendableOutputDirty` and `VariableOutputDirty` traits (#183) Adds traits which provide an implementation-focused low-level API similar to the `FixedOutputDirty` trait introduced in #180, but for the `ExtendableOutput` and `VariableOutput` traits. Like `FixedOutputDirty`, these traits have blanket i...
diff --git a/digest/src/lib.rs b/digest/src/lib.rs index f52f42b..bbdc25e 100644 --- a/digest/src/lib.rs +++ b/digest/src/lib.rs @@ -140,7 +140,7 @@ impl<D: FixedOutputDirty + Reset> FixedOutput for D { } /// Trait for returning digest result with the variable size -pub trait VariableOutput: core::marker::Sized { +...
1
122
4
b1d81bae158259272e33f00db4ac483b2d79dd89
Artyom Pavlov
2020-06-09T17:59:21
rename finalize_box to finalize_boxed (#182)
diff --git a/digest/src/lib.rs b/digest/src/lib.rs index 21976e6..f52f42b 100644 --- a/digest/src/lib.rs +++ b/digest/src/lib.rs @@ -163,7 +163,7 @@ pub trait VariableOutput: core::marker::Sized { /// they have size of 2 and 3 words respectively. #[cfg(feature = "alloc")] #[cfg_attr(docsrs, doc(cfg(featu...
1
3
3
294e992c2ca2b89d3c884f506d059b78d28d75bc
Artyom Pavlov
2020-06-09T17:46:49
Use boxed slices instead of vectors (#181)
diff --git a/digest/src/lib.rs b/digest/src/lib.rs index 72a7e00..21976e6 100644 --- a/digest/src/lib.rs +++ b/digest/src/lib.rs @@ -45,7 +45,7 @@ pub use dyn_digest::DynDigest; use generic_array::{ArrayLength, GenericArray}; #[cfg(feature = "alloc")] -use alloc::vec::Vec; +use alloc::boxed::Box; /// Trait for u...
1
21
11
496aa73930087c427702e82d6915568ef72f4ac2
Tony Arcieri
2020-06-09T17:30:15
digest: add `FixedOutputDirty` trait + `finalize_into*` (#180) Adds a `FixedOutputDirty` trait which writes the digest output to a provided byte array, but does not reset the internal state. This is intended for implementations to use in order to ensure that they are not reset in the event the instance is consumed....
diff --git a/digest/src/dyn_digest.rs b/digest/src/dyn_digest.rs index c836ab4..4515c29 100644 --- a/digest/src/dyn_digest.rs +++ b/digest/src/dyn_digest.rs @@ -34,7 +34,7 @@ impl<D: Update + FixedOutput + Reset + Clone + 'static> DynDigest for D { } fn finalize_reset(&mut self) -> Box<[u8]> { - let ...
2
59
3
e312a03b01aa3ee67902c7a2dda2a0d886be7c5b
Tony Arcieri
2020-06-09T04:30:51
block-cipher: add BlockCipherMut (#179) Adds a stateful equivalent to `BlockCipher` that permits `&mut self` access to the underlying type. The main use case for this trait is hardware cryptographic accelerators which need to e.g. communitate with a peripheral device via an underlying `&mut` reference. While ...
diff --git a/block-cipher/src/lib.rs b/block-cipher/src/lib.rs index e7ea86e..caa9c29 100644 --- a/block-cipher/src/lib.rs +++ b/block-cipher/src/lib.rs @@ -99,3 +99,32 @@ pub trait BlockCipher { } } } + +/// Stateful block cipher which permits `&mut self` access. +/// +/// The main use case for this tra...
1
29
0
bdc337c518d84410d95872cab4518b7e9784333c
Tony Arcieri
2020-06-09T00:07:14
digest: add XofReader::read_vec method (#178) ...gated under the `alloc` feature. Allocates a `Vec<u8>` to return an individual `XofReader::read` invocation into. Unlike `ExtensibleOutput::finalize_vec`, it doesn't consume the reader and can be called an unlimited number of times.
diff --git a/digest/src/lib.rs b/digest/src/lib.rs index 5e40d54..79bef80 100644 --- a/digest/src/lib.rs +++ b/digest/src/lib.rs @@ -114,8 +114,19 @@ pub trait VariableOutput: core::marker::Sized { /// Trait for describing readers which are used to extract extendable output /// from XOF (extendable-output function) r...
1
12
1
cebfee50542823f37b1a0bf33f40b27b8537ba28
Tony Arcieri
2020-06-03T21:50:57
block-cipher/crypto-mac: add doc_cfg + comments Configures the `block-cipher` and `crypto-mac` crates to have `doc_cfg` about their cargo features. Adds some additional comments.
diff --git a/block-cipher/Cargo.toml b/block-cipher/Cargo.toml index a74a884..719235d 100644 --- a/block-cipher/Cargo.toml +++ b/block-cipher/Cargo.toml @@ -20,4 +20,5 @@ std = [] dev = ["blobby"] [package.metadata.docs.rs] -features = [ "std" ] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/...
6
22
3
9b804d6f70606bc6142e4242e7cb9b20acc596a0
Tony Arcieri
2020-06-03T18:34:45
stream-cipher: re-export `block_cipher` when enabled
diff --git a/stream-cipher/src/lib.rs b/stream-cipher/src/lib.rs index 1a056c8..505c67f 100644 --- a/stream-cipher/src/lib.rs +++ b/stream-cipher/src/lib.rs @@ -22,6 +22,9 @@ mod errors; pub use crate::errors::{InvalidKeyNonceLength, LoopError}; pub use generic_array::{self, typenum::consts}; +#[cfg(feature = "bloc...
1
3
0
8d23fae2a10fb8409cbb60d5d5bd3068f688b2ec
Tony Arcieri
2020-06-02T13:55:38
stream-cipher: use 2018 edition module syntax for `bench` macros Uses `$crate::bench_sync` and `$crate::bench_async` to invoke them.
diff --git a/stream-cipher/src/dev.rs b/stream-cipher/src/dev.rs index ed78dd1..56e80ca 100644 --- a/stream-cipher/src/dev.rs +++ b/stream-cipher/src/dev.rs @@ -177,11 +177,11 @@ macro_rules! bench_sync { vec![77; n] } - bench_sync!(bench1_10, $cipher, 10); - bench_sync!(bench2_100...
1
10
10
84e56fbd4412385eafc854eca6b7f397dab2ad02
Tony Arcieri
2020-05-31T19:29:51
aead: fix Tag params
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index aaf7c9f..1f33c5b 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -261,7 +261,7 @@ pub trait AeadInPlace { nonce: &Nonce<Self::NonceSize>, associated_data: &[u8], buffer: &mut [u8], - tag: &Tag<Self::NonceSize>, + tag: &T...
1
3
3
48f6d59655bdf6af7cfca1478ed521a6b8e89d62
Tony Arcieri
2020-05-31T19:19:33
aead: fix `Tag` return values They were using `*::NonceSize` instead of `*::TagSize`.
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index 2799377..aaf7c9f 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -237,7 +237,7 @@ pub trait AeadInPlace { nonce: &Nonce<Self::NonceSize>, associated_data: &[u8], buffer: &mut [u8], - ) -> Result<Tag<Self::NonceSize>, Error>; + )...
1
3
3
d7e7dcf367cf718bef4ddbba58b9a2f65ee5c39f
Tony Arcieri
2020-05-31T14:19:53
crypto-mac: use 2018 edition module syntax for `bench` macro
diff --git a/Cargo.lock b/Cargo.lock index 989bcdc..fcb2b27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -299,4 +299,3 @@ dependencies = [ "generic-array 0.14.1", "subtle", ] - diff --git a/crypto-mac/src/dev.rs b/crypto-mac/src/dev.rs index 257ce9f..d7d4223 100644 --- a/crypto-mac/src/dev.rs +++ b/crypto-mac/src/d...
2
4
5
98516f4fe35fc90e3ea770277f49daac5aa1ea77
Tony Arcieri
2020-05-30T00:03:51
digest: use 2018 edition module syntax for `bench` macro
diff --git a/Cargo.lock b/Cargo.lock index 989bcdc..fcb2b27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -299,4 +299,3 @@ dependencies = [ "generic-array 0.14.1", "subtle", ] - diff --git a/digest/src/dev.rs b/digest/src/dev.rs index ab01b76..77fc5ed 100644 --- a/digest/src/dev.rs +++ b/digest/src/dev.rs @@ -239,9 ...
2
4
5
8ceead6ec39c40634b3ef5b4b4c3d36519691402
Tony Arcieri
2020-05-27T21:38:33
digest: fix benchmark dev macro
diff --git a/digest/src/dev.rs b/digest/src/dev.rs index 9f42f8f..ab01b76 100644 --- a/digest/src/dev.rs +++ b/digest/src/dev.rs @@ -226,7 +226,7 @@ macro_rules! bench { let data = [0; $bs]; b.iter(|| { - d.input(&data[..]); + d.update(&data[..]); }...
1
1
1
b00e554a4fafc5e3d0b59fd8a0691c7854498da0
Tony Arcieri
2020-05-27T21:07:39
crypto-mac: more dev macro fixes
diff --git a/crypto-mac/src/dev.rs b/crypto-mac/src/dev.rs index 4e0f27d..257ce9f 100644 --- a/crypto-mac/src/dev.rs +++ b/crypto-mac/src/dev.rs @@ -13,13 +13,13 @@ macro_rules! new_test { fn run_test(key: &[u8], input: &[u8], tag: &[u8]) -> Option<&'static str> { let mut mac = <$mac as ...
1
6
6
a4706d21df292590a73e5a0cc43287be697e1e9b
Tony Arcieri
2020-05-27T21:01:31
crypto-mac: use NewMac in test macros These weren't properly updated before
diff --git a/crypto-mac/src/dev.rs b/crypto-mac/src/dev.rs index c08783f..4e0f27d 100644 --- a/crypto-mac/src/dev.rs +++ b/crypto-mac/src/dev.rs @@ -9,10 +9,10 @@ macro_rules! new_test { #[test] fn $name() { use crypto_mac::dev::blobby::Blob3Iterator; - use crypto_mac::Mac; + ...
1
4
4
09ffa21b0802b315bd48710762051e28dcf486c0
Tony Arcieri
2020-05-27T20:54:05
crypto-mac: fix dev blobby re-export This was broken in the 2018 edition upgrade.
diff --git a/crypto-mac/src/dev.rs b/crypto-mac/src/dev.rs index a4c2cf3..c08783f 100644 --- a/crypto-mac/src/dev.rs +++ b/crypto-mac/src/dev.rs @@ -1,12 +1,14 @@ //! Development-related functionality +pub use blobby; + /// Define test #[macro_export] macro_rules! new_test { ($name:ident, $test_name:expr, $m...
1
3
1
da999ac6cdd034aa7e5443488e017f6dee286fb4
Tony Arcieri
2020-05-27T20:49:53
digest: fix dev blobby re-export This was broken in the 2018 edition upgrade.
diff --git a/digest/src/dev.rs b/digest/src/dev.rs index 8ef4131..9f42f8f 100644 --- a/digest/src/dev.rs +++ b/digest/src/dev.rs @@ -1,5 +1,7 @@ //! Development-related functionality +pub use blobby; + use super::{ExtendableOutput, Reset, Update, VariableOutput, XofReader}; use core::fmt::Debug; @@ -10,7 +12,7 @...
1
3
1
5d72d9d37e5aeefe3581b440b4f31257b140dbe6
Tony Arcieri
2020-05-27T20:36:25
crypto-mac: bump generic-array to v0.14 Matches the other crates
diff --git a/Cargo.lock b/Cargo.lock index 970a35f..fcb2b27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,7 +74,7 @@ name = "crypto-mac" version = "0.8.0-pre" dependencies = [ "blobby", - "generic-array 0.13.2", + "generic-array 0.14.1", "subtle", ] diff --git a/crypto-mac/Cargo.toml b/crypto-mac/Cargo.toml ...
2
2
2
6298cf103ddc29b5ab0dcaa40a984323df25aa62
Tony Arcieri
2020-05-27T20:16:42
crypto-mac: bump version to v0.8.0-pre It seems it was previously bumped to v0.8.0: https://github.com/RustCrypto/traits/commit/128e557120632b623f55356a539b1c9c991d6626 ...but never released, so this bumps it back with the intent of releasing a v0.8.0.
diff --git a/Cargo.lock b/Cargo.lock index b385c1c..970a35f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "crypto-mac" -version = "0.9.0-pre" +version = "0.8.0-pre" dependencies = [ "blobby", "generic-...
2
2
2
214c70067dc12b9d9c1d1d687df11c7ff5f1ff40
Tony Arcieri
2020-05-26T22:36:05
block-cipher/stream-cipher: more dev fixes Re-exports blobby under the `dev` module in each crate, and updates the macros to use that.
diff --git a/block-cipher/src/dev.rs b/block-cipher/src/dev.rs index ea13906..7389b64 100644 --- a/block-cipher/src/dev.rs +++ b/block-cipher/src/dev.rs @@ -1,12 +1,14 @@ //! Development-related functionality +pub use blobby; + /// Define test #[macro_export] macro_rules! new_test { ($name:ident, $test_name:...
3
8
7
7737dd58a234f460a0b3fd1f44e5e8ad0393e7d8
Tony Arcieri
2020-05-26T21:38:50
block-cipher: more test macro fixups
diff --git a/block-cipher/src/dev.rs b/block-cipher/src/dev.rs index 9567c6d..ea13906 100644 --- a/block-cipher/src/dev.rs +++ b/block-cipher/src/dev.rs @@ -9,10 +9,10 @@ macro_rules! new_test { use block_cipher::blobby::Blob3Iterator; use block_cipher::generic_array::typenum::Unsigned; ...
2
8
5
95718c3bdab81effe856d74a04c185f92c6d794e
Tony Arcieri
2020-05-26T21:23:43
block-cipher: fix test macros These didn't get properly updated when the crate was renamed
diff --git a/block-cipher/src/dev.rs b/block-cipher/src/dev.rs index d60cf7c..9567c6d 100644 --- a/block-cipher/src/dev.rs +++ b/block-cipher/src/dev.rs @@ -6,10 +6,10 @@ macro_rules! new_test { ($name:ident, $test_name:expr, $cipher:ty) => { #[test] fn $name() { - use block_cipher_tra...
1
5
5
253e5c92bc1c3d7453e461f1cf7e1bcef1a2eb41
Tony Arcieri
2020-05-24T20:44:58
Bump all crates to `-pre` versions This commit does an across-the-board version bump of all traits, since they've all been migrated (vicariously) to `generic-array` v0.14. There's no intention of releasing them yet, and if I do release preleases they'll be as `-pre.0` and so forth. This just makes it clear what's pre...
diff --git a/Cargo.lock b/Cargo.lock index 42f6afa..02d6a02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,7 +2,7 @@ # It is not intended for manual editing. [[package]] name = "aead" -version = "0.2.0" +version = "0.3.0-pre" dependencies = [ "generic-array 0.14.1", "heapless", @@ -42,7 +42,7 @@ dependencies = ...
9
24
23
c21d68cbd7a7d0de8bc64d48725b2838eec9fa84
Tony Arcieri
2020-05-24T15:50:30
universal-hash: split out NewUniversalHash trait
diff --git a/universal-hash/src/lib.rs b/universal-hash/src/lib.rs index cfb3829..9976a3d 100644 --- a/universal-hash/src/lib.rs +++ b/universal-hash/src/lib.rs @@ -30,23 +30,26 @@ use generic_array::{ArrayLength, GenericArray}; use subtle::{Choice, ConstantTimeEq}; /// Keys to a [`UniversalHash`]. -pub type Key<U>...
1
11
8
ba58937f14c25a0b1d37584c9aa7d73f17f2bd99
Tony Arcieri
2020-05-24T15:40:47
crypto-mac: add `impl_write!` macro As discussed on #43, similar to the one in `digest`.
diff --git a/crypto-mac/src/lib.rs b/crypto-mac/src/lib.rs index fa348fe..7a0d143 100644 --- a/crypto-mac/src/lib.rs +++ b/crypto-mac/src/lib.rs @@ -114,3 +114,21 @@ impl<M: Mac> PartialEq for Output<M> { } impl<M: Mac> Eq for Output<M> {} + +#[macro_export] +/// Implements `std::io::Write` trait for implementer of...
2
18
2
83ae496a450cabc866c3dc16cbc7ba84b8da10be
Tony Arcieri
2020-05-24T15:27:05
mac: split out NewMac trait
diff --git a/block-cipher-trait/src/lib.rs b/block-cipher-trait/src/lib.rs index c5399eb..7c232de 100644 --- a/block-cipher-trait/src/lib.rs +++ b/block-cipher-trait/src/lib.rs @@ -29,7 +29,7 @@ pub type Block<B> = GenericArray<u8, <B as BlockCipher>::BlockSize>; /// Blocks being acted over in parallel. pub type ParB...
2
24
27
93ab1450613a0b39887f95a98a82388ce0a0a90f
Tony Arcieri
2020-05-24T15:09:11
block-cipher-trait: split out NewBlockCipher trait As requested on #43, this splits out a `NewBlockCipher` trait from the original `BlockCipher` trait.
diff --git a/block-cipher-trait/src/lib.rs b/block-cipher-trait/src/lib.rs index 11e2a55..c5399eb 100644 --- a/block-cipher-trait/src/lib.rs +++ b/block-cipher-trait/src/lib.rs @@ -20,21 +20,22 @@ pub use generic_array::{self, typenum::consts}; use generic_array::typenum::Unsigned; use generic_array::{ArrayLength, Ge...
1
27
15
20f869894689d5089a47d775a0428aeef4f07f64
Tony Arcieri
2020-05-23T17:49:08
aead: split Aead(Mut) from Aead(Mut)InPlace (fixes #70) Splits the `Aead` and `AeadMut` trait into the following: - `Aead` and `AeadMut`:gated on the `alloc` feature - `AeadInPlace` and `AeadMutInPlace`: object-safe, always available This further has the benefit that implementors who don't want to provide or abstrac...
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index e72170b..2799377 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -36,7 +36,10 @@ use generic_array::{typenum::Unsigned, ArrayLength, GenericArray}; #[cfg(feature = "alloc")] use alloc::vec::Vec; -/// Error type +/// Error type. +/// +/// This type is delibe...
1
192
138
9a611e8661d3c3e432ee192855aee7ae413c3c9d
Tony Arcieri
2020-05-23T21:02:35
universal-hash: rename `update_block` => `update` Updating (in the IUF sense) the UHF state by a block is the core "update" primitive, so it makes sense to make it first-class.
diff --git a/universal-hash/src/lib.rs b/universal-hash/src/lib.rs index d646715..cfb3829 100644 --- a/universal-hash/src/lib.rs +++ b/universal-hash/src/lib.rs @@ -48,7 +48,7 @@ pub trait UniversalHash: Clone { fn new(key: &Key<Self>) -> Self; /// Input a block into the universal hash function - fn upda...
1
3
3
af9c536d133eb2dc2386b03952fed5c0f7589c88
Tony Arcieri
2020-05-23T20:26:59
universal-hash: add `Key` and `Block` type aliases Also makes `Output` generic around the underlying `UniversalHash`, and improves documentation somewhat.
diff --git a/Cargo.lock b/Cargo.lock index afed224..42f6afa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. - [[package]] name = "aead" version = "0.2.0" diff --git a/universal-hash/src/lib.rs b/universal-hash/src/l...
2
46
39
1485ac95535d5fb058c3df1cb9ff6236aff425c2
Tony Arcieri
2020-05-23T19:40:35
aead: type aliases for `Key`, `Nonce`, and `Tag` It's syntactically annoying to have to use `GenericArray<u8, N>` for these types. This commit introduces a set of `GenericArray` type aliases for them instead. Notably, `Key` might benefit from having a proper struct which handles things like zeroization on drop and p...
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index f19290a..e72170b 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -62,19 +62,29 @@ macro_rules! impl_decrypt_in_place { let tag_pos = $buffer.len() - Self::TagSize::to_usize(); let (msg, tag) = $buffer.as_mut().split_at_mut(tag_pos); - ...
1
40
26
11144cc6d5af35b42c7477095420735912462092
Tony Arcieri
2020-05-23T19:27:30
aead: have NewAead borrow the key In many AEAD implementations we pass the key directly onto `NewBlockCipher`, e.g. in the `aes-gcm` crate: https://github.com/RustCrypto/AEADs/blob/af9926e/aes-gcm/src/lib.rs#L183 This makes an unnecessary copy of the key which therefore necessitates zeroing it out. If we borrow the...
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index cd358a8..f19290a 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -74,7 +74,7 @@ pub trait NewAead { type KeySize: ArrayLength<u8>; /// Construct a new stateful instance for the given key. - fn new(key: GenericArray<u8, Self::KeySize>) -> Self; + ...
1
1
1
371db89daa4220e794225fb8a9f179e98e8ee8a9
Tony Arcieri
2020-05-23T19:16:38
Re-export `typenum::consts` as `consts` Inspired by the `heapless` crate: https://github.com/RustCrypto/traits/issues/43#issuecomment-633109800 This re-export provides convenient access to the type-level numeric constants provided by `typenum`, which should make using `generic-array` less annoying.
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index b6ccdd7..cd358a8 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -25,15 +25,17 @@ extern crate alloc; #[cfg(feature = "std")] extern crate std; -pub use generic_array; +pub use generic_array::{self, typenum::consts}; + #[cfg(feature = "heapless")] pub use...
6
11
8
800398d5a56520eafcfb355518ecaf992b1be542
Tony Arcieri
2020-05-23T17:03:16
aead: render README.md on crates.io Adds a `readme` key to `Cargo.toml`
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index d58049d..6b47004 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -4,6 +4,7 @@ version = "0.2.0" authors = ["RustCrypto Developers"] edition = "2018" license = "MIT OR Apache-2.0" +readme = "README.md" description = "Traits for Authenticated Encryption with ...
1
1
0
705a1579281c4cf21c4e3327f1e67388f45ad166
Tony Arcieri
2020-05-23T16:31:21
digest: docs.rs documentation improvements + doc_cfg Adds a `--cfg docsrs` option enabled in `package.metadata.docs.rs` which toggles on `doc_cfg` support. This can be used for tagging what cargo features must be enabled to use certain API features.
diff --git a/digest/Cargo.toml b/digest/Cargo.toml index bd1212f..3c7229f 100644 --- a/digest/Cargo.toml +++ b/digest/Cargo.toml @@ -22,4 +22,5 @@ dev = ["blobby"] travis-ci = { repository = "RustCrypto/traits" } [package.metadata.docs.rs] -features = ["std"] +all-features = true +rustdoc-args = ["--cfg", "docsrs"]...
4
18
8
04ee60fa844964a744ac449cc6bf278ed238925c
Tony Arcieri
2020-05-23T16:20:12
digest: add `Output` type alias Adds a `digest::Output<D>` type alias for a `GenericArray<u8; N>`, which is less unwieldy to remember/type.
diff --git a/digest/src/digest.rs b/digest/src/digest.rs index 7607f96..220ae3a 100644 --- a/digest/src/digest.rs +++ b/digest/src/digest.rs @@ -24,13 +24,13 @@ pub trait Digest { Self: Sized; /// Retrieve result and consume hasher instance. - fn result(self) -> GenericArray<u8, Self::OutputSize>; + ...
2
14
11
9ab8d4bafb5aac62a9da685c3814ba73f5c98fd4
Tony Arcieri
2020-05-23T16:14:23
crypto-mac: rename `MacResult` to `Output` ...and `code` to `into_bytes`. This is consistent with the API in the `universal-hash` trait.
diff --git a/crypto-mac/src/lib.rs b/crypto-mac/src/lib.rs index ba61ebc..a0477d6 100644 --- a/crypto-mac/src/lib.rs +++ b/crypto-mac/src/lib.rs @@ -20,12 +20,12 @@ use generic_array::typenum::Unsigned; use generic_array::{ArrayLength, GenericArray}; use subtle::{Choice, ConstantTimeEq}; -/// The `Mac` trait define...
1
23
23
077a07d6acf32bf7444607a879362040860dacb7
Tony Arcieri
2020-05-23T15:59:24
Remove deprecated `Error::description` methods This method has been "soft-deprecated" since 1.27.0 and officially deprecated as of Rust 1.42.0.
diff --git a/block-cipher-trait/src/errors.rs b/block-cipher-trait/src/errors.rs index 62ba2fb..0769aa2 100644 --- a/block-cipher-trait/src/errors.rs +++ b/block-cipher-trait/src/errors.rs @@ -1,6 +1,4 @@ use core::fmt; -#[cfg(feature = "std")] -use std::error; /// Error struct which used with `NewVarKey` #[derive...
4
6
30
a211c91051b8547ddcf1e52d6762c5e2d3b9ee61
Tony Arcieri
2020-05-23T15:45:55
digest: use impl Trait notation for AsRef<[u8]> Replaces generic parameters on methods which take an `AsRef<[u8]>` bound with `impl AsRef<[u8]>`. This syntax is semantically equivalent but eliminates a generic parameter, which (IMO) makes the method signature easier to read, and in general seems to be preferred after...
diff --git a/digest/src/digest.rs b/digest/src/digest.rs index d0a95cd..7607f96 100644 --- a/digest/src/digest.rs +++ b/digest/src/digest.rs @@ -16,10 +16,10 @@ pub trait Digest { /// Digest data, updating the internal state. /// /// This method can be called repeatedly for use with streaming messages. -...
2
6
6
b967c90af9c066bd9e29b9d982994798603d731b
Tony Arcieri
2020-05-23T15:25:18
crypto-mac/digest: rename `input` to `update` As discussed in #43, following "Initialize-Update-Finalize" (IUF) nomenclature, this renames the `input` methods in `crypto-mac` and `digest` to be `update` instead, and also renames the `digest::Input` trait to `digest::Update`.
diff --git a/crypto-mac/src/lib.rs b/crypto-mac/src/lib.rs index a4c2c5a..ba61ebc 100644 --- a/crypto-mac/src/lib.rs +++ b/crypto-mac/src/lib.rs @@ -28,10 +28,10 @@ pub trait Mac: Clone { /// Keys size of the [`Mac`] type KeySize: ArrayLength<u8>; - /// Create new MAC instance from key with fixed size. +...
5
38
38
14e2f61426009bae1095d2c4da92b6afbb2be6e9
Tony Arcieri
2020-05-10T21:29:13
stream-cipher: update to 2018 edition
diff --git a/stream-cipher/Cargo.toml b/stream-cipher/Cargo.toml index 1355e7d..eed7343 100644 --- a/stream-cipher/Cargo.toml +++ b/stream-cipher/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "stream-cipher" +description = "Stream cipher traits" version = "0.3.2" authors = ["RustCrypto Developers"] license = "MIT O...
4
16
11
7899e764e1ef215ad86cb751cfc2d5af4f0ced90
Tony Arcieri
2020-05-10T21:19:19
digest: update to 2018 edition
diff --git a/digest/Cargo.toml b/digest/Cargo.toml index e0a2e7c..bd1212f 100644 --- a/digest/Cargo.toml +++ b/digest/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "digest" +description = "Traits for cryptographic hash functions" version = "0.8.1" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -d...
5
30
11
102d094f192c7b9e4ee62c0870171c574afa7439
Tony Arcieri
2020-05-10T20:22:59
crypto-mac: update to 2018 edition
diff --git a/Cargo.lock b/Cargo.lock index afed224..42f6afa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. - [[package]] name = "aead" version = "0.2.0" diff --git a/crypto-mac/Cargo.toml b/crypto-mac/Cargo.toml in...
5
21
14
af2bc0c45eb1d174608851214eededcc09d36b7d
Tony Arcieri
2020-05-10T20:12:10
block-cipher-trait: update to 2018 edition
diff --git a/block-cipher-trait/Cargo.toml b/block-cipher-trait/Cargo.toml index fe84988..d4fb41e 100644 --- a/block-cipher-trait/Cargo.toml +++ b/block-cipher-trait/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "block-cipher-trait" +description = "Traits for description of block ciphers" version = "0.6.2" authors =...
4
17
10
9e9b814f27bcd0e7ef9e5577d4c3eff920e24518
Tony Arcieri
2020-05-10T18:55:46
digest: fix `cargo check` warnings Missing the `dyn` keyword on `DynDigest`
diff --git a/digest/src/dyn_digest.rs b/digest/src/dyn_digest.rs index cb144bd..93dfdd0 100644 --- a/digest/src/dyn_digest.rs +++ b/digest/src/dyn_digest.rs @@ -25,7 +25,7 @@ pub trait DynDigest { fn output_size(&self) -> usize; /// Clone hasher state into a boxed trait object - fn box_clone(&self) -> Bo...
1
3
3
026318b39deb7b1c65ce52d3f409064ecd42d826
Tony Arcieri
2020-05-10T18:54:35
universal-hash: fix cargo check failures + std::error::Error The `Display` impl on the error type was using the deprecated `description()` method. This was removed. With that removed, the `Display` impl can still exist in a `no_std` environment. Reduces the `std::error::Error` impl to just a marker trait.
diff --git a/universal-hash/src/lib.rs b/universal-hash/src/lib.rs index b0981f1..264bdd9 100644 --- a/universal-hash/src/lib.rs +++ b/universal-hash/src/lib.rs @@ -156,17 +156,11 @@ impl<N: ArrayLength<u8>> Eq for Output<N> {} #[derive(Default, Debug, Copy, Clone, Eq, PartialEq)] pub struct Error; -#[cfg(feature =...
1
4
10
c22ce8aa6a6f9cbb229b72a257fe5a252a3cfede
Hubert Hirtz
2020-04-26T09:39:10
Forbid unsafe code `#![forbid(unsafe_code)]` attributes make rustc abort compilation if there are any unsafe blocks in the crate, and exceptions cannot be made with allow/warn attributes.
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index 61f29c0..b0d7959 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -13,6 +13,7 @@ //! [RustCrypto/AEADs]: https://github.com/RustCrypto/AEADs #![no_std] +#![forbid(unsafe_code)] #[cfg(feature = "alloc")] extern crate alloc; diff --git a/block-cipher-trait...
6
6
0
8d7b5274456562224addf3a6a59b1b0f4674dd13
Tony Arcieri
2020-04-20T17:43:52
signature: improve PrehashSignature docs
diff --git a/signature/src/signature.rs b/signature/src/signature.rs index 7aab711..29aa0b8 100644 --- a/signature/src/signature.rs +++ b/signature/src/signature.rs @@ -42,12 +42,14 @@ pub trait Signature: AsRef<[u8]> + Debug + Sized { } } -/// Marker trait for `Signature` types computable as `S(H(m))`, i.e. on...
3
9
7
61b30326b734306692c2beb7e552119830c1fa2d
Tony Arcieri
2020-04-18T17:12:43
signature: rename DigestSignature => PrehashSignature The previous name poorly described what these signature types are: ones capable of producing a signature of a message which was hashed in advance. The phrase "pre-hash" is a relatively common one and better describes this property.
diff --git a/signature/signature_derive/src/lib.rs b/signature/signature_derive/src/lib.rs index 81a3094..1059318 100644 --- a/signature/signature_derive/src/lib.rs +++ b/signature/signature_derive/src/lib.rs @@ -20,7 +20,7 @@ fn derive_signer(mut s: synstructure::Structure) -> TokenStream { s.gen_impl(quote! { ...
4
17
15
754bf0e25a9599b2851402e400e874477705de04
Chris Beck
2020-04-12T03:39:20
Uprev generic array to version 0.14 In 0.14 they added a pretty nice feature, which is that you can now split not just arrays that you hold by value, but you can split references to generic arrays, into a pair of references to generic arrays corresponding to the subslices, where the size calculations are done correctl...
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index d18a3ef..81179f2 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["crypto", "encryption"] categories = ["cryptography", "no-std"] [dependencies] -generic-array = { version = "0.13", default-features = false } +generic-array = { ver...
5
5
5
7f12dc5f2898937c44a125769d377c5d8f688f7d
Tony Arcieri
2020-03-16T15:23:26
signature: add more docs for `Signature` trait
diff --git a/signature/src/signature.rs b/signature/src/signature.rs index 9db7661..d03a39a 100644 --- a/signature/src/signature.rs +++ b/signature/src/signature.rs @@ -17,6 +17,17 @@ use crate::{ /// wrapper around the "bag-of-bytes" serialized form of a signature which can /// be directly parsed from or written to ...
1
11
0
291f119fec9e91ff8c8f28831bbb78044d912970
Tony Arcieri
2020-03-16T14:45:02
signature: improve Debug impl on Error In the event errors have a source, this invokes the `Display` impl on the source (required by the bounds of `std::error::Error`) to make it easier to inspect.
diff --git a/signature/src/error.rs b/signature/src/error.rs index 86d35c4..9fba1e6 100644 --- a/signature/src/error.rs +++ b/signature/src/error.rs @@ -1,6 +1,6 @@ //! Signature error types -use core::fmt::{self, Display}; +use core::fmt::{self, Debug, Display}; #[cfg(feature = "std")] use std::boxed::Box; @@ -...
1
22
2
e9e24b1d09c544925b60cfe48715cdae3b66ba13
Tony Arcieri
2020-03-16T14:26:10
signature: fix derive tests These apparently aren't running in CI
diff --git a/signature/src/lib.rs b/signature/src/lib.rs index 01a7378..14f3baf 100644 --- a/signature/src/lib.rs +++ b/signature/src/lib.rs @@ -161,11 +161,6 @@ #[cfg(feature = "std")] extern crate std; -#[cfg(feature = "derive-preview")] -#[allow(unused_imports)] -#[macro_use] -extern crate signature_derive; - #...
2
2
7
cd7d5bfb3e18ec8304461df065a347780d84c46b
Tony Arcieri
2020-03-16T13:59:59
signature: rename Signature::as_slice -> Signature::as_bytes
diff --git a/signature/src/signature.rs b/signature/src/signature.rs index d47978e..9db7661 100644 --- a/signature/src/signature.rs +++ b/signature/src/signature.rs @@ -11,13 +11,22 @@ use crate::{ verifier::{DigestVerifier, Verifier}, }; -/// Trait impl'd by concrete types that represent digital signatures +//...
1
12
3
65eb2dff635bc17e29868f8f481329fabc9d935e
Tony Arcieri
2020-03-10T19:03:49
signature: have Signature::from_bytes take a byte slice ...rather than `impl AsRef<[u8]>`, which both breaks object safety, and in many cases is less convenient (e.g. when deref coercion would allow types that don't impl AsRef to work)
diff --git a/signature/src/signature.rs b/signature/src/signature.rs index 75a5dfd..d47978e 100644 --- a/signature/src/signature.rs +++ b/signature/src/signature.rs @@ -14,7 +14,7 @@ use crate::{ /// Trait impl'd by concrete types that represent digital signatures pub trait Signature: AsRef<[u8]> + Debug + Sized { ...
1
1
1
e011bda184fb46ef66073a701b45e42a9c7d324a
Tony Arcieri
2020-03-10T18:52:02
signature: ensure `Error::new()` is mandatory Prevents usage of `Error {}` in `no_std` contexts.
diff --git a/signature/src/error.rs b/signature/src/error.rs index c456431..86d35c4 100644 --- a/signature/src/error.rs +++ b/signature/src/error.rs @@ -18,6 +18,10 @@ use std::boxed::Box; /// [BB'06]: https://en.wikipedia.org/wiki/Daniel_Bleichenbacher #[derive(Debug, Default)] pub struct Error { + /// Prevent f...
1
5
0
14ab639d26b04f044ef649c6a3f8da63370ca35f
Robin Lambertz
2020-03-09T16:18:04
Mark preview feature as unstable in Cargo.toml
diff --git a/signature/Cargo.toml b/signature/Cargo.toml index 5290fc5..dec65f9 100644 --- a/signature/Cargo.toml +++ b/signature/Cargo.toml @@ -32,10 +32,13 @@ sha2 = { version = "0.8", default-features = false } [features] default = ["std"] +std = [] + +# Preview features are unstable and exempt from semver. +# S...
1
4
1
035285efe04b3f3e4403a8a7c010b1b6744bd375
Tony Arcieri
2020-03-08T23:40:34
signature: remove BoxError type alias We can revisit adding this back after 1.0, but it seems possible such a type may eventually be stabilized in `std`. It's better to "wait and see" if that happens and add `BoxError` back in the event there's a desire for more ergonomic boxed errors for `std` users rather than prem...
diff --git a/signature/src/error.rs b/signature/src/error.rs index 78be999..c456431 100644 --- a/signature/src/error.rs +++ b/signature/src/error.rs @@ -5,12 +5,6 @@ use core::fmt::{self, Display}; #[cfg(feature = "std")] use std::boxed::Box; -/// Box containing a thread-safe + `'static` error suitable for use as a...
1
6
10
b1af0c0f8ed54b61dcd762722068881c93017b5d
Tony Arcieri
2020-03-08T18:35:30
signature: fix docs.rs rendering Fixes rendering of `doc(cfg(...))` on docs.rs by passing the proper `cfg` attribute in that environment and enabling the `doc_cfg` (nightly-only) feature.
diff --git a/signature/Cargo.toml b/signature/Cargo.toml index 5808bcc..2426093 100644 --- a/signature/Cargo.toml +++ b/signature/Cargo.toml @@ -39,3 +39,4 @@ std = [] [package.metadata.docs.rs] all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/signature/src/error.rs b/signature/src/error.rs inde...
3
17
3
3722b76bc85c3abd72882be17d6aec57b50ac89f
Tony Arcieri
2020-03-08T17:30:38
signature: Error cleanups - Don't print `Error::source` in the `Display` impl for `Error` as this information is available as `Error::source`'s `Display` - Adds a `From` impl for creating an `Error` from a `BoxError`.
diff --git a/signature/src/error.rs b/signature/src/error.rs index 48ff02f..73996cb 100644 --- a/signature/src/error.rs +++ b/signature/src/error.rs @@ -41,16 +41,14 @@ impl Error { impl Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "signature error")?; - - ...
2
9
11
00030f8fa602f3c4e67ab7fe0b8e51eb13dee5ab
Tony Arcieri
2020-03-08T17:07:50
signature: add RandomizedSigner trait Adds a trait which allows passing a `rand_core::CryptoRng` to the signing operation, which is useful for signature algorithms which rely on a source of randomness, e.g. RSASSA-PSS and traditional ECDSA (with a random `k` value) Presently gated under the `rand-preview` feature (si...
diff --git a/signature/Cargo.toml b/signature/Cargo.toml index e11f8b6..8fca88a 100644 --- a/signature/Cargo.toml +++ b/signature/Cargo.toml @@ -16,6 +16,11 @@ version = "0.8" optional = true default-features = false +[dependencies.rand_core] +version = "0.5" +optional = true +default-features = false + [dependenc...
4
64
6
46d1da1af4a82ff637cda6ac83b788e1b5b698da
Chris West (Faux)
2020-01-18T11:57:16
chore: no-change generic-array 0.12 -> 0.13
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index 74c8b8a..082335c 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["crypto", "encryption"] categories = ["cryptography", "no-std"] [dependencies] -generic-array = { version = "0.12", default-features = false } +generic-array = { ver...
6
7
7
1a8bda7764e1e7253a9b9fc483d3cdbcc830e423
linkmauve
2020-02-25T23:59:44
Remove deprecated std::error::Error::description() It’s been deprecated since Rust 1.41, and we already have a Display implementation anyway.
diff --git a/crypto-mac/src/errors.rs b/crypto-mac/src/errors.rs index 8472a96..2414d7d 100644 --- a/crypto-mac/src/errors.rs +++ b/crypto-mac/src/errors.rs @@ -23,15 +23,7 @@ impl fmt::Display for InvalidKeyLength { } #[cfg(feature = "std")] -impl error::Error for MacError { - fn description(&self) -> &str { - ...
1
2
10
e020ecfd83c5d1f5d19b674d071b858ea1369088
Tony Arcieri
2019-11-30T21:31:24
aead: Add optional `std` feature ...with `std::error::Error` impl for `aead::Error`. This is the least-common-bound for `std` users using a type erasure strategy for error handling, so it's helpful for error types to impl this trait when users want that.
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index 74c8b8a..4007e3f 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -17,6 +17,7 @@ heapless = { version = "0.5", optional = true } [features] default = ["alloc"] alloc = [] +std = ["alloc"] [package.metadata.docs.rs] all-features = true diff --git a/aead/sr...
2
14
0
4569d256f02ac0ecefa393baf225fb4a6df35875
newpavlov
2019-11-18T04:15:58
aead v0.2.0
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index 534ad06..74c8b8a 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aead" -version = "0.1.2" +version = "0.2.0" authors = ["RustCrypto Developers"] edition = "2018" license = "MIT OR Apache-2.0"
1
1
1
2003e14ef9bee82f88315f0b780d1e1d3351af14
newpavlov
2019-11-17T23:43:20
aead v0.1.2
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index 3916e90..534ad06 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aead" -version = "0.1.1" +version = "0.1.2" authors = ["RustCrypto Developers"] edition = "2018" license = "MIT OR Apache-2.0"
1
1
1
5222a4725e97654ba8279f7c249185c8b781e496
Tony Arcieri
2019-11-17T23:35:16
aead: Add in-place API based on `Buffer` trait (#59) Defines a `Buffer` trait for `Vec`-like types which impl `AsRef<[u8]>`, `AsMut<[u8]>`, `extend_from_slice()`, and `truncate()`, and optionally impls it for `Vec<u8>` (when the `alloc` feature is enabled), along with the option to use `heapless::Vec` (when the `he...
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index 95c2781..3916e90 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -7,12 +7,16 @@ license = "MIT OR Apache-2.0" description = "Traits for Authenticated Encryption with Associated Data (AEAD) algorithms" documentation = "https://docs.rs/aead" repository = "http...
2
178
37
8e522f8a12dffbb6a01f6f64da7b5a353968862c
Tony Arcieri
2019-11-17T22:43:56
Add detached in-place encrypt/decrypt API; make alloc optional (#58) This commit adds `encrypt_in_place_detached()` and `decrypt_in_place_detached()` methods to `Aead` and `AeadMut`, along with default implementations of `encrypt()` and `decrypt()` which assume a postfix authentication tag. Presently all of the ...
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index beea5f4..95c2781 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -12,3 +12,7 @@ categories = ["cryptography", "no-std"] [dependencies] generic-array = { version = "0.12", default-features = false } + +[features] +default = ["alloc"] +alloc = [] diff --git a...
2
131
5
5b012e4b0637d7bbe21b30a816df5db033ba1179
newpavlov
2019-10-03T21:51:14
universal-hash v0.3.0
diff --git a/universal-hash/Cargo.toml b/universal-hash/Cargo.toml index a2c4818..35b072e 100644 --- a/universal-hash/Cargo.toml +++ b/universal-hash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "universal-hash" -version = "0.2.0" +version = "0.3.0" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" ...
1
1
1
7fcf935865f1098401b572719f3c48e78cbd4e2a
Tony Arcieri
2019-10-03T21:49:33
universal-hash: OutputSize -> BlockSize (#57)
diff --git a/universal-hash/src/lib.rs b/universal-hash/src/lib.rs index 5f1c606..26f7d91 100644 --- a/universal-hash/src/lib.rs +++ b/universal-hash/src/lib.rs @@ -31,14 +31,14 @@ use subtle::{Choice, ConstantTimeEq}; pub trait UniversalHash: Clone { /// Size of the key for the universal hash function type ...
1
7
7
49ff722f156bf24c275800af7d6948daac8bc151
Tony Arcieri
2019-08-30T19:54:16
rustfmt (#54)
diff --git a/block-cipher-trait/src/dev.rs b/block-cipher-trait/src/dev.rs index f34b63c..938df68 100644 --- a/block-cipher-trait/src/dev.rs +++ b/block-cipher-trait/src/dev.rs @@ -1,13 +1,12 @@ - #[macro_export] macro_rules! new_test { ($name:ident, $test_name:expr, $cipher:ty) => { #[test] fn...
11
205
161
e14229b918044681ca10023230eaef6cf0c74320
newpavlov
2019-08-30T16:06:24
bump aead version to 0.1.1
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index a32c2e6..beea5f4 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aead" -version = "0.1.0" +version = "0.1.1" authors = ["RustCrypto Developers"] edition = "2018" license = "MIT OR Apache-2.0"
1
1
1
09aee1558dddb1b83b24481b072c7ee5c44a68fc
Tony Arcieri
2019-08-29T15:15:23
aead: Rename StatelessAead -> Aead; Aead -> AeadMut (closes #46) (#49)
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index 5713cc0..87bd1d2 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -12,8 +12,7 @@ use generic_array::{typenum::Unsigned, ArrayLength, GenericArray}; #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct Error; -/// A trait which can b...
1
41
41
f41a93e91eb93e15bf9a143e043277f19e2b5bda
newpavlov
2019-08-29T14:53:19
aead Cargo.toml edits
diff --git a/aead/Cargo.toml b/aead/Cargo.toml index 66ca8e1..a32c2e6 100644 --- a/aead/Cargo.toml +++ b/aead/Cargo.toml @@ -1,11 +1,14 @@ [package] name = "aead" version = "0.1.0" -authors = ["James Cape <james@mobilecoin.com>"] +authors = ["RustCrypto Developers"] edition = "2018" -description = """ -Traits for A...
1
7
4
e8ce10e203ed54519ac42a14a92d9aa1562aa795
Tony Arcieri
2019-08-29T14:49:53
aead: Add `Payload` type (#48)
diff --git a/aead/src/lib.rs b/aead/src/lib.rs index 856819b..5713cc0 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -7,7 +7,7 @@ extern crate alloc; pub use generic_array; use alloc::vec::Vec; -use generic_array::{GenericArray, ArrayLength, typenum::Unsigned}; +use generic_array::{typenum::Unsigned, ArrayLe...
1
72
23
4765384e8c18f69d46af9c06b5890f21aaa1778c
newpavlov
2019-08-18T00:38:39
fix new_seek_test
diff --git a/stream-cipher/Cargo.toml b/stream-cipher/Cargo.toml index a72e7d7..7e0d119 100644 --- a/stream-cipher/Cargo.toml +++ b/stream-cipher/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stream-cipher" -version = "0.3.1" +version = "0.3.2" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" descr...
2
6
3
8e7258034e715348938924a471c58c93d325281b
newpavlov
2019-08-17T21:38:39
fix new_seek_test
diff --git a/stream-cipher/Cargo.toml b/stream-cipher/Cargo.toml index fdfaf6e..a72e7d7 100644 --- a/stream-cipher/Cargo.toml +++ b/stream-cipher/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stream-cipher" -version = "0.3.0" +version = "0.3.1" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" descr...
2
3
2
530b79544491e401e6bd0da578bfdecd17c34282
newpavlov
2019-06-30T04:43:00
digest v0.8.1
diff --git a/digest/Cargo.toml b/digest/Cargo.toml index 3b26a74..5825ca0 100644 --- a/digest/Cargo.toml +++ b/digest/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "digest" -version = "0.8.0" +version = "0.8.1" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" description = "Traits for cryptographic ...
1
1
1
3377afdbc7e3cef2663b6322510d28d040cfb295
Artyom Pavlov
2019-06-30T03:22:27
Add box_clone to DynDigest (#39)
diff --git a/digest/src/dyn_digest.rs b/digest/src/dyn_digest.rs index 789cdc8..2af43a8 100644 --- a/digest/src/dyn_digest.rs +++ b/digest/src/dyn_digest.rs @@ -23,24 +23,22 @@ pub trait DynDigest { /// Get output size of the hasher fn output_size(&self) -> usize; + + /// Clone hasher state into a boxed ...
1
14
7
128e557120632b623f55356a539b1c9c991d6626
Artyom Pavlov
2019-01-25T02:58:46
Bump crypt-mac version to v0.8.0
diff --git a/crypto-mac/Cargo.toml b/crypto-mac/Cargo.toml index 0145d2b..51af928 100644 --- a/crypto-mac/Cargo.toml +++ b/crypto-mac/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crypto-mac" -version = "0.7.0" +version = "0.8.0" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" description = "Trait...
1
1
1
2ed5d5a3a254c61c60cd0cf14931841b6f5c27ef
Henry de Valence
2019-01-25T02:57:31
Use subtle v2 (#33)
diff --git a/crypto-mac/Cargo.toml b/crypto-mac/Cargo.toml index 5b2421a..0145d2b 100644 --- a/crypto-mac/Cargo.toml +++ b/crypto-mac/Cargo.toml @@ -11,7 +11,7 @@ categories = ["cryptography", "no-std"] [dependencies] generic-array = "0.12" -subtle = { version = "1", default-features = false } +subtle = { version =...
1
1
1
727a18f143cda9e0da7fc925722d77ae254d201a
newpavlov
2018-11-14T16:07:51
block-cipher-trait v0.6.2
diff --git a/block-cipher-trait/Cargo.toml b/block-cipher-trait/Cargo.toml index 4efca47..267798e 100644 --- a/block-cipher-trait/Cargo.toml +++ b/block-cipher-trait/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "block-cipher-trait" -version = "0.6.1" +version = "0.6.2" authors = ["RustCrypto Developers"] license = "...
1
1
1
3cce5eef6dd26d9bcb2dc31d611fa726eb9c6e26
Jonas Schievink
2018-11-14T07:43:25
block-cipher-trait: fix the repository link (#29)
diff --git a/block-cipher-trait/Cargo.toml b/block-cipher-trait/Cargo.toml index 0eaf7bc..4efca47 100644 --- a/block-cipher-trait/Cargo.toml +++ b/block-cipher-trait/Cargo.toml @@ -5,7 +5,7 @@ authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" description = "Traits for description of block ciphers" do...
1
1
1
bc79ccb48b97aa1c7ea1b442763be126900094ae
newpavlov
2018-11-01T13:40:29
stream-cipher v0.3.0
diff --git a/stream-cipher/Cargo.toml b/stream-cipher/Cargo.toml index 08d0504..fdfaf6e 100644 --- a/stream-cipher/Cargo.toml +++ b/stream-cipher/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stream-cipher" -version = "0.2.2" +version = "0.3.0" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" descr...
3
188
46