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 |
|---|---|---|---|---|---|---|---|
c211b130ec493f79283e3c53c31f417cb77bb457 | Tony Arcieri | 2021-04-29T18:24:46 | Bump `aes` dev dependency to v0.7 release (#232) | diff --git a/Cargo.lock b/Cargo.lock
index 434d189..ab01898 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,13 +3,13 @@
#
[[package]]
name = "aes"
-version = "0.7.0-pre"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c89fe2093c8636691cd8ad25555898ec057ca42fbfd79f36... | 5 | 7 | 13 |
53d0c27012002a0de1a9a5c724a84c21435571ed | Tony Arcieri | 2021-04-29T16:13:52 | chacha20: use `cpufeatures` v0.1 crate release (#230)
Renamed from `cpuid-bool` | diff --git a/Cargo.lock b/Cargo.lock
index dadb0d7..2b96b82 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -49,7 +49,7 @@ version = "0.7.0-pre"
dependencies = [
"cfg-if",
"cipher",
- "cpuid-bool",
+ "cpufeatures",
"hex-literal",
"rand_core",
"zeroize",
@@ -65,6 +65,12 @@ dependencies = [
"generic-array",
]
... | 3 | 9 | 3 |
6a2d54abb3e96871c158eb5991f3e24529a55ab3 | Tony Arcieri | 2021-04-28T23:06:36 | Cargo.lock: bump dependencies (#228) | diff --git a/Cargo.lock b/Cargo.lock
index 71a4d8c..af4ab15 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,7 +4,7 @@
[[package]]
name = "aes"
version = "0.7.0-pre"
-source = "git+https://github.com/RustCrypto/block-ciphers.git#7236bce0b75b7bcf719add5e88890bd667ebb95f"
+source = "git+https://github.com/RustCrypto/blo... | 1 | 17 | 17 |
24a0f0f0c6c9f9603d81fee661ba17667331007f | Tony Arcieri | 2021-04-28T22:41:17 | ctr v0.7.0-pre.4 (#227)
Due to a cyclical dependency between `aes` and `ctr`, this is expected
to fail CI, and can only be fixed by a new `ctr` crate release. | diff --git a/ctr/Cargo.toml b/ctr/Cargo.toml
index dfbfe03..9bf6eb0 100644
--- a/ctr/Cargo.toml
+++ b/ctr/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ctr"
-version = "0.7.0-pre.3"
+version = "0.7.0-pre.4"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
description = "CTR block mode of operation" | 1 | 1 | 1 |
6a09740b2b036fc0d9c81022924f5564eb749408 | Tony Arcieri | 2021-04-28T22:36:13 | Bump `cipher` crate dependency to v0.3 release (#226)
Due to a cyclical dependency between `aes` and `ctr`, this is expected
to fail CI, and can only be fixed by a new `ctr` crate release. | diff --git a/cfb-mode/Cargo.toml b/cfb-mode/Cargo.toml
index 3944d23..1ac6e95 100644
--- a/cfb-mode/Cargo.toml
+++ b/cfb-mode/Cargo.toml
@@ -12,9 +12,9 @@ readme = "README.md"
edition = "2018"
[dependencies]
-cipher = "0.3.0-pre.4"
+cipher = "0.3"
[dev-dependencies]
aes = { version = "=0.7.0-pre", features = ["... | 8 | 15 | 15 |
9fafcd6058d24883737dc798c9c3d5569f52cecd | Tony Arcieri | 2021-04-28T21:54:55 | Revert "cipher v0.3.0-pre.5 (#224)" (#225)
This reverts commit 7786dc4e81b543a507a64ad7c014619c493722d3. | diff --git a/cfb-mode/Cargo.toml b/cfb-mode/Cargo.toml
index 193dd22..3944d23 100644
--- a/cfb-mode/Cargo.toml
+++ b/cfb-mode/Cargo.toml
@@ -12,9 +12,9 @@ readme = "README.md"
edition = "2018"
[dependencies]
-cipher = "0.3.0-pre.5"
+cipher = "0.3.0-pre.4"
[dev-dependencies]
aes = { version = "=0.7.0-pre", featu... | 8 | 15 | 15 |
7786dc4e81b543a507a64ad7c014619c493722d3 | Tony Arcieri | 2021-04-28T21:40:13 | cipher v0.3.0-pre.5 (#224)
Due to a cyclical dependency between `aes` and `ctr`, this is expected
to fail CI, and can only be fixed by a new `aes` crate release. | diff --git a/cfb-mode/Cargo.toml b/cfb-mode/Cargo.toml
index 3944d23..193dd22 100644
--- a/cfb-mode/Cargo.toml
+++ b/cfb-mode/Cargo.toml
@@ -12,9 +12,9 @@ readme = "README.md"
edition = "2018"
[dependencies]
-cipher = "0.3.0-pre.4"
+cipher = "0.3.0-pre.5"
[dev-dependencies]
aes = { version = "=0.7.0-pre", featu... | 8 | 15 | 15 |
2de3c47386ea727964671be0bea72817e1b34017 | Tony Arcieri | 2021-04-20T13:58:58 | rustfmt (#223)
Applies rustfmt 1.4.36-stable (7de6968e 2021-02-07) | diff --git a/chacha20/src/backend/autodetect.rs b/chacha20/src/backend/autodetect.rs
index 9a12b3c..93701ca 100644
--- a/chacha20/src/backend/autodetect.rs
+++ b/chacha20/src/backend/autodetect.rs
@@ -2,8 +2,8 @@
//! to the SSE2 backend when it's unavailable (the `sse2` target feature is
//! enabled-by-default on all... | 4 | 9 | 6 |
ba7d695ce1e9bbe3ca7e006d3248850ef7c4c90b | Tony Arcieri | 2021-03-16T14:43:37 | chacha20: remove `Clone` impls on RNGs (#220)
Removes `derive(Clone)` on `ChaCha*Rng*`.
They date back to the original PR which added RNG support (#63).
Allowing `Clone` on an RNG is problematic because the cloned RNG will
have the same internal state, duplicating outputs which can be
catastrophic in a cryptog... | diff --git a/chacha20/src/rng.rs b/chacha20/src/rng.rs
index 507c6bc..37aaf4a 100644
--- a/chacha20/src/rng.rs
+++ b/chacha20/src/rng.rs
@@ -1,7 +1,9 @@
//! Block RNG based on rand_core::BlockRng
-use rand_core::block::{BlockRng, BlockRngCore};
-use rand_core::{CryptoRng, Error, RngCore, SeedableRng};
+use rand_core... | 1 | 4 | 4 |
119c9f496cf2a7180ee136fa7079aa8ed2d8b948 | Joe Doyle | 2021-01-11T14:46:36 | ChaCha20 (legacy, xchacha): full 64bit counters (#217)
Adds a Rounds-style tag trait for different possible values of MAX_BLOCKS.
Converts `check_data_len` to an overflow-friendly version which can check
64-bit counters without requiring 128-bit arithmetic.
Adds tests exercising the 64-bit counters of ChaCha20L... | diff --git a/chacha20/src/chacha.rs b/chacha20/src/chacha.rs
index 6ac501d..8f5e47e 100644
--- a/chacha20/src/chacha.rs
+++ b/chacha20/src/chacha.rs
@@ -6,8 +6,9 @@
use crate::{
backend::{Core, BUFFER_SIZE},
+ max_blocks::{MaxCounter, C32},
rounds::{Rounds, R12, R20, R8},
- BLOCK_SIZE, MAX_BLOCKS,
+ ... | 7 | 181 | 31 |
131cd4be4934b5858158326fa2d5e658fd16d333 | Joe Doyle | 2021-01-06T14:27:48 | ChaCha20: Fix stream-length overflow check (#216) | diff --git a/chacha20/src/chacha.rs b/chacha20/src/chacha.rs
index 40ea3f6..6ac501d 100644
--- a/chacha20/src/chacha.rs
+++ b/chacha20/src/chacha.rs
@@ -162,8 +162,18 @@ impl<R: Rounds> StreamCipherSeek for ChaCha<R> {
fn try_seek<T: SeekNum>(&mut self, pos: T) -> Result<(), LoopError> {
let res = pos.t... | 2 | 126 | 9 |
03ecd495ff073bd74713fa21dc246ca5eec52455 | Tony Arcieri | 2020-12-31T17:51:30 | Bump `aes` crate (#211)
The `aes` crate is used for several tests, and just got an MSRV breaking
change in RustCrypto/block-ciphers#216.
This commit bumps the git dependency to test the crates in this repo
with the MSRV changes. | diff --git a/Cargo.lock b/Cargo.lock
index 376af58..3e67107 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,7 +4,7 @@
[[package]]
name = "aes"
version = "0.7.0-pre"
-source = "git+https://github.com/RustCrypto/block-ciphers.git#3215a921f894f533882dc1a3cf55242237fca4ed"
+source = "git+https://github.com/RustCrypto/blo... | 5 | 5 | 5 |
e6b08f9709ed37caa8796906d987377772701bdb | Tony Arcieri | 2020-12-30T16:54:31 | Re-enable `aes` dev-dependencies (again) (#210)
Completes the `cipher` v0.3.0-pre.4 upgrade started in #208, now that
the `aes` crate has been updated as part of this PR:
https://github.com/RustCrypto/block-ciphers/pull/218 | diff --git a/Cargo.lock b/Cargo.lock
index d9939ec..376af58 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,17 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
#
+[[package]]
+name = "aes"
+version = "0.7.0-pre"
+source = "git+https://github.com/RustCrypto/block-ciph... | 8 | 34 | 18 |
b744e3d64e5ecfb50f0bdc42a321e75d6bc5a08f | Tony Arcieri | 2020-12-30T16:35:41 | ctr v0.7.0-pre.3 (#209) | diff --git a/Cargo.lock b/Cargo.lock
index 4adb79b..d9939ec 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -59,7 +59,7 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
[[package]]
name = "ctr"
-version = "0.7.0-pre.2"
+version = "0.7.0-pre.3"
dependencies = [
"cipher",
"hex-literal... | 2 | 2 | 2 |
d0657f7a4fe50b43ce639f91e3fc65bf7242b862 | Tony Arcieri | 2020-12-30T16:28:55 | Bump `cipher` crate to v0.3.0-pre.4 (#208)
Note: this commit disables the (circular) `aes` dependency, so
AES-related tests will fail until the `aes` crate can be updated
to use the new `ctr` crate. | diff --git a/Cargo.lock b/Cargo.lock
index b44766f..4adb79b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,17 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
#
-[[package]]
-name = "aes"
-version = "0.7.0-pre"
-source = "git+https://github.com/RustCrypto/block-ciph... | 9 | 27 | 43 |
c40cf4cfcb85113e8d7788b12de3765c87d57741 | Tony Arcieri | 2020-12-30T05:45:47 | Enable `aes` dev-dependencies (#207)
This commit completes working through upgrading the `cipher` crate with
circular dependencies between `aes` and `ctr`.
Now that RustCrypto/block-ciphers#217 it's possible to complete the
`cipher` crate upgrade started in #205.
All tests are now passing again. | diff --git a/Cargo.lock b/Cargo.lock
index 90bece1..b44766f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,17 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
#
+[[package]]
+name = "aes"
+version = "0.7.0-pre"
+source = "git+https://github.com/RustCrypto/block-ciph... | 6 | 32 | 16 |
8891899eeed33903c53aa3ae4d2a3d1a7fe605e1 | Tony Arcieri | 2020-12-30T04:34:55 | ctr v0.7.0-pre.2 (#206) | diff --git a/Cargo.lock b/Cargo.lock
index 6258f59..90bece1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -59,7 +59,7 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
[[package]]
name = "ctr"
-version = "0.7.0-pre"
+version = "0.7.0-pre.2"
dependencies = [
"cipher",
"hex-literal",... | 2 | 2 | 2 |
63ee3a25c7606f57879eb437fcc043f97fac7280 | Tony Arcieri | 2020-12-30T04:27:59 | Bump `cipher` crate to v0.3.0-pre.3 (#205)
Implements the changes from:
https://github.com/RustCrypto/traits/pull/435
Unfortunately there's a circular dependency with `aes`, which now pulls
in `ctr`, so the tests which depend on AES are failing.
The plan is to land these changes first, then update the `block... | diff --git a/Cargo.lock b/Cargo.lock
index dd08a2e..6258f59 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,16 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
#
-[[package]]
-name = "aes"
-version = "0.7.0-pre"
-source = "git+https://github.com/RustCrypto/block-ciph... | 31 | 137 | 175 |
8dcd0649c6955bca62aa0c30576dc0cb02071cdf | Tony Arcieri | 2020-12-10T14:05:17 | chacha20: rename `backend` module and types (#199)
...to `State`, for more consistency with other RustCrypto projects | diff --git a/chacha20/src/block.rs b/chacha20/src/backend.rs
similarity index 82%
rename from chacha20/src/block.rs
rename to chacha20/src/backend.rs
index 5dfba12..836a241 100644
--- a/chacha20/src/block.rs
+++ b/chacha20/src/backend.rs
@@ -26,26 +26,26 @@ mod avx2;
any(target_arch = "x86", target_arch = "x86_64"... | 8 | 22 | 22 |
7ddcab10a66a3750243597694631c3fd8da91981 | Artyom Pavlov | 2020-12-04T13:33:03 | Generic CTR (#195) | diff --git a/ctr/src/ctr128.rs b/ctr/src/ctr128.rs
deleted file mode 100644
index afb63cb..0000000
--- a/ctr/src/ctr128.rs
+++ /dev/null
@@ -1,194 +0,0 @@
-//! Generic implementation of CTR mode for block cipher with 128-bit block size.
-
-use cipher::{
- block::{Block, BlockCipher, BlockEncrypt, NewBlockCipher, Par... | 10 | 591 | 448 |
26e1787d0e555f4bd6c13789b8a08b55576a56fa | Tony Arcieri | 2020-12-03T18:14:06 | ctr: remove Ctr32LE mask bit (#197)
AES-GCM-SIV masks the highest bit of the nonce, and as the Ctr32LE type
is intended for implementing AES-GCM-SIV, it reflects this.
However, this makes the implementations of Ctr32LE and Ctr32BE slightly
different and therefore complicates a generic implementation.
This mask... | diff --git a/ctr/src/ctr32.rs b/ctr/src/ctr32.rs
index 7b45c40..10f739f 100644
--- a/ctr/src/ctr32.rs
+++ b/ctr/src/ctr32.rs
@@ -32,46 +32,26 @@ where
ctr: Ctr32<B, LittleEndian>,
}
-impl<B> FromBlockCipher for Ctr32BE<B>
-where
- B: BlockCipher + BlockEncrypt,
- B::ParBlocks: ArrayLength<Block<B>>,
- ... | 3 | 41 | 50 |
c01f4663a9607f976fdab46c7f3d934e2abd02f5 | Tony Arcieri | 2020-12-02T21:50:36 | ctr: add newline (#196) | diff --git a/ctr/src/ctr32.rs b/ctr/src/ctr32.rs
index 3a08391..7b45c40 100644
--- a/ctr/src/ctr32.rs
+++ b/ctr/src/ctr32.rs
@@ -7,6 +7,7 @@ use cipher::{
stream::{FromBlockCipher, LoopError, SyncStreamCipher},
};
use core::{convert::TryInto, marker::PhantomData, mem};
+
/// CTR mode with a 32-bit big endian co... | 1 | 1 | 0 |
aa547a7f910166071b912dc34c22ade5acd6408e | Joonas Koivunen | 2020-12-02T04:14:31 | fix: u64 -> u128 counter change (#75)
before the counter used to be an u64 which would produce different
output whenever nonce plus counter should had affected the upper 64-bits
as well. this fixes most of the code to use u128 as both nonce and
counter and wrapping operations to match openssl aes-ctr-128. | diff --git a/ctr/src/ctr128.rs b/ctr/src/ctr128.rs
index 75ec5fa..afb63cb 100644
--- a/ctr/src/ctr128.rs
+++ b/ctr/src/ctr128.rs
@@ -30,8 +30,8 @@ where
{
cipher: C,
block: Block<C>,
- nonce: [u64; 2],
- counter: u64,
+ nonce: u128,
+ counter: u128,
pos: u8,
}
@@ -46,10 +46,11 @@ where
... | 1 | 16 | 23 |
c4813674f32dde86cda5eada481d8e89d0cf0b37 | Tony Arcieri | 2020-11-26T13:14:33 | ctr v0.7.0-pre (#194) | diff --git a/Cargo.lock b/Cargo.lock
index 161c657..44b5f73 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -62,7 +62,7 @@ dependencies = [
[[package]]
name = "ctr"
-version = "0.7.0"
+version = "0.7.0-pre"
dependencies = [
"aes",
"cipher",
diff --git a/ctr/Cargo.toml b/ctr/Cargo.toml
index fadf2d0..0046f7a 100644... | 2 | 2 | 2 |
a38cd0ea0f0a6670720bf4ef98afede725cb0c54 | Wouter Geraedts | 2020-11-12T00:09:30 | salsa20: do not use zeroize default features to prevent alloc inclusion (#189) | diff --git a/salsa20/Cargo.toml b/salsa20/Cargo.toml
index 80f0d2c..e2fccf8 100644
--- a/salsa20/Cargo.toml
+++ b/salsa20/Cargo.toml
@@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
cipher = "0.2"
-zeroize = { version = "1", optional = true }
+zeroize = { version = "1", default-features = false, optional = true }
... | 1 | 1 | 1 |
c136ff0e8dcd2f0b6c164c5caf2d5952994bc7af | Tony Arcieri | 2020-11-01T22:33:32 | Bump `cipher` crate to v0.2.5 (#187)
This PR also addresses the deprecation warnings which were introduced | diff --git a/Cargo.lock b/Cargo.lock
index 9931b1d..4ea077f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -77,9 +77,9 @@ dependencies = [
[[package]]
name = "cipher"
-version = "0.2.1"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1f7954ae5588102b35257639b1c36a2e74... | 20 | 36 | 36 |
b01655fba49d0516b6000ed39c680da8815be7e5 | Tony Arcieri | 2020-10-25T13:54:48 | chacha20/Cargo.toml: update description (#184)
It presently refers to the now defunct `stream-cipher` crate | diff --git a/chacha20/Cargo.toml b/chacha20/Cargo.toml
index 088657b..b13856f 100644
--- a/chacha20/Cargo.toml
+++ b/chacha20/Cargo.toml
@@ -5,7 +5,7 @@ authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
description = """
The ChaCha20 stream cipher (RFC 8439) implemented in pure Rust using traits
-fro... | 1 | 1 | 1 |
9c69c5407f73323f1e0f9dc6d61e5254ed29e28b | Tony Arcieri | 2020-10-18T16:33:24 | salsa20: add `expose-core` feature (#180)
Cargo feature to expose `salsa20::Block` as part of the public API.
This can be used by the `scrypt` crate to implement the Salsa20/8 core
function, rather than vendoring an implementation. This allows us to
work on optimizations in a single place (i.e. this crate). | diff --git a/salsa20/Cargo.toml b/salsa20/Cargo.toml
index 0687f88..403af00 100644
--- a/salsa20/Cargo.toml
+++ b/salsa20/Cargo.toml
@@ -19,9 +19,10 @@ cipher = { version = "0.2", features = ["dev"] }
[features]
default = ["xsalsa20"]
+expose-core = []
hsalsa20 = ["xsalsa20"]
xsalsa20 = []
[package.metadata.do... | 4 | 28 | 11 |
a4aa5001c9b8e946c4daae7322043cadbf8730a7 | Tony Arcieri | 2020-10-16T16:58:52 | salsa20: internal refactoring (#178)
Unifies the `Salsa`/`SalsaCore` types, as one was previously just a thin
wrapper around the other.
This matches the structure of the `chacha20` crate. | diff --git a/salsa20/src/block.rs b/salsa20/src/block.rs
index 75c9611..bf18613 100644
--- a/salsa20/src/block.rs
+++ b/salsa20/src/block.rs
@@ -1,6 +1,6 @@
//! The Salsa20 block function.
-use crate::{rounds::Rounds, BLOCK_SIZE, CONSTANTS, IV_SIZE, KEY_SIZE, STATE_WORDS};
+use crate::{rounds::Rounds, Key, Nonce, BL... | 4 | 66 | 94 |
0b3a4ec3ef72fb81eee1ed7a65a24d9e33079c69 | Tony Arcieri | 2020-10-14T18:02:34 | ctr: vendor Ctr32BE and Ctr32LE types (#170)
Imports and unifies the 32-bit CTR mode implementations previously
defined in the `aes-gcm` and `aes-gcm-siv` crates, which implement
32-bit big endian and little endian counter modes respectively.
Additionally makes them generic over any block size, and impls the
`Fr... | diff --git a/Cargo.lock b/Cargo.lock
index fced1e5..dae59ec 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18,7 +18,7 @@ dependencies = [
"aes-soft",
"aesni 0.9.0",
"ctr",
- "stream-cipher",
+ "stream-cipher 0.8.0-pre",
]
[[package]]
@@ -50,7 +50,7 @@ checksum = "b6a4d655ae633a96d0acaf0fd7e76aafb8ca5732739bba37... | 6 | 660 | 214 |
1f542cf3e3817564d47ba977d545c186dc6941e5 | Artyom Pavlov | 2020-08-13T10:38:30 | Use SVG logo and update lock file (#159) | diff --git a/Cargo.lock b/Cargo.lock
index a3d5382..a5af5f2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -157,9 +157,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "2.33.1"
+version = "2.33.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdfa80d47f954d53a35a64987ca1422f4... | 9 | 122 | 71 |
36fb425a833746447546bfb8aba1e0c3a477d1e7 | Tony Arcieri | 2020-06-11T17:55:22 | chacha20/salsa20: note types that are GenericArray aliases (#158) | diff --git a/chacha20/src/cipher.rs b/chacha20/src/cipher.rs
index 44cd704..1bfe3ff 100644
--- a/chacha20/src/cipher.rs
+++ b/chacha20/src/cipher.rs
@@ -28,10 +28,14 @@ pub type ChaCha20 = Cipher<R20>;
/// ChaCha20 key type (256-bits/32-bytes)
///
+/// Implemented as an alias for [`GenericArray`].
+///
/// (NOTE: ... | 2 | 10 | 2 |
32406c37b175e90ddae145ed77f2ae10191217e0 | Tony Arcieri | 2020-06-11T16:39:46 | chacha20/salsa20: use `Key` and `Nonce` in usage docs (#155)
...in lieu of using `GenericArray` directly, which is cumbersome. | diff --git a/chacha20/src/lib.rs b/chacha20/src/lib.rs
index fbf2acd..0f9ca08 100644
--- a/chacha20/src/lib.rs
+++ b/chacha20/src/lib.rs
@@ -38,14 +38,13 @@
//! # Usage
//!
//! ```
-//! use chacha20::ChaCha20;
-//! use chacha20::stream_cipher::generic_array::GenericArray;
+//! use chacha20::{ChaCha20, Key, Nonce};
... | 2 | 6 | 8 |
6dcdab1296a2b0ba5ffdcc42029ad81f407cf3c2 | Tony Arcieri | 2020-06-11T16:14:07 | chacha20: document key and nonce lengths (#154) | diff --git a/chacha20/src/cipher.rs b/chacha20/src/cipher.rs
index 162bdaf..44cd704 100644
--- a/chacha20/src/cipher.rs
+++ b/chacha20/src/cipher.rs
@@ -26,12 +26,12 @@ pub type ChaCha12 = Cipher<R12>;
/// ChaCha20 stream cipher (RFC 8439 version with 96-bit nonce)
pub type ChaCha20 = Cipher<R20>;
-/// ChaCha20 key... | 2 | 4 | 4 |
cf758eb3cfaaebf01a836510b8655ff39cad6419 | Tony Arcieri | 2020-06-11T15:46:31 | chacha20: fix documentation typo (#153)
Dangling parenthetical | diff --git a/chacha20/src/cipher.rs b/chacha20/src/cipher.rs
index a004655..162bdaf 100644
--- a/chacha20/src/cipher.rs
+++ b/chacha20/src/cipher.rs
@@ -26,7 +26,9 @@ pub type ChaCha12 = Cipher<R12>;
/// ChaCha20 stream cipher (RFC 8439 version with 96-bit nonce)
pub type ChaCha20 = Cipher<R20>;
-/// ChaCha20 key t... | 1 | 3 | 1 |
7fb0970b9765d0b4eb916a687b86b384ccf176a0 | Tony Arcieri | 2020-06-11T15:03:47 | salsa20: fix `stream-cipher` version requirement (#152)
This didn't get properly updated | diff --git a/salsa20/Cargo.toml b/salsa20/Cargo.toml
index e05639c..9b57e65 100644
--- a/salsa20/Cargo.toml
+++ b/salsa20/Cargo.toml
@@ -11,7 +11,7 @@ readme = "README.md"
edition = "2018"
[dependencies]
-stream-cipher = "0.4"
+stream-cipher = "0.4.1"
zeroize = { version = "1", optional = true }
[dev-dependenci... | 1 | 1 | 1 |
f4f15d3a7b225afe03a6c1437a75274d523430d3 | Tony Arcieri | 2020-06-11T14:17:00 | chacha20/salsa20: documentation improvements (#149)
Adds `doc(cfg(...))` for docs.rs as well as cipher diagrams | diff --git a/chacha20/Cargo.toml b/chacha20/Cargo.toml
index 5d8bc15..14ccd3c 100644
--- a/chacha20/Cargo.toml
+++ b/chacha20/Cargo.toml
@@ -42,3 +42,4 @@ harness = false
[package.metadata.docs.rs]
all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
diff --git a/chacha20/src/legacy.rs b/chacha20/src/legacy.rs
i... | 8 | 48 | 5 |
24630dfa063c5caebe11e7dd5e570bbc1e63b50d | Tony Arcieri | 2020-06-11T01:26:09 | Use `stream-cipher` v0.4.1 crate release (#148) | diff --git a/Cargo.lock b/Cargo.lock
index bc16c7f..1a60e7c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -77,8 +77,9 @@ dependencies = [
[[package]]
name = "block-cipher"
-version = "0.7.0"
-source = "git+https://github.com/RustCrypto/traits#00fd43d39d94705af6a83409aa943ff2e7acab07"
+version = "0.7.1"
+source = "reg... | 4 | 9 | 11 |
35794aa37e54f4302c21aba256b6a667cd3c2136 | Tony Arcieri | 2020-06-10T23:40:26 | chacha20: use stream_cipher::{Key, Nonce} type aliases (#147)
Adds the following type aliases (ala #146):
- `Key`: ChaCha(*) key (including XChaCha20)
- `Nonce`: IETF variant's 96-bit nonce
- `XNonce`: EXtended 96-bit nonce for XChaCha20
- `LegacyNonce`: 64-bit nonce for the legacy "djb" variant | diff --git a/chacha20/src/cipher.rs b/chacha20/src/cipher.rs
index 4a6f9b1..a004655 100644
--- a/chacha20/src/cipher.rs
+++ b/chacha20/src/cipher.rs
@@ -14,10 +14,7 @@ use core::{
convert::TryInto,
fmt::{self, Debug},
};
-use stream_cipher::generic_array::{
- typenum::{U12, U32},
- GenericArray,
-};
+u... | 5 | 49 | 42 |
fe160997f145c82b99bc21fbe48e4111c0d269b1 | Tony Arcieri | 2020-06-10T22:57:05 | salsa20: use stream_cipher::{Key, Nonce} (#146)
Introduced in this PR:
https://github.com/RustCrypto/traits/pull/188
These eliminate the need to import `GenericArray`! 🎉 | diff --git a/Cargo.lock b/Cargo.lock
index 40ab05b..bc16c7f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -78,8 +78,7 @@ dependencies = [
[[package]]
name = "block-cipher"
version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f837aab23b44bf3be7e24411b599fda76b1788792e765fa077... | 4 | 31 | 22 |
c4caacb1a8bf7ebd53cdc90ec02480e69f5399e6 | Tony Arcieri | 2020-06-06T14:19:25 | Use release versions of crate dependencies
Updates the following dependencies to use crates.io releases:
- `aes` v0.4.0
- `aes-soft` v0.4.0
- `aesni` v0.7.0
- `block-cipher` v0.7.0
- `stream-cipher` v0.4.0 | diff --git a/Cargo.lock b/Cargo.lock
index 7b3ff46..ebbcca7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,8 +2,9 @@
# It is not intended for manual editing.
[[package]]
name = "aes"
-version = "0.4.0-pre"
-source = "git+https://github.com/RustCrypto/block-ciphers#f2d2e41f1cec0e64f6dff15baec2b54d37d813a3"
+version =... | 10 | 42 | 44 |
d3f34c657e9c134efee81e60b77e3f50755dd9af | Tony Arcieri | 2020-06-03T18:50:46 | ctr: impl FromBlockCipher
Impls the new `FromBlockCipher` trait introduced in:
https://github.com/RustCrypto/traits/pull/164 | diff --git a/Cargo.lock b/Cargo.lock
index 86cad65..7b3ff46 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,7 +3,7 @@
[[package]]
name = "aes"
version = "0.4.0-pre"
-source = "git+https://github.com/RustCrypto/block-ciphers#aa14e7b919a8d4e304ace0af3a487539e1ff5ef8"
+source = "git+https://github.com/RustCrypto/block-c... | 4 | 37 | 67 |
4e697acf80905fcf5945d9e2976a099a003db47b | Tony Arcieri | 2020-06-02T14:03:24 | Cargo.lock: bump `stream-cipher` crate
This fixes the benchmarks | diff --git a/Cargo.lock b/Cargo.lock
index 2c9e000..86cad65 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,7 +3,7 @@
[[package]]
name = "aes"
version = "0.4.0-pre"
-source = "git+https://github.com/RustCrypto/block-ciphers#044bc4ce9c0634871790cfae7e4d6a1d6e252516"
+source = "git+https://github.com/RustCrypto/block-c... | 1 | 25 | 25 |
c78342e257d87915467fe0b2f3af99c1ad66dd78 | Tony Arcieri | 2020-05-31T17:11:21 | salsa20: add Salsa8 and Salsa12
This adds a generic parameter to `Cipher` and `Block` ala the `chacha20`
crate which makes them generic over a number of rounds (using a sealed
`Rounds` trait which is explicitly impl'd for `R8`, `R12`, and `R20`).
This is used to provide `Salsa8`, `Salsa12`, and `Salsa20` variants.
T... | diff --git a/Cargo.lock b/Cargo.lock
index b80ac82..2c9e000 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -783,4 +783,3 @@ name = "zeroize"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8"
-
diff --git a/sal... | 5 | 78 | 28 |
377b8cd4b36ef5de367477c42b5a98f4faa937f3 | Tony Arcieri | 2020-05-30T04:55:53 | Bump all versions to `*-pre`
...to reflect the breaking `stream-cipher` crate update | diff --git a/Cargo.lock b/Cargo.lock
index d6be1e4..2c9e000 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -12,7 +12,7 @@ dependencies = [
[[package]]
name = "aes-ctr"
-version = "0.3.0"
+version = "0.4.0-pre"
dependencies = [
"aes-soft",
"aesni",
@@ -116,7 +116,7 @@ dependencies = [
[[package]]
name = "cfb-m... | 9 | 17 | 17 |
61d5603c608cbedbc1d03c356001ba7e49ea20c2 | Tony Arcieri | 2020-05-30T04:42:34 | Cargo.toml(s): remove [badges]
https://crates.io has dropped support for them | diff --git a/aes-ctr/Cargo.toml b/aes-ctr/Cargo.toml
index 9d550e8..09edddf 100644
--- a/aes-ctr/Cargo.toml
+++ b/aes-ctr/Cargo.toml
@@ -23,6 +23,3 @@ aesni = "= 0.7.0-pre"
[dev-dependencies]
stream-cipher = { version = "= 0.4.0-pre", features = ["dev"] }
-
-[badges]
-travis-ci = { repository = "RustCrypto/stream-c... | 8 | 0 | 25 |
20bfd817e733d8bb8b7d1db45f5d9b756fb8329f | Tony Arcieri | 2020-05-30T04:10:37 | Simplify benchmarks with 2018 macro syntax | diff --git a/aes-ctr/benches/aes128_ctr.rs b/aes-ctr/benches/aes128_ctr.rs
index 63a96bf..17c2db8 100644
--- a/aes-ctr/benches/aes128_ctr.rs
+++ b/aes-ctr/benches/aes128_ctr.rs
@@ -1,3 +1,3 @@
#![feature(test)]
-use stream_cipher::bench_sync;
-bench_sync!(aes_ctr::Aes128Ctr);
+
+stream_cipher::bench_sync!(aes_ctr::Aes... | 9 | 13 | 21 |
4743706d26c1446d7c57575d9ef88ec26e943cac | Tony Arcieri | 2020-05-29T20:24:29 | Bump `hex-literal` crate to v0.2
This version is a 2018 edition crate and allows us to get rid of the
last remaining usages of "extern crate" in the repo! 🎉 | diff --git a/Cargo.lock b/Cargo.lock
index 0861744..d6be1e4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -320,9 +320,9 @@ dependencies = [
[[package]]
name = "hex-literal"
-version = "0.1.4"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddc2928beef125e519d69ae1baa8... | 7 | 12 | 24 |
24521badab818890d050a64117066810d4a7edaa | Tony Arcieri | 2020-05-29T19:39:41 | Add standard set of attributes to all crates
Adds the RustCrypto logo for all crates
Lints for:
- 2018 idioms
- Unsafe code (where possible) | diff --git a/aes-ctr/src/lib.rs b/aes-ctr/src/lib.rs
index d1ecfdf..81b11c4 100644
--- a/aes-ctr/src/lib.rs
+++ b/aes-ctr/src/lib.rs
@@ -36,8 +36,10 @@
//! cipher.apply_keystream(&mut data);
//! assert_eq!(data, [1, 2, 3, 4, 5, 6, 7]);
//! ```
+
#![no_std]
-#![deny(missing_docs)]
+#![doc(html_logo_url = "https://ra... | 8 | 44 | 34 |
68af7b8360f1d56775b37a30802cbd8e4e6a2439 | Tony Arcieri | 2020-05-29T18:06:41 | salsa20: 2018 edition idioms and `stream-cipher` crate upgrade
Upgrades to Rust 2018 edition idioms and the (now 2018 edition)
`stream-cipher` v0.4.0-pre crate. | diff --git a/Cargo.lock b/Cargo.lock
index ff19052..0861744 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -17,7 +17,7 @@ dependencies = [
"aes-soft",
"aesni",
"ctr",
- "stream-cipher 0.4.0-pre",
+ "stream-cipher",
]
[[package]]
@@ -37,7 +37,7 @@ source = "git+https://github.com/RustCrypto/block-ciphers#044bc4ce... | 5 | 15 | 39 |
20ae90ebd41ba51766611a32577593c1adbcb476 | Tony Arcieri | 2020-05-29T16:14:13 | ofb: 2018 edition and `stream-cipher` crate upgrade
Upgrades to Rust 2018 edition and the (now 2018 edition)
`stream-cipher` v0.4.0-pre crate. | diff --git a/Cargo.lock b/Cargo.lock
index f6e48ef..ff19052 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,23 +1,12 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-[[package]]
-name = "aes"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-ind... | 6 | 29 | 66 |
e05cb96e93b80f27919d1898bf4184fd25063841 | Tony Arcieri | 2020-05-29T15:55:04 | hc-256: 2018 edition and `stream-cipher` crate upgrade
Upgrades to Rust 2018 edition and the (now 2018 edition)
`stream-cipher` v0.4.0-pre crate. | diff --git a/Cargo.lock b/Cargo.lock
index 3910ba0..f6e48ef 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -109,6 +109,7 @@ name = "block-cipher"
version = "0.7.0-pre"
source = "git+https://github.com/RustCrypto/traits#8f24286f0aa22d9f98a3edbe859a890d5d0d879e"
dependencies = [
+ "blobby",
"generic-array 0.14.1",
]
... | 4 | 16 | 27 |
68e346744f7587efe7b9ecd6d85e6cb33f795858 | Tony Arcieri | 2020-05-29T14:39:03 | chacha20: `stream-cipher` crate upgrade
Upgrades to the `stream-cipher` v0.4.0-pre crate. | diff --git a/Cargo.lock b/Cargo.lock
index 3ff54c7..3910ba0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -188,7 +188,7 @@ dependencies = [
"criterion",
"criterion-cycles-per-byte",
"rand_core",
- "stream-cipher 0.3.2",
+ "stream-cipher 0.4.0-pre",
"zeroize",
]
diff --git a/chacha20/Cargo.toml b/chacha20/Cargo... | 3 | 4 | 4 |
077450f62d39d88269f81c52c145dbd6282bf775 | Tony Arcieri | 2020-05-29T13:28:53 | cfb8: 2018 edition and `stream-cipher` crate upgrade
Upgrades to Rust 2018 edition and the (now 2018 edition)
`stream-cipher` v0.4.0-pre crate. | diff --git a/Cargo.lock b/Cargo.lock
index 7b8fa18..3ff54c7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -169,10 +169,10 @@ dependencies = [
name = "cfb8"
version = "0.3.2"
dependencies = [
- "aes 0.3.2",
- "block-cipher-trait",
+ "aes 0.4.0-pre",
+ "block-cipher",
"hex-literal",
- "stream-cipher 0.3.2",
+ "stream-... | 5 | 21 | 17 |
1363d537947ba5f153d9b9464b64ecaaa5c671f5 | Tony Arcieri | 2020-05-29T02:36:55 | cfb-mode: 2018 edition and `stream-cipher` crate upgrade
Upgrades to Rust 2018 edition and the (now 2018 edition)
`stream-cipher` v0.4.0-pre crate. | diff --git a/Cargo.lock b/Cargo.lock
index c6bb466..7b8fa18 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -159,10 +159,10 @@ dependencies = [
name = "cfb-mode"
version = "0.3.2"
dependencies = [
- "aes 0.3.2",
- "block-cipher-trait",
+ "aes 0.4.0-pre",
+ "block-cipher",
"hex-literal",
- "stream-cipher 0.3.2",
+ "str... | 6 | 23 | 18 |
2c48b8fcdd97ae5f38003e05e50a76a401ae0822 | Tony Arcieri | 2020-05-28T23:41:54 | ctr: 2018 edition and `stream-cipher` crate upgrade
Upgrades to Rust 2018 edition and the (now 2018 edition)
`stream-cipher` v0.4.0-pre crate. | diff --git a/Cargo.lock b/Cargo.lock
index bc0c3c6..8ffda6a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6,19 +6,29 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54eb1d8fe354e5fc611daf4f2ea97dd45a765f4f1e4512306ec183ae2e8f20c9"
dependencies = [
- "aes-soft",
- "aes... | 6 | 98 | 39 |
112aba5b8a30e9f3a604b8502a68fa08bd08368b | Tony Arcieri | 2020-03-03T15:43:55 | fix rustfmt | diff --git a/salsa20/src/xsalsa20.rs b/salsa20/src/xsalsa20.rs
index 0a87f6a..7520c9f 100644
--- a/salsa20/src/xsalsa20.rs
+++ b/salsa20/src/xsalsa20.rs
@@ -70,7 +70,10 @@ impl SyncStreamCipherSeek for XSalsa20 {
/// - Nonce (`u32` x 4)
///
/// It produces 256-bits of output suitable for use as a Salsa20 key
-pub fn... | 1 | 4 | 1 |
5fe6202f89708a308ddf509d4306c7a26045724f | Tony Arcieri | 2020-03-03T05:07:40 | Cargo.toml: avoid accidental `alloc` and `std` linking
- `zeroize` was accidentally linking against `alloc`
- `rand_core` accidentally linked against `std` | diff --git a/chacha20/Cargo.toml b/chacha20/Cargo.toml
index e9912d2..7df7954 100644
--- a/chacha20/Cargo.toml
+++ b/chacha20/Cargo.toml
@@ -20,9 +20,9 @@ edition = "2018"
travis-ci = { repository = "RustCrypto/stream-ciphers" }
[dependencies]
-rand_core = { version = "0.5", optional = true }
+rand_core = { version... | 1 | 2 | 2 |
21d717c623df53e8822fcb375674b030cb5ef5f0 | Tony Arcieri | 2020-02-25T16:35:59 | salsa20: add `hsalsa20` feature
Optionally exposes the `hsalsa20` function (for use in implementing e.g.
`crypto_box`) under an off-by-default Cargo feature. | diff --git a/salsa20/Cargo.toml b/salsa20/Cargo.toml
index 307f5de..6ffc742 100644
--- a/salsa20/Cargo.toml
+++ b/salsa20/Cargo.toml
@@ -19,10 +19,8 @@ stream-cipher = { version = "0.3", features = ["dev"] }
[features]
default = ["xsalsa20"]
+hsalsa20 = ["xsalsa20"]
xsalsa20 = []
[badges]
travis-ci = { reposit... | 3 | 12 | 11 |
75cbe27241d010857bd688e2249a5ffa723af099 | Tony Arcieri | 2020-01-18T15:35:15 | chacha20: eliminate unsafe usage in "soft" state init
Replaces the previous usage of `mem::zeroed` by hand unrolling the loops
that construct the ChaCha20 state array and initializing the state to
valid values to begin with. | diff --git a/chacha20/src/block/soft.rs b/chacha20/src/block/soft.rs
index 645e187..70bc495 100644
--- a/chacha20/src/block/soft.rs
+++ b/chacha20/src/block/soft.rs
@@ -6,7 +6,7 @@
//! intrinsics.
use crate::{rounds::Rounds, BLOCK_SIZE, CONSTANTS, IV_SIZE, KEY_SIZE, STATE_WORDS};
-use core::{convert::TryInto, marke... | 1 | 19 | 12 |
3a3c0735c564100f08d89563f24053e1f7b25793 | Tony Arcieri | 2020-01-18T15:20:54 | chacha20: replace macros with Rounds trait + generics
Previously macros were used to generate the ChaCha8, ChaCha12, and
ChaCha20 variants of the ChaCha family.
This commit replaces them with a `Rounds` trait, making the `Cipher`
type generic over `Rounds`, and replacing the `ChaCha8`, `ChaCha12`,
and `ChaCha20` wrap... | diff --git a/chacha20/src/block.rs b/chacha20/src/block.rs
index ce8965c..cd7a62b 100644
--- a/chacha20/src/block.rs
+++ b/chacha20/src/block.rs
@@ -4,6 +4,8 @@
pub(crate) mod soft;
+use crate::rounds::Rounds;
+
#[cfg(all(
any(target_arch = "x86", target_arch = "x86_64"),
target_feature = "sse2",
@@ -39... | 11 | 143 | 170 |
7700f71e9baa0b0a34819e31ccc532ee151bd747 | Tony Arcieri | 2020-01-17T18:57:20 | chacha20: fix array cast
Moves the `&mut` inside of the `unsafe` block, otherwise the deref acts
as a copy, so the copy is mutated rather than the original.
Also adds a smoke test to make sure the RNG is generating the expected
outputs. | diff --git a/chacha20/benches/rng.rs b/chacha20/benches/rng.rs
index 0cb054a..db2b007 100644
--- a/chacha20/benches/rng.rs
+++ b/chacha20/benches/rng.rs
@@ -19,7 +19,7 @@ fn bench(c: &mut Criterion<CyclesPerByte>) {
group.throughput(Throughput::Bytes(*size as u64));
- group.bench_function(BenchmarkI... | 2 | 27 | 3 |
f901f851b01b40a64ea374a1f56939dc1cc0fa24 | Tony Arcieri | 2020-01-17T18:20:14 | chacha20: use pointer cast to convert RNG buffer type
This is simpler and provides more safety (compiler will ensure correct
size) than using a slice-based approach. | diff --git a/chacha20/src/rng.rs b/chacha20/src/rng.rs
index 0b060df..66e6700 100644
--- a/chacha20/src/rng.rs
+++ b/chacha20/src/rng.rs
@@ -1,6 +1,5 @@
//! Block RNG based on rand_core::BlockRng
-use core::slice;
use rand_core::block::{BlockRng, BlockRngCore};
use rand_core::{CryptoRng, Error, RngCore, SeedableRn... | 1 | 2 | 3 |
e011bfd5dcf833f0eed009a6fc8b72c3bc05e40b | Tony Arcieri | 2020-01-17T13:39:46 | chacha20: impl CryptoRng for all ChaCha*Rng types (closes #90)
Previously they weren't marked as being suitable as a CSPRNG. | diff --git a/chacha20/src/rng.rs b/chacha20/src/rng.rs
index f73df5d..0b060df 100644
--- a/chacha20/src/rng.rs
+++ b/chacha20/src/rng.rs
@@ -2,7 +2,7 @@
use core::slice;
use rand_core::block::{BlockRng, BlockRngCore};
-use rand_core::{Error, RngCore, SeedableRng};
+use rand_core::{CryptoRng, Error, RngCore, Seedabl... | 1 | 5 | 1 |
fea64ce8aad3394dbc67fc41caaeac9db484048c | Tony Arcieri | 2020-01-16T14:43:24 | chacha20: Buffering bugfixes and AVX2 backend refactoring
Previously when looping through input data, if there was enough data to
avoid buffering it was obliterating the plaintext with the keystream
rather than XORing it.
This was addressed by adding an `apply_keystream` method to each backend
for use in this situati... | diff --git a/chacha20/src/block/avx2.rs b/chacha20/src/block/avx2.rs
index 188aecc..58204e4 100644
--- a/chacha20/src/block/avx2.rs
+++ b/chacha20/src/block/avx2.rs
@@ -18,9 +18,9 @@ use core::arch::x86_64::*;
#[derive(Clone)]
pub(crate) struct Block {
- d0: __m256i,
- d1: __m256i,
- d2: __m256i,
+ v0: ... | 4 | 238 | 176 |
ff88e90e829fb77855c979ae5ae6a711a14f76f6 | Tony Arcieri | 2020-01-16T04:32:42 | chacha20: Add ChaCha8 and ChaCha20 reduced round variants
See the writeup I've already done for the `rand_chacha` crate for the
rationale of including these by default:
https://github.com/rust-random/rand/issues/932
tl;dr: the "Too Much Crypto" paper goes into why ChaCha20 is overkill,
ChaCha12 is probably what shou... | diff --git a/chacha20/src/lib.rs b/chacha20/src/lib.rs
index 3271b75..618b9f7 100644
--- a/chacha20/src/lib.rs
+++ b/chacha20/src/lib.rs
@@ -12,6 +12,7 @@
//!
//! - `ChaCha20`: standard IETF variant with 96-bit nonce
//! - `ChaCha20Legacy`: (gated under the `legacy` feature) "djb" variant with 64-bit nonce
+//! - `C... | 2 | 138 | 94 |
9c77baabe34c3ca27ff2e17c40413b143114ed9f | Tony Arcieri | 2020-01-16T00:21:19 | chacha20: minor SSE2 backend refactoring
Splits out `key_setup` and `iv_setup` methods, removing redundant
initialization. | diff --git a/chacha20/src/block/sse2.rs b/chacha20/src/block/sse2.rs
index d5e6c8c..9615e99 100644
--- a/chacha20/src/block/sse2.rs
+++ b/chacha20/src/block/sse2.rs
@@ -17,61 +17,68 @@ pub(crate) struct Block {
v0: __m128i,
v1: __m128i,
v2: __m128i,
- v3: __m128i,
+ iv: [i32; 2],
rounds: usize... | 1 | 58 | 47 |
907e94beefdfa20d03792dbea7107cb581bf9962 | Tony Arcieri | 2020-01-15T16:49:46 | clippy fixups; salsa20 refactor
- Fixes all existing clippy warnings
- Applies same refactoring from #75 to the `salsa20` crate | diff --git a/chacha20/src/block/soft.rs b/chacha20/src/block/soft.rs
index 8563680..c898175 100644
--- a/chacha20/src/block/soft.rs
+++ b/chacha20/src/block/soft.rs
@@ -56,18 +56,21 @@ impl Block {
let mut state = self.state;
for _ in 0..(count / 2) {
+ // column rounds
quart... | 4 | 32 | 69 |
aad20db0682bf5564d5019dc514254c97271a148 | Tony Arcieri | 2020-01-15T16:35:11 | rustfmt
Applies rustfmt 1.4.9-stable (33e36670 2019-10-07) to the entire repo | diff --git a/hc-256/src/lib.rs b/hc-256/src/lib.rs
index c63947b..99acf97 100644
--- a/hc-256/src/lib.rs
+++ b/hc-256/src/lib.rs
@@ -6,15 +6,15 @@ extern crate zeroize;
pub extern crate stream_cipher;
-use block_cipher_trait::generic_array::GenericArray;
use block_cipher_trait::generic_array::typenum::U32;
+use b... | 4 | 129 | 159 |
31a163a29b6fee4185112f406afc35ef79db002b | Tony Arcieri | 2020-01-15T15:10:31 | chacha20: simplify software implementation
The original implementation was unnecessarily complicated. This removes
a bunch of needlessly complex code.
This has no measurable effect on performance. | diff --git a/chacha20/src/block/mod.rs b/chacha20/src/block/mod.rs
index 8047776..d23a3de 100644
--- a/chacha20/src/block/mod.rs
+++ b/chacha20/src/block/mod.rs
@@ -45,66 +45,28 @@ impl Block {
],
};
- block.rounds();
- block.finish(key, iv, counter)
+ block.rounds(20)
... | 1 | 16 | 54 |
1f647127ddb7f970d1392cd0021fcb33c4b1af33 | Tony Arcieri | 2019-11-28T19:52:47 | ctr: Replace deprecated `mem::uninitialized` with `mem::zeroed`
The deprecation warnings on `mem::uninitialized` are breaking CI.
`mem::uninitialized` and `mem::zeroed` have equivalent performance
characteristics for the case where memory is always written to first,
so this change should otherwise have no impact on ... | diff --git a/ctr/src/lib.rs b/ctr/src/lib.rs
index 1df3117..f7599fd 100644
--- a/ctr/src/lib.rs
+++ b/ctr/src/lib.rs
@@ -233,7 +233,7 @@ where
fn generate_par_blocks(&self, counter: u64) -> Blocks<C> {
let mut block = self.nonce;
block[1] = block[1].wrapping_add(counter);
- let mut blocks:... | 1 | 1 | 1 |
20d0a203476a01be91aeff6c4519dec25e52e6d5 | Tony Arcieri | 2019-10-23T16:04:29 | [SECURITY] chacha20: ensure block counter < MAX_BLOCKS (fixes #64)
If the counter overflows a 32-bit value, the keystream will be reused,
with an impact of equal severity to nonce reuse (i.e. XOR of the
ciphertexts reveals the XOR of plaintexts)
This commit adds a stopgap solution which panics in the event this
happe... | diff --git a/chacha20/src/cipher.rs b/chacha20/src/cipher.rs
index ffeafb2..d405086 100644
--- a/chacha20/src/cipher.rs
+++ b/chacha20/src/cipher.rs
@@ -2,6 +2,7 @@
use byteorder::{ByteOrder, LE};
use salsa20_core::{SalsaFamilyCipher, IV_WORDS, KEY_WORDS, STATE_WORDS};
+use super::MAX_BLOCKS;
/// ChaCha20 core c... | 1 | 6 | 0 |
6a709063e43d995ee5e6bc873d4860fbbf6ec13d | Tony Arcieri | 2019-10-22T16:30:44 | hc-256/salsa20-core: Upgrade to zeroize v1.0
Release notes: https://github.com/iqlusioninc/crates/pull/279 | diff --git a/hc-256/Cargo.toml b/hc-256/Cargo.toml
index daccc2e..4a001a2 100644
--- a/hc-256/Cargo.toml
+++ b/hc-256/Cargo.toml
@@ -11,7 +11,7 @@ categories = ["cryptography", "no-std"]
[dependencies]
block-cipher-trait = "0.6"
stream-cipher = "0.3"
-zeroize = { version = "1.0.0-pre", optional = true }
+zeroize = {... | 2 | 2 | 2 |
9817b4ffc19c2e92cb646975521966b2fda10ab4 | Diggory Hardy | 2019-10-20T11:06:54 | Add rand_core::RngCore implementation to chacha20 | diff --git a/chacha20/Cargo.toml b/chacha20/Cargo.toml
index a30ac95..e7df3ee 100644
--- a/chacha20/Cargo.toml
+++ b/chacha20/Cargo.toml
@@ -19,6 +19,7 @@ travis-ci = { repository = "RustCrypto/stream-ciphers" }
byteorder = { version = "1", default-features = false }
stream-cipher = "0.3"
salsa20-core = { version = ... | 4 | 82 | 1 |
566968122939dc8d086fb12b3088e7dc0c1ac267 | Sam Rijs | 2019-10-18T11:07:52 | chacha20: add SSE2 accelerated variant | diff --git a/chacha20/src/block.rs b/chacha20/src/block/mod.rs
similarity index 98%
rename from chacha20/src/block.rs
rename to chacha20/src/block/mod.rs
index 989a0f8..daa9956 100644
--- a/chacha20/src/block.rs
+++ b/chacha20/src/block/mod.rs
@@ -4,6 +4,9 @@
use salsa20_core::{CONSTANTS, IV_WORDS, KEY_WORDS, STATE_... | 3 | 257 | 2 |
3641843670c6d6b5cc87543a316a3915c74e693e | Tony Arcieri | 2019-10-01T23:33:26 | hc-256: Use zeroize 1.0.0-pre | diff --git a/Cargo.toml b/Cargo.toml
index 4cc505d..de455d5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,8 +5,8 @@ members = [
"cfb-mode",
"chacha20",
"ctr",
+ "hc-256",
"ofb",
"salsa20",
"salsa20-core",
- "hc-256",
]
diff --git a/hc-256/Cargo.toml b/hc-256/Cargo.toml
index 4d462b... | 2 | 3 | 3 |
c8bfb5d3313da631eecc196ef8bace12663e39f7 | Tony Arcieri | 2019-10-01T14:59:52 | salsa20-core: Upgrade to zeroize 1.0.0-pre | diff --git a/salsa20-core/Cargo.toml b/salsa20-core/Cargo.toml
index 8a70ad2..7788b48 100644
--- a/salsa20-core/Cargo.toml
+++ b/salsa20-core/Cargo.toml
@@ -10,7 +10,7 @@ categories = ["cryptography", "no-std"]
[dependencies]
stream-cipher = "0.3"
-zeroize = { version = "0.9", optional = true, default-features = fa... | 1 | 1 | 1 |
312ea889b19e204ecb7420e5fd5a2d6ec36f91fa | Joe Jacobs | 2019-09-30T08:23:39 | Added XSalsa20 test vectors from https://github.com/golang/crypto/blob/master/salsa20/salsa20_test.go | diff --git a/salsa20/tests/lib.rs b/salsa20/tests/lib.rs
index 37905cb..0a0af28 100644
--- a/salsa20/tests/lib.rs
+++ b/salsa20/tests/lib.rs
@@ -4,6 +4,8 @@ extern crate salsa20;
extern crate stream_cipher;
use salsa20::Salsa20;
+#[cfg(feature = "xsalsa20")]
+use salsa20::XSalsa20;
use stream_cipher::generic_array... | 1 | 63 | 0 |
a96fa37b4ee80be361aea7d8fa9bda25f126af48 | Joe Jacobs | 2019-09-30T08:08:57 | XSalsa20 implementation | diff --git a/salsa20/Cargo.toml b/salsa20/Cargo.toml
index 7e7d527..f7af6b9 100644
--- a/salsa20/Cargo.toml
+++ b/salsa20/Cargo.toml
@@ -18,7 +18,9 @@ salsa20-core = { version = "0.2", path = "../salsa20-core"}
stream-cipher = { version = "0.3", features = ["dev"] }
[features]
+default = ["xsalsa20"]
zeroize = ["s... | 3 | 125 | 0 |
9f3f0e034ae7c75919acb44a110b8af396ed9b7c | Joe Jacobs | 2019-09-30T08:06:03 | Factorize double_round into multiple quarter_round calls | diff --git a/salsa20/src/block.rs b/salsa20/src/block.rs
index 287fac3..133af0b 100644
--- a/salsa20/src/block.rs
+++ b/salsa20/src/block.rs
@@ -64,79 +64,18 @@ impl Block {
#[inline]
fn double_round(&mut self) {
let state = &mut self.state;
- let mut t: u32;
-
- t = state[0].wrapping_a... | 1 | 29 | 73 |
c871e7a9ccd6565c182e10d4f9e6b2d5a90cd6b4 | Nathan Froyd | 2019-09-20T12:04:24 | move cfb/cfb8/ofb benchmarks to named files
This change makes the output of `cargo bench` more informative: the
benchmark programs have recognizable names, not just `mod-$HASH`. | diff --git a/cfb-mode/benches/mod.rs b/cfb-mode/benches/cfb-mode.rs
similarity index 100%
rename from cfb-mode/benches/mod.rs
rename to cfb-mode/benches/cfb-mode.rs
diff --git a/cfb8/benches/mod.rs b/cfb8/benches/cfb8.rs
similarity index 100%
rename from cfb8/benches/mod.rs
rename to cfb8/benches/cfb8.rs
diff --git a/o... | 3 | 0 | 0 |
aba31daf17580daff2a485304a7778eb294214b6 | Nathan Froyd | 2019-09-20T11:57:07 | add benchmarks for ChaCha20 and Salsa20 | diff --git a/chacha20/benches/chacha20.rs b/chacha20/benches/chacha20.rs
new file mode 100755
index 0000000..d4032d4
--- /dev/null
+++ b/chacha20/benches/chacha20.rs
@@ -0,0 +1,6 @@
+#![feature(test)]
+#[macro_use]
+extern crate stream_cipher;
+extern crate chacha20;
+
+bench_sync!(chacha20::ChaCha20);
diff --git a/sal... | 2 | 12 | 0 |
75135528cdb1e802c3bd1602e460306900b055a3 | newpavlov | 2019-09-13T18:10:19 | fix aes-ctr benchmarks, closes #51 | diff --git a/aes-ctr/benches/aes128_ctr.rs b/aes-ctr/benches/aes128_ctr.rs
index cff7e9e..62432d1 100644
--- a/aes-ctr/benches/aes128_ctr.rs
+++ b/aes-ctr/benches/aes128_ctr.rs
@@ -1,4 +1,3 @@
-#![no_std]
#![feature(test)]
#[macro_use]
extern crate stream_cipher;
diff --git a/aes-ctr/benches/aes192_ctr.rs b/aes-ctr/... | 3 | 0 | 3 |
c454eff2e00651a1eca5a4f955dc3ecc5095506c | Tony Arcieri | 2019-08-19T18:34:05 | chacha20: Add MAX_BLOCKS and BLOCK_SIZE constants
These are important for computing ChaCha20 data volume limits | diff --git a/chacha20/src/lib.rs b/chacha20/src/lib.rs
index 7e2bb52..266fa95 100644
--- a/chacha20/src/lib.rs
+++ b/chacha20/src/lib.rs
@@ -81,6 +81,13 @@ pub use self::legacy::ChaCha20Legacy;
#[cfg(feature = "xchacha20")]
pub use self::xchacha20::XChaCha20;
+/// Maximum number of blocks that can be encrypted with... | 1 | 7 | 0 |
ff6d4b6b118d97fb2e0939db6896d4179c02e5fc | Tony Arcieri | 2019-08-19T18:10:39 | salsa20-core: Don't implicitly depend on `zeroize/std`
The `std` feature of `zeroize` was previously being activated.
This commit disables default features. | diff --git a/salsa20-core/Cargo.toml b/salsa20-core/Cargo.toml
index 8c485f3..a0076ea 100644
--- a/salsa20-core/Cargo.toml
+++ b/salsa20-core/Cargo.toml
@@ -10,7 +10,7 @@ categories = ["cryptography", "no-std"]
[dependencies]
stream-cipher = "0.3"
-zeroize = { version = "0.9", optional = true }
+zeroize = { version... | 1 | 1 | 1 |
653dbff35b14ee1076b3de9627250aebb1b190aa | Tony Arcieri | 2019-08-18T15:30:09 | chacha20/salsa20/salsa20-core v0.2.0 | diff --git a/chacha20/Cargo.toml b/chacha20/Cargo.toml
index 3460ffb..032adb8 100644
--- a/chacha20/Cargo.toml
+++ b/chacha20/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "chacha20"
-version = "0.1.0"
+version = "0.2.0"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
description = "Chacha20 Stream... | 5 | 25 | 20 |
6b22ec1e242f3c642839feb4cc2e5cd1c64d4589 | Tony Arcieri | 2019-08-17T20:14:59 | chacha20: Extract and encapsulate Cipher type
This commit primarily renames the previous `ChaChaState` type and
factors it under `chacha20::cipher::Cipher`.
Additionally, it gets rid of a number of unnecessary things from the
previous implementation:
- `ArrayLength` generic parameter
- `Deref`/`DerefMut` impls
- Mac... | diff --git a/chacha20/src/cipher.rs b/chacha20/src/cipher.rs
new file mode 100644
index 0000000..3641b15
--- /dev/null
+++ b/chacha20/src/cipher.rs
@@ -0,0 +1,170 @@
+//! ChaCha20 cipher core implementation
+
+use salsa20_core::{SalsaFamilyCipher, SalsaFamilyState};
+use stream_cipher::{LoopError, SyncStreamCipher, Syn... | 4 | 229 | 220 |
9c0ca186b1cf3de761277c9c27bd2d0d0f5219f3 | Tony Arcieri | 2019-08-16T23:16:43 | impl SyncStreamCipher for Salsa20 and ChaCha20
Previously they only impl'd `StreamCipher`
Additionally this fixes bugs in the previous `SyncStreamCipherSeek`
impls on both ciphers by better encapsulating the block index and offset
management in the `SalsaFamilyCipher` type. This allows the crate
examples to use this ... | diff --git a/chacha20/src/lib.rs b/chacha20/src/lib.rs
index 3d3a316..ffb8ec7 100644
--- a/chacha20/src/lib.rs
+++ b/chacha20/src/lib.rs
@@ -22,7 +22,7 @@
//! ```
//! use chacha20::ChaCha20;
//! use chacha20::stream_cipher::generic_array::GenericArray;
-//! use chacha20::stream_cipher::{NewStreamCipher, StreamCipher... | 3 | 170 | 105 |
1b046294ba9e685943d1b39c97393836d1a796b1 | Tony Arcieri | 2019-08-16T20:24:37 | salsa20: Refactor to eliminate needless wrapper structs
For whatever reason this previously had a superfluous wrapper struct.
This refactor removes it.
Also, as `salsa20-core` already handles `zeroize`, like the
corresponding change to the ChaCha20 crate this makes `zeroize` into a
cargo feature which enables the co... | diff --git a/salsa20/Cargo.toml b/salsa20/Cargo.toml
index d859d3f..d77dff0 100644
--- a/salsa20/Cargo.toml
+++ b/salsa20/Cargo.toml
@@ -13,11 +13,13 @@ readme = "README.md"
block-cipher-trait = "0.6"
stream-cipher = "0.3"
salsa20-core = { version = "0.1", path = "../salsa20-core"}
-zeroize = { version = "0.9", opti... | 2 | 47 | 98 |
34944a807724f17268582661f87c126a1eb5227b | Tony Arcieri | 2019-08-16T16:42:05 | XChaCha20
Support for the extended nonce variant of ChaCha20 | diff --git a/chacha20/Cargo.toml b/chacha20/Cargo.toml
index a11f533..4772498 100644
--- a/chacha20/Cargo.toml
+++ b/chacha20/Cargo.toml
@@ -5,11 +5,12 @@ authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
description = "Chacha20 Stream Cipher"
repository = "https://github.com/RustCrypto/stream-cipher... | 7 | 307 | 37 |
c4302cf3c7e45de112e365f42317d4ddfab6d124 | Tony Arcieri | 2019-08-15T20:22:35 | Add #![deny(missing_docs)] to all crates
...and add some basic documentation to crates with missing docs.
The Salsa20 Family crates could probably use a bit more documentation
than this, but this is a start. | diff --git a/aes-ctr/src/lib.rs b/aes-ctr/src/lib.rs
index 173d64d..9f77ec6 100644
--- a/aes-ctr/src/lib.rs
+++ b/aes-ctr/src/lib.rs
@@ -37,6 +37,7 @@
//! assert_eq!(data, [1, 2, 3, 4, 5, 6, 7]);
//! ```
#![no_std]
+#![deny(missing_docs)]
#[cfg(not(all(
target_feature = "aes",
target_feature = "sse2",
dif... | 8 | 51 | 17 |
bc87d759c0560032357d2c3e98395cf0ba55abf5 | Tony Arcieri | 2019-08-15T08:58:50 | rustfmt
Applied using: `rustfmt 1.2.2-stable (5274b49c 2019-04-24)` | diff --git a/aes-ctr/src/dummy.rs b/aes-ctr/src/dummy.rs
index 9e624e3..32268ba 100644
--- a/aes-ctr/src/dummy.rs
+++ b/aes-ctr/src/dummy.rs
@@ -1,5 +1,5 @@
-use ctr::Ctr128;
use aes_soft::{Aes128, Aes192, Aes256};
+use ctr::Ctr128;
/// AES-128 in CTR mode
pub type Aes128Ctr = Ctr128<Aes128>;
diff --git a/aes-ctr/... | 15 | 124 | 114 |
327e317ce1d560bfc50a3305188e42be304cb585 | Tony Arcieri | 2019-08-14T13:19:24 | ctr: Use clippy-friendly unsafe endianness conversion
The previous pointer casting here was not clippy-friendly:
```
error: casting from `*const stream_cipher::generic_array::GenericArray<u8, stream_cipher::generic_array::typenum::UInt<stream_cipher::generic_array::typenum::UInt<stream_cipher::generic_array::typenum:... | diff --git a/ctr/src/lib.rs b/ctr/src/lib.rs
index 5d30191..333c215 100644
--- a/ctr/src/lib.rs
+++ b/ctr/src/lib.rs
@@ -82,18 +82,17 @@ impl<C> Ctr128<C>
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
{
/// Create new CTR mode instance using initialized block cipher.
- pub fn from_cipher(cipher: C... | 1 | 8 | 9 |
c4e92ca219b88085b6847d9d2e675b37bb9e94f8 | Tony Arcieri | 2019-08-14T04:48:15 | chacha20: Fix clippy warnings
This fixes all but one remaining clippy warning which I'll open a
separate PR for. | diff --git a/chacha20/src/lib.rs b/chacha20/src/lib.rs
index 4347356..c89eedc 100644
--- a/chacha20/src/lib.rs
+++ b/chacha20/src/lib.rs
@@ -109,10 +109,10 @@ impl<N: ArrayLength<u8>> ChaChaState<N> {
let key = self.state.key;
let block_idx = self.state.block_idx;
- block[0] = block[0].wrappi... | 1 | 16 | 16 |
15d25a93346a3f3c9ddff42ae2e4b14fad95bc0e | Tony Arcieri | 2019-08-13T20:02:02 | Fix trivial clippy warnings
This fixes all of the clippy warnings which have trivial corrections.
There's one remaining one involving an unsafe pointer cast that's a
little more thorny which I'd like to address separately. | diff --git a/ctr/src/lib.rs b/ctr/src/lib.rs
index 87a984e..5d30191 100644
--- a/ctr/src/lib.rs
+++ b/ctr/src/lib.rs
@@ -191,7 +191,7 @@ impl<C> SyncStreamCipher for Ctr128<C>
counter += 1;
}
- if data.len() != 0 {
+ if !data.is_empty() {
self.block = self.generate_blo... | 3 | 29 | 33 |
288aaa19b087f5cd60634e825b16c5cf3d199705 | Tony Arcieri | 2019-08-13T16:47:21 | salsa20-core: Move all code into `lib.rs`
There's practically nothing in `lib.rs` right now aside from extern
crate directives and the `mod`/`use` directives for `SalsaFamilyState`,
so I think it makes sense to just consolidate the crate into a single
file. | diff --git a/salsa20-core/src/lib.rs b/salsa20-core/src/lib.rs
index 2302330..d81d11d 100644
--- a/salsa20-core/src/lib.rs
+++ b/salsa20-core/src/lib.rs
@@ -6,6 +6,263 @@ extern crate zeroize;
pub extern crate stream_cipher;
-mod salsa_family_state;
+use block_cipher_trait::generic_array::typenum::U32;
+use block_... | 2 | 259 | 262 |
2284811878e98875e655ff57a9318f5958f2b5ef | Tony Arcieri | 2019-08-13T16:27:37 | salsa20-core: Address `word_idx`-related warning (closes #23)
As far as I can tell setting `word_idx` here accomplishes nothing as
it's never read in the remainder of the function.
It was originally added in this commit, and as far as I can tell has
always been a spurious assignment:
https://github.com/RustCrypto/st... | diff --git a/salsa20-core/src/salsa_family_state.rs b/salsa20-core/src/salsa_family_state.rs
index bbc3c11..fb6b121 100644
--- a/salsa20-core/src/salsa_family_state.rs
+++ b/salsa20-core/src/salsa_family_state.rs
@@ -90,18 +90,10 @@ pub trait SalsaFamilyCipher {
i += 1;
... | 1 | 2 | 10 |
b5eecb829dc19a72ff2a06bea388f68d3f4fd259 | Tony Arcieri | 2019-08-13T14:11:01 | chacha20: Refactor into `ChaCha20` and `ChaCha20Legacy`
This change factors almost all of the functionality into the
`ChaChaState` type, and removes the generic `N: ArrayLength<u8>`
parameter from the original `ChaCha20` type, instead splitting it into
two concrete types:
- `ChaCha20`: 96-bit nonce ("IETF" version)
-... | diff --git a/chacha20/Cargo.toml b/chacha20/Cargo.toml
index edcdde5..a11f533 100644
--- a/chacha20/Cargo.toml
+++ b/chacha20/Cargo.toml
@@ -12,7 +12,6 @@ categories = ["cryptography", "no-std"]
block-cipher-trait = "0.6"
stream-cipher = "0.3"
salsa20-core = { version = "0.1", path = "../salsa20-core" }
-zeroize = {... | 3 | 143 | 137 |
ab4b40ecf403413225bb114ae35fc516801e7aa5 | Tony Arcieri | 2019-08-12T22:06:52 | salsa20-core: Remove unnecessary `extern crate std`
It appears `std` was being imported to access a trait from `core` (`Drop`).
This removes the `std` import and imports `Drop` from `core` instead. | diff --git a/salsa20-core/src/lib.rs b/salsa20-core/src/lib.rs
index dbea08b..2302330 100644
--- a/salsa20-core/src/lib.rs
+++ b/salsa20-core/src/lib.rs
@@ -4,7 +4,6 @@ extern crate block_cipher_trait;
#[cfg(feature = "zeroize")]
extern crate zeroize;
-pub extern crate std;
pub extern crate stream_cipher;
mod s... | 2 | 1 | 2 |
6e04ecc50ac9bbfb6144121696ed04d4e7398e06 | Tony Arcieri | 2019-08-12T22:04:04 | chacha20: Fix `zeroize` cargo feature
It was previously missing a needed generic parameter | diff --git a/chacha20/src/lib.rs b/chacha20/src/lib.rs
index 47c3f1c..252f65d 100644
--- a/chacha20/src/lib.rs
+++ b/chacha20/src/lib.rs
@@ -183,7 +183,7 @@ impl<N: ArrayLength<u8>> SyncStreamCipherSeek for ChaChaState<N> {
}
#[cfg(feature = "zeroize")]
-impl Zeroize for ChaChaState {
+impl<N: ArrayLength<u8>> Zero... | 1 | 2 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.