Skip to content
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 Cargo.lock

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

2 changes: 1 addition & 1 deletion aes-gcm-siv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ aead = { version = "0.6.0-rc.1", default-features = false }
aes = { version = "0.9.0-rc.1", optional = true }
cipher = "0.5.0-rc.1"
ctr = "0.10.0-rc.1"
polyval = { version = "0.7.0-rc.1", default-features = false }
polyval = { version = "0.7.0-rc.2", default-features = false }
subtle = { version = "2", default-features = false }
zeroize = { version = "1", optional = true, default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion aes-gcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ aead = { version = "0.6.0-rc.1", default-features = false }
aes = { version = "0.9.0-rc.1", optional = true }
cipher = "0.5.0-rc.1"
ctr = "0.10.0-rc.1"
ghash = { version = "0.6.0-rc.1", default-features = false }
ghash = { version = "0.6.0-rc.2", default-features = false }
subtle = { version = "2", default-features = false }
zeroize = { version = "1", optional = true, default-features = false }

Expand Down
21 changes: 4 additions & 17 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ rust-version = "1.56"
[dependencies]
criterion = "0.4.0"
rand = "0.9.0"
aes = "=0.9.0-pre.3"
aes = "0.9.0-rc.1"
aes-gcm = { path = "../aes-gcm/" }
aes-gcm-siv = { path = "../aes-gcm-siv/" }
ascon-aead = { path = "../ascon-aead/" }
ascon-aead128 = { path = "../ascon-aead128/" }
chacha20poly1305 = { path = "../chacha20poly1305/" }
deoxys = { path = "../deoxys/" }
eax = { path = "../eax/" }
Expand All @@ -35,8 +35,8 @@ path = "src/aes-gcm-siv.rs"
harness = false

[[bench]]
name = "ascon-aead"
path = "src/ascon-aead.rs"
name = "ascon-aead128"
path = "src/ascon-aead128.rs"
harness = false

[[bench]]
Expand All @@ -53,16 +53,3 @@ harness = false
name = "eax"
path = "src/eax.rs"
harness = false

[patch.crates-io]
aead-stream = { path = "../aead-stream" }

crypto-common = { git = "https://github.com/RustCrypto/traits.git" }
aead = { git = "https://github.com/RustCrypto/traits.git" }

chacha20 = { git = "https://github.com/RustCrypto/stream-ciphers.git" }

ctr = { git = "https://github.com/baloo/block-modes.git", branch = "baloo/edition-2024" }

ghash = { git = "https://github.com/RustCrypto/universal-hashes.git" }
polyval = { git = "https://github.com/RustCrypto/universal-hashes.git" }
14 changes: 8 additions & 6 deletions benches/src/ascon-aead.rs → benches/src/ascon-aead128.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};

use ascon_aead::aead::{AeadInPlaceDetached, KeyInit};
use ascon_aead::AsconAead128;
use ascon_aead128::aead::{AeadInOut, KeyInit};
use ascon_aead128::AsconAead128;

const KB: usize = 1024;

Expand All @@ -10,23 +10,25 @@ type Benchmarker = Criterion;
#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
type Benchmarker = Criterion<criterion_cycles_per_byte::CyclesPerByte>;

fn bench<A: AeadInPlaceDetached + KeyInit>(name: &str, c: &mut Benchmarker) {
fn bench<A: AeadInOut + KeyInit>(name: &str, c: &mut Benchmarker) {
let mut group = c.benchmark_group(name);
let nonce = black_box(Default::default());
let cipher = black_box(A::new(&Default::default()));

let mut buf = vec![0u8; 16 * KB];
for size in [KB, 2 * KB, 4 * KB, 8 * KB, 16 * KB] {
let buf = &mut buf[..size];
let tag = cipher.encrypt_in_place_detached(&nonce, b"", buf).unwrap();
let tag = cipher
.encrypt_inout_detached(&nonce, b"", buf.into())
.unwrap();

group.throughput(Throughput::Bytes(size as u64));

group.bench_function(BenchmarkId::new("encrypt-128", size), |b| {
b.iter(|| cipher.encrypt_in_place_detached(&nonce, b"", buf))
b.iter(|| cipher.encrypt_inout_detached(&nonce, b"", buf.into()))
});
group.bench_function(BenchmarkId::new("decrypt-128", size), |b| {
b.iter(|| cipher.decrypt_in_place_detached(&nonce, b"", buf, &tag))
b.iter(|| cipher.decrypt_inout_detached(&nonce, b"", buf.into(), &tag))
});
}

Expand Down
2 changes: 1 addition & 1 deletion chacha20poly1305/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rust-version = "1.85"
aead = { version = "0.6.0-rc.1", default-features = false }
chacha20 = { version = "0.10.0-rc.1", default-features = false, features = ["xchacha"] }
cipher = "0.5.0-rc.1"
poly1305 = "0.9.0-rc.1"
poly1305 = "0.9.0-rc.2"
zeroize = { version = "1.8", optional = true, default-features = false }

[dev-dependencies]
Expand Down