Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump universal-hash to 0.6.0-pre #196

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ghash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.1 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.1 # MSRV
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/poly1305.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.1 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -48,15 +48,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand All @@ -82,15 +82,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand All @@ -116,15 +116,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/polyval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
rust:
- 1.56.1 # MSRV
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -48,15 +48,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand All @@ -82,15 +82,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand All @@ -116,15 +116,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.56.1 # MSRV
rust: 1.65.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable
steps:
Expand Down
55 changes: 37 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ members = [
"polyval"
]
resolver = "2"

[patch.crates-io]
universal-hash = { git = "https://github.com/RustCrypto/traits.git", branch = "master" }
6 changes: 3 additions & 3 deletions ghash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ghash"
version = "0.5.1"
version = "0.6.0-pre"
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
description = """
Expand All @@ -12,12 +12,12 @@ repository = "https://github.com/RustCrypto/universal-hashes"
readme = "README.md"
keywords = ["aes-gcm", "crypto", "universal-hashing"]
categories = ["cryptography", "no-std"]
rust-version = "1.56"
rust-version = "1.65"
edition = "2021"

[dependencies]
opaque-debug = "0.3"
polyval = { version = "0.6.2", path = "../polyval" }
polyval = { version = "=0.7.0-pre", path = "../polyval" }

# optional dependencies
zeroize = { version = "1", optional = true, default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions poly1305/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poly1305"
version = "0.8.0"
version = "0.9.0-pre"
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
description = "The Poly1305 universal hash function and message authentication code"
Expand All @@ -9,12 +9,12 @@ repository = "https://github.com/RustCrypto/universal-hashes"
keywords = ["crypto", "chacha20", "mac", "salsa20", "universal-hashing"]
categories = ["cryptography", "no-std"]
readme = "README.md"
rust-version = "1.56"
rust-version = "1.65"
edition = "2021"

[dependencies]
opaque-debug = "0.3"
universal-hash = { version = "0.5", default-features = false }
universal-hash = { version = "=0.6.0-pre", default-features = false }
zeroize = { version = "1", optional = true, default-features = false }

[target.'cfg(any(target_arch = "x86_64", target_arch = "x86"))'.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions poly1305/src/backend/avx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
// length to be known, which is incompatible with the streaming API of UniversalHash.

use universal_hash::{
array::Array,
consts::{U16, U4},
crypto_common::{BlockSizeUser, ParBlocksSizeUser},
generic_array::GenericArray,
UhfBackend,
};

Expand Down Expand Up @@ -160,7 +160,7 @@ impl State {
}

// Compute tag: p + k mod 2^128
let mut tag = GenericArray::<u8, _>::default();
let mut tag = Array::<u8, _>::default();
let tag_int = if let Some(p) = p {
self.k + p
} else {
Expand Down
6 changes: 3 additions & 3 deletions poly1305/src/fuzz.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use universal_hash::{generic_array::GenericArray, UniversalHash};
use universal_hash::{array::Array, UniversalHash};

use crate::{backend, Block, Key, BLOCK_SIZE};

Expand All @@ -9,7 +9,7 @@ pub fn fuzz_avx2(key: &Key, data: &[u8]) {

for (_i, chunk) in data.chunks(BLOCK_SIZE).enumerate() {
if chunk.len() == BLOCK_SIZE {
let block = GenericArray::from_slice(chunk);
let block = Array::from_slice(chunk);
unsafe {
avx2.compute_block(block, false);
}
Expand Down Expand Up @@ -38,7 +38,7 @@ pub fn fuzz_avx2(key: &Key, data: &[u8]) {
}

fn avx2_fuzzer_test_case(data: &[u8]) {
fuzz_avx2(data[0..32].into(), &data[32..]);
fuzz_avx2(Array::from_slice(&data[0..32]).into(), &data[32..]);
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions poly1305/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ extern crate std;
pub use universal_hash;

use universal_hash::{
array::Array,
consts::{U16, U32},
crypto_common::{BlockSizeUser, KeySizeUser},
generic_array::GenericArray,
KeyInit, UniversalHash,
};

Expand Down Expand Up @@ -146,7 +146,7 @@ impl Poly1305 {
pub fn compute_unpadded(mut self, data: &[u8]) -> Tag {
for chunk in data.chunks(BLOCK_SIZE) {
if chunk.len() == BLOCK_SIZE {
let block = GenericArray::from_slice(chunk);
let block = Array::from_slice(chunk);
self.state.compute_block(block, false);
} else {
let mut block = Block::default();
Expand Down
Loading
Loading