Skip to content

Commit ceae045

Browse files
authored
chacha20poly1305: bump chacha20 crate; MSRV 1.49+ (#254)
Like we did with the `aes` crate in #252, this bumps the `chacha20` crate to a version which implements runtime CPU feature detection (AVX2/SSE2) and uses new support for `ManuallyDrop` union fields which became available in Rust 1.49.
1 parent 1a30e12 commit ceae045

12 files changed

Lines changed: 15 additions & 51 deletions

File tree

.github/workflows/aes-gcm-siv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- 1.49.0 # MSRV
2626
- stable
2727
target:
28-
# - armv7-none-eabi TODO: test after MSRV is bumped to 1.42
28+
- armv7a-none-eabi
2929
- thumbv7em-none-eabi
3030
- wasm32-unknown-unknown
3131
steps:

.github/workflows/aes-gcm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- 1.49.0 # MSRV
2626
- stable
2727
target:
28-
# - armv7-none-eabi TODO: test after MSRV is bumped to 1.42
28+
- armv7a-none-eabi
2929
- thumbv7em-none-eabi
3030
- wasm32-unknown-unknown
3131
steps:

.github/workflows/aes-siv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- 1.49.0 # MSRV
2626
- stable
2727
target:
28-
# - armv7-none-eabi TODO: test after MSRV is bumped to 1.42
28+
- armv7a-none-eabi
2929
- thumbv7em-none-eabi
3030
- wasm32-unknown-unknown
3131
steps:

.github/workflows/chacha20poly1305.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
strategy:
2323
matrix:
2424
rust:
25-
- 1.41.0 # MSRV
25+
- 1.49.0 # MSRV
2626
- stable
2727
target:
28-
# - armv7-none-eabi TODO: test after MSRV is bumped to 1.42
28+
- armv7a-none-eabi
2929
- thumbv7em-none-eabi
3030
- wasm32-unknown-unknown
3131
steps:
@@ -43,7 +43,7 @@ jobs:
4343
strategy:
4444
matrix:
4545
rust:
46-
- 1.41.0 # MSRV
46+
- 1.49.0 # MSRV
4747
- stable
4848
steps:
4949
- uses: actions/checkout@v1

.github/workflows/crypto_box.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ jobs:
2323
# strategy:
2424
# matrix:
2525
# rust:
26-
# - 1.41.0 # MSRV
26+
# - 1.49.0 # MSRV
2727
# - stable
2828
# target:
29-
# # - armv7-none-eabi TODO: test after MSRV is bumped to 1.42
3029
# - thumbv7em-none-eabi
3130
# - wasm32-unknown-unknown
3231
# steps:
@@ -44,7 +43,7 @@ jobs:
4443
strategy:
4544
matrix:
4645
rust:
47-
- 1.41.0 # MSRV
46+
- 1.49.0 # MSRV
4847
- stable
4948
steps:
5049
- uses: actions/checkout@v1
@@ -62,7 +61,7 @@ jobs:
6261
- uses: actions-rs/toolchain@v1
6362
with:
6463
profile: minimal
65-
toolchain: 1.41.0 # MSRV
64+
toolchain: 1.49.0 # MSRV
6665
components: clippy
6766
override: true
6867
- run: cargo clippy -- -D warnings

.github/workflows/eax.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
- 1.41.0 # MSRV
2626
- stable
2727
target:
28-
# - armv7-none-eabi TODO: test after MSRV is bumped to 1.42
2928
- thumbv7em-none-eabi
3029
- wasm32-unknown-unknown
3130
steps:

.github/workflows/mgm.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
- 1.41.0 # MSRV
2626
- stable
2727
target:
28-
# - armv7-none-eabi TODO: test after MSRV is bumped to 1.42
2928
- thumbv7em-none-eabi
3029
- wasm32-unknown-unknown
3130
steps:

.github/workflows/xsalsa20poly1305.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
- 1.41.0 # MSRV
2626
- stable
2727
target:
28-
# - armv7-none-eabi TODO: test after MSRV is bumped to 1.42
2928
- thumbv7em-none-eabi
3029
- wasm32-unknown-unknown
3130
steps:

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chacha20poly1305/README.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,6 @@ in the Transport Layer Security (TLS) protocol. The underlying ChaCha20 cipher
3131
is also widely used as a cryptographically secure random number generator,
3232
including internal use by the Rust standard library.
3333

34-
## Performance Notes
35-
36-
By default this crate will use portable software implementations of the
37-
underlying ChaCha20 and Poly1305 ciphers it's based on.
38-
39-
When targeting modern x86/x86_64 CPUs, use the following `RUSTFLAGS` to
40-
take advantage of AVX2 acceleration:
41-
42-
RUSTFLAGS="-Ctarget-feature=+avx2"
43-
44-
Ideally target the `haswell` or `skylake` architectures as a baseline:
45-
46-
RUSTFLAGS="-Ctarget-cpu=haswell -Ctarget-feature=+avx2"
47-
4834
## Security Notes
4935

5036
This crate has received one [security audit by NCC Group][5], with no significant
@@ -81,7 +67,7 @@ dual licensed as above, without any additional terms or conditions.
8167
[docs-image]: https://docs.rs/chacha20poly1305/badge.svg
8268
[docs-link]: https://docs.rs/chacha20poly1305/
8369
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
84-
[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg
70+
[rustc-image]: https://img.shields.io/badge/rustc-1.49+-blue.svg
8571
[codecov-image]: https://codecov.io/gh/RustCrypto/AEADs/branch/master/graph/badge.svg
8672
[codecov-link]: https://codecov.io/gh/RustCrypto/AEADs
8773
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg

0 commit comments

Comments
 (0)