Skip to content

Commit 49ef980

Browse files
authored
aes v0.7.0 (#238)
1 parent 957db90 commit 49ef980

File tree

6 files changed

+43
-9
lines changed

6 files changed

+43
-9
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aes/CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.7.0 (2021-04-29)
9+
### Added
10+
- Auto-detection support for AES-NI; MSRV 1.49+ ([#208], [#214], [#215], [#216])
11+
12+
### Changed
13+
- Unify the `aes`, `aesni`, and `aes-soft` crates ([#200])
14+
- Use `cfg-if` crate ([#203])
15+
- Rename `semi_fixslice` feature to `compact` ([#204])
16+
- Refactor NI backend ([#224], [#225])
17+
- Bump `cipher` crate dependency to v0.3 release ([#235])
18+
- Bump `ctr` crate dependency to v0.7 ([#237])
19+
20+
[#200]: https://github.com/RustCrypto/block-ciphers/pull/200
21+
[#203]: https://github.com/RustCrypto/block-ciphers/pull/203
22+
[#204]: https://github.com/RustCrypto/block-ciphers/pull/204
23+
[#208]: https://github.com/RustCrypto/block-ciphers/pull/208
24+
[#214]: https://github.com/RustCrypto/block-ciphers/pull/214
25+
[#215]: https://github.com/RustCrypto/block-ciphers/pull/215
26+
[#216]: https://github.com/RustCrypto/block-ciphers/pull/216
27+
[#224]: https://github.com/RustCrypto/block-ciphers/pull/224
28+
[#225]: https://github.com/RustCrypto/block-ciphers/pull/225
29+
[#235]: https://github.com/RustCrypto/block-ciphers/pull/235
30+
[#237]: https://github.com/RustCrypto/block-ciphers/pull/237
31+
832
## 0.6.0 (2020-10-16)
933
### Changed
1034
- Replace `block-cipher`/`stream-cipher` with `cipher` crate ([#167])

aes/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aes"
3-
version = "0.7.0-pre"
3+
version = "0.7.0"
44
description = """
55
Pure Rust implementation of the Advanced Encryption Standard (a.k.a. Rijndael)
66
including support for AES in counter mode (a.k.a. AES-CTR)

aes/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ using a portable implementation based on bitslicing.
4242

4343
## Minimum Supported Rust Version
4444

45-
- Rust **1.49** or higher.
46-
- Rust **1.41** is supported when the `force-soft` feature is enabled.
45+
Rust **1.49** or higher.
4746

4847
Minimum supported Rust version can be changed in future releases, but it will
4948
be done with a minor version bump.

aes/src/lib.rs

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
//! Pure Rust implementation of the Advanced Encryption Standard
22
//! (a.k.a. Rijndael)
33
//!
4-
//! It provides two different backends based on what target features
5-
//! are specified:
4+
//! # Supported platforms
5+
//!
6+
//! This crate provides two different backends based on what target features
7+
//! are available:
68
//!
79
//! - "soft" portable constant-time implementation based on [fixslicing].
810
//! Enabling the `compact` Cargo feature will reduce the code size of this
@@ -12,8 +14,14 @@
1214
//! architectures with `target-feature=+aes`, as well as an accelerated
1315
//! AES-CTR implementation with `target-feature=+aes,+ssse3`
1416
//!
15-
//! Crate switches between implementations automatically at compile time.
16-
//! (i.e. it does not use run-time feature detection)
17+
//! By default this crate uses runtime detection on `i686`/`x86_64` targets
18+
//! in order to determine if AES-NI is available, and if it is not, it will
19+
//! fallback to using a constant-time software implementation.
20+
//!
21+
//! Passing `RUSTFLAGS=-Ctarget-feature=+aes,+ssse3` explicitly at compile-time
22+
//! will override runtime detection and ensure that AES-NI is always used.
23+
//! Programs built in this manner will crash with an illegal instruction on
24+
//! CPUs which do not have AES-NI enabled.
1725
//!
1826
//! # Usage example
1927
//! ```
@@ -26,12 +34,15 @@
2634
//! let key = GenericArray::from_slice(&[0u8; 16]);
2735
//! let mut block = GenericArray::clone_from_slice(&[0u8; 16]);
2836
//! let mut block8 = GenericArray::clone_from_slice(&[block; 8]);
37+
//!
2938
//! // Initialize cipher
3039
//! let cipher = Aes128::new(&key);
3140
//!
3241
//! let block_copy = block.clone();
42+
//!
3343
//! // Encrypt block in-place
3444
//! cipher.encrypt_block(&mut block);
45+
//!
3546
//! // And decrypt it back
3647
//! cipher.decrypt_block(&mut block);
3748
//! assert_eq!(block, block_copy);

block-modes/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ block-padding = "0.2"
1515
cipher = "0.3"
1616

1717
[dev-dependencies]
18-
aes = { version = "=0.7.0-pre", path = "../aes", features = ["force-soft"] }
18+
aes = { version = "0.7", path = "../aes", features = ["force-soft"] }
1919
hex-literal = "0.2"
2020

2121
[features]

0 commit comments

Comments
 (0)