Skip to content

Commit 890e5ab

Browse files
authored
Rust 2021 edition + unpin zeroize; MSRV 1.56 (#147)
- Bumps all crates to 2021 edition - Removes `zeroize` pinning to preserve MSRV - New MSRV is 1.56
1 parent 5361f44 commit 890e5ab

File tree

23 files changed

+57
-49
lines changed

23 files changed

+57
-49
lines changed

.github/workflows/ghash.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
matrix:
2727
rust:
28-
- 1.49.0 # MSRV
28+
- 1.56.1 # MSRV
2929
- stable
3030
target:
3131
- thumbv7em-none-eabi
@@ -56,7 +56,7 @@ jobs:
5656
strategy:
5757
matrix:
5858
rust:
59-
- 1.49.0 # MSRV
59+
- 1.56.1 # MSRV
6060
- stable
6161
steps:
6262
- uses: actions/checkout@v1

.github/workflows/poly1305.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
matrix:
2727
rust:
28-
- 1.49.0 # MSRV
28+
- 1.56.1 # MSRV
2929
- stable
3030
target:
3131
- thumbv7em-none-eabi
@@ -50,15 +50,15 @@ jobs:
5050
include:
5151
# 32-bit Linux
5252
- target: i686-unknown-linux-gnu
53-
rust: 1.49.0 # MSRV
53+
rust: 1.56.1 # MSRV
5454
deps: sudo apt update && sudo apt install gcc-multilib
5555
- target: i686-unknown-linux-gnu
5656
rust: stable
5757
deps: sudo apt update && sudo apt install gcc-multilib
5858

5959
# 64-bit Linux
6060
- target: x86_64-unknown-linux-gnu
61-
rust: 1.49.0 # MSRV
61+
rust: 1.56.1 # MSRV
6262
- target: x86_64-unknown-linux-gnu
6363
rust: stable
6464
steps:
@@ -86,15 +86,15 @@ jobs:
8686
include:
8787
# 32-bit Linux
8888
- target: i686-unknown-linux-gnu
89-
rust: 1.49.0 # MSRV
89+
rust: 1.56.1 # MSRV
9090
deps: sudo apt update && sudo apt install gcc-multilib
9191
- target: i686-unknown-linux-gnu
9292
rust: stable
9393
deps: sudo apt update && sudo apt install gcc-multilib
9494

9595
# 64-bit Linux
9696
- target: x86_64-unknown-linux-gnu
97-
rust: 1.49.0 # MSRV
97+
rust: 1.56.1 # MSRV
9898
- target: x86_64-unknown-linux-gnu
9999
rust: stable
100100
steps:
@@ -121,15 +121,15 @@ jobs:
121121
include:
122122
# 32-bit Linux
123123
- target: i686-unknown-linux-gnu
124-
rust: 1.49.0 # MSRV
124+
rust: 1.56.1 # MSRV
125125
deps: sudo apt update && sudo apt install gcc-multilib
126126
- target: i686-unknown-linux-gnu
127127
rust: stable
128128
deps: sudo apt update && sudo apt install gcc-multilib
129129

130130
# 64-bit Linux
131131
- target: x86_64-unknown-linux-gnu
132-
rust: 1.49.0 # MSRV
132+
rust: 1.56.1 # MSRV
133133
- target: x86_64-unknown-linux-gnu
134134
rust: stable
135135
steps:
@@ -154,13 +154,13 @@ jobs:
154154
include:
155155
# ARM64
156156
- target: aarch64-unknown-linux-gnu
157-
rust: 1.49.0 # MSRV
157+
rust: 1.56.1 # MSRV
158158
- target: aarch64-unknown-linux-gnu
159159
rust: stable
160160

161161
# PPC32
162162
- target: powerpc-unknown-linux-gnu
163-
rust: 1.49.0 # MSRV
163+
rust: 1.56.1 # MSRV
164164
- target: powerpc-unknown-linux-gnu
165165
rust: stable
166166

.github/workflows/polyval.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
matrix:
2727
rust:
28-
- 1.49.0 # MSRV
28+
- 1.56.1 # MSRV
2929
- stable
3030
target:
3131
- thumbv7em-none-eabi
@@ -51,15 +51,15 @@ jobs:
5151
include:
5252
# 32-bit Linux
5353
- target: i686-unknown-linux-gnu
54-
rust: 1.49.0 # MSRV
54+
rust: 1.56.1 # MSRV
5555
deps: sudo apt update && sudo apt install gcc-multilib
5656
- target: i686-unknown-linux-gnu
5757
rust: stable
5858
deps: sudo apt update && sudo apt install gcc-multilib
5959

6060
# 64-bit Linux
6161
- target: x86_64-unknown-linux-gnu
62-
rust: 1.49.0 # MSRV
62+
rust: 1.56.1 # MSRV
6363
- target: x86_64-unknown-linux-gnu
6464
rust: stable
6565
steps:
@@ -87,15 +87,15 @@ jobs:
8787
include:
8888
# 32-bit Linux
8989
- target: i686-unknown-linux-gnu
90-
rust: 1.49.0 # MSRV
90+
rust: 1.56.1 # MSRV
9191
deps: sudo apt update && sudo apt install gcc-multilib
9292
- target: i686-unknown-linux-gnu
9393
rust: stable
9494
deps: sudo apt update && sudo apt install gcc-multilib
9595

9696
# 64-bit Linux
9797
- target: x86_64-unknown-linux-gnu
98-
rust: 1.49.0 # MSRV
98+
rust: 1.56.1 # MSRV
9999
- target: x86_64-unknown-linux-gnu
100100
rust: stable
101101
steps:
@@ -122,15 +122,15 @@ jobs:
122122
include:
123123
# 32-bit Linux
124124
- target: i686-unknown-linux-gnu
125-
rust: 1.49.0 # MSRV
125+
rust: 1.56.1 # MSRV
126126
deps: sudo apt update && sudo apt install gcc-multilib
127127
- target: i686-unknown-linux-gnu
128128
rust: stable
129129
deps: sudo apt update && sudo apt install gcc-multilib
130130

131131
# 64-bit Linux
132132
- target: x86_64-unknown-linux-gnu
133-
rust: 1.49.0 # MSRV
133+
rust: 1.56.1 # MSRV
134134
- target: x86_64-unknown-linux-gnu
135135
rust: stable
136136
steps:
@@ -155,13 +155,13 @@ jobs:
155155
include:
156156
# ARM64
157157
- target: aarch64-unknown-linux-gnu
158-
rust: 1.49.0 # MSRV
158+
rust: 1.56.1 # MSRV
159159
- target: aarch64-unknown-linux-gnu
160160
rust: stable
161161

162162
# PPC32
163163
- target: powerpc-unknown-linux-gnu
164-
rust: 1.49.0 # MSRV
164+
rust: 1.56.1 # MSRV
165165
- target: powerpc-unknown-linux-gnu
166166
rust: stable
167167

.github/workflows/workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions-rs/toolchain@v1
2222
with:
2323
profile: minimal
24-
toolchain: 1.49.0
24+
toolchain: 1.56.1
2525
components: clippy
2626
- run: cargo clippy --all --all-features -- -D warnings
2727

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ members = [
44
"poly1305",
55
"polyval"
66
]
7+
resolver = "2"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Collection of [Universal Hash Functions][1] written in pure Rust.
1212

1313
### Minimum Supported Rust Version
1414

15-
All crates in this repository support **Rust 1.49** or higher.
15+
All crates in this repository support **Rust 1.56** or higher.
1616

1717
In the future, we reserve the right to change the Minimum Supported Rust
1818
Version, but it will be done with the minor version bump.
@@ -39,7 +39,7 @@ dual licensed as above, without any additional terms or conditions.
3939

4040
[//]: # (badges)
4141

42-
[rustc-image]: https://img.shields.io/badge/rustc-1.49+-blue.svg
42+
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
4343
[deps-image]: https://deps.rs/repo/github/RustCrypto/universal-hashes/status.svg
4444
[deps-link]: https://deps.rs/repo/github/RustCrypto/universal-hashes
4545

ghash/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ 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+
## Unreleased
9+
### Changed
10+
- Relax `zeroize` constraints ([#147])
11+
- Upgrade to Rust 2021 edition ([#147])
12+
13+
[#147]: https://github.com/RustCrypto/universal-hashes/pull/147
14+
815
## 0.4.4 (2021-08-27)
916
### Changed
1017
- Relax `zeroize` constraints ([#141])

ghash/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ repository = "https://github.com/RustCrypto/universal-hashes"
1212
readme = "README.md"
1313
keywords = ["aes-gcm", "crypto", "universal-hashing"]
1414
categories = ["cryptography", "no-std"]
15-
edition = "2018"
15+
rust-version = "1.56"
16+
edition = "2021"
1617

1718
[dependencies]
1819
opaque-debug = "0.3"
1920
polyval = { version = "0.5.1", path = "../polyval" }
2021

2122
# optional dependencies
22-
zeroize = { version = ">=1, <1.4", optional = true, default-features = false }
23+
zeroize = { version = "1", optional = true, default-features = false }
2324

2425
[dev-dependencies]
2526
hex-literal = "0.3"

ghash/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dual licensed as above, without any additional terms or conditions.
4949
[docs-image]: https://docs.rs/ghash/badge.svg
5050
[docs-link]: https://docs.rs/ghash/
5151
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
52-
[rustc-image]: https://img.shields.io/badge/rustc-1.49+-blue.svg
52+
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
5353
[build-image]: https://github.com/RustCrypto/universal-hashes/workflows/ghash/badge.svg?branch=master&event=push
5454
[build-link]: https://github.com/RustCrypto/universal-hashes/actions?query=workflow%3Aghash
5555

poly1305/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ 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+
## Unreleased
9+
### Changed
10+
- Relax `zeroize` constraints ([#147])
11+
- Upgrade to Rust 2021 edition ([#147])
12+
13+
[#147]: https://github.com/RustCrypto/universal-hashes/pull/147
14+
815
## 0.7.2 (2021-08-27)
916
### Changed
1017
- Bump `cpufeatures` dependency to v0.2 ([#136])

poly1305/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ repository = "https://github.com/RustCrypto/universal-hashes"
99
keywords = ["crypto", "chacha20", "mac", "salsa20", "universal-hashing"]
1010
categories = ["cryptography", "no-std"]
1111
readme = "README.md"
12-
edition = "2018"
12+
rust-version = "1.56"
13+
edition = "2021"
1314

1415
[dependencies]
1516
opaque-debug = "0.3"
1617
universal-hash = { version = "0.4", default-features = false }
17-
zeroize = { version = ">=1, <1.4", optional = true, default-features = false }
18+
zeroize = { version = "1", optional = true, default-features = false }
1819

1920
[target.'cfg(any(target_arch = "x86_64", target_arch = "x86"))'.dependencies]
2021
cpufeatures = "0.2"

poly1305/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ dual licensed as above, without any additional terms or conditions.
5353
[docs-image]: https://docs.rs/poly1305/badge.svg
5454
[docs-link]: https://docs.rs/poly1305/
5555
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
56-
[rustc-image]: https://img.shields.io/badge/rustc-1.49+-blue.svg
56+
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
5757
[build-image]: https://github.com/RustCrypto/universal-hashes/workflows/poly1305/badge.svg?branch=master&event=push
5858
[build-link]: https://github.com/RustCrypto/universal-hashes/actions?query=workflow%3Apoly1305
5959

poly1305/src/backend/avx2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// optimisations provided by Bhattacharyya and Sarkar. The latter require the message
1616
// length to be known, which is incompatible with the streaming API of UniversalHash.
1717

18-
use core::convert::TryInto;
1918
use universal_hash::generic_array::GenericArray;
2019

2120
use crate::{Block, Key, Tag};

poly1305/src/backend/avx2/helpers.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ pub(super) struct Aligned130(pub(super) __m256i);
7676

7777
impl fmt::Display for Aligned130 {
7878
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
79-
use core::convert::TryInto;
80-
8179
let mut v0 = [0u8; 32];
8280
unsafe {
8381
_mm256_storeu_si256(v0.as_mut_ptr() as *mut _, self.0);
@@ -416,8 +414,6 @@ pub(super) struct Unreduced130 {
416414

417415
impl fmt::Display for Unreduced130 {
418416
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
419-
use core::convert::TryInto;
420-
421417
let mut v0 = [0u8; 32];
422418
let mut v1 = [0u8; 32];
423419
unsafe {
@@ -897,8 +893,6 @@ pub(super) struct Aligned4x130 {
897893

898894
impl fmt::Display for Aligned4x130 {
899895
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
900-
use core::convert::TryInto;
901-
902896
let mut v0 = [0u8; 32];
903897
let mut v1 = [0u8; 32];
904898
let mut v2 = [0u8; 32];
@@ -1577,8 +1571,6 @@ pub(super) struct Unreduced4x130 {
15771571

15781572
impl fmt::Display for Unreduced4x130 {
15791573
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1580-
use core::convert::TryInto;
1581-
15821574
let mut v0 = [0u8; 32];
15831575
let mut v1 = [0u8; 32];
15841576
let mut v2 = [0u8; 32];

poly1305/src/backend/soft.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// https://github.com/floodyberry/poly1305-donna
1414

1515
use crate::{Block, Key, Tag};
16-
use core::convert::TryInto;
1716

1817
#[derive(Clone, Default)]
1918
pub(crate) struct State {

poly1305/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! # Minimum Supported Rust Version
1616
//!
17-
//! Rust **1.49** or higher.
17+
//! Rust **1.56** or higher.
1818
//!
1919
//! Minimum supported Rust version may be changed in the future, but such
2020
//! changes will be accompanied with a minor version bump.

polyval/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Unreleased
99
### Changed
1010
- Remove `sse4.1` from CPU feature requirements for PCLMUL backend ([#143])
11+
- Relax `zeroize` constraints ([#147])
12+
- Upgrade to Rust 2021 edition ([#147])
1113

1214
[#143]: https://github.com/RustCrypto/universal-hashes/pull/143
13-
15+
[#147]: https://github.com/RustCrypto/universal-hashes/pull/147
1416

1517
## 0.5.3 (2021-08-27)
1618
### Changed

polyval/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ repository = "https://github.com/RustCrypto/universal-hashes"
1212
readme = "README.md"
1313
keywords = ["aes-gcm", "aes-gcm-siv", "crypto", "ghash", "universal-hashing"]
1414
categories = ["cryptography", "no-std"]
15-
edition = "2018"
15+
rust-version = "1.56"
16+
edition = "2021"
1617

1718
[dependencies]
1819
cfg-if = "1"
1920
opaque-debug = "0.3"
2021
universal-hash = { version = "0.4", default-features = false }
21-
zeroize = { version = ">=1, <1.4", optional = true, default-features = false }
22+
zeroize = { version = "1", optional = true, default-features = false }
2223

2324
[target.'cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86"))'.dependencies]
2425
cpufeatures = "0.2"

polyval/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dual licensed as above, without any additional terms or conditions.
5252
[docs-image]: https://docs.rs/polyval/badge.svg
5353
[docs-link]: https://docs.rs/polyval/
5454
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
55-
[rustc-image]: https://img.shields.io/badge/rustc-1.49+-blue.svg
55+
[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg
5656
[build-image]: https://github.com/RustCrypto/universal-hashes/workflows/polyval/badge.svg?branch=master&event=push
5757
[build-link]: https://github.com/RustCrypto/universal-hashes/actions?query=workflow%3Apolyval
5858

0 commit comments

Comments
 (0)