Skip to content

Commit

Permalink
Update to block-cipher v0.8 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov authored Jul 17, 2020
1 parent 972d5aa commit dcf7d3d
Show file tree
Hide file tree
Showing 85 changed files with 447 additions and 688 deletions.
106 changes: 34 additions & 72 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions aes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aes"
version = "0.4.0"
version = "0.5.0"
description = "Facade for AES (Rijndael) block ciphers implementations"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
Expand All @@ -12,13 +12,13 @@ keywords = ["crypto", "aes", "rijndael", "block-cipher"]
categories = ["cryptography", "no-std"]

[dependencies]
block-cipher = "0.7"
block-cipher = "0.8"

[target.'cfg(not(all(target_feature="aes", target_feature = "sse2", any(target_arch = "x86_64", target_arch = "x86"))))'.dependencies]
aes-soft = { version = "0.4", path = "aes-soft" }
aes-soft = { version = "0.5", path = "aes-soft" }

[target.'cfg(all(target_feature="aes", target_feature = "sse2", any(target_arch = "x86_64", target_arch = "x86")))'.dependencies]
aesni = { version = "0.7", default-features = false, path = "aesni" }
aesni = { version = "0.8", default-features = false, path = "aesni" }

[dev-dependencies]
block-cipher = { version = "0.7", features = ["dev"] }
block-cipher = { version = "0.8", features = ["dev"] }
6 changes: 3 additions & 3 deletions aes/aes-soft/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aes-soft"
version = "0.4.0"
version = "0.5.0"
description = "AES (Rijndael) block ciphers bit-sliced implementation"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
Expand All @@ -11,9 +11,9 @@ keywords = ["crypto", "aes", "rijndael", "block-cipher"]
categories = ["cryptography", "no-std"]

[dependencies]
block-cipher = "0.7"
block-cipher = "0.8"
opaque-debug = "0.2"
byteorder = { version = "1", default-features = false }

[dev-dependencies]
block-cipher = { version = "0.7", features = ["dev"] }
block-cipher = { version = "0.8", features = ["dev"] }
15 changes: 0 additions & 15 deletions aes/aes-soft/benches/aes128.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![no_std]
#![feature(test)]
extern crate test;

Expand Down Expand Up @@ -52,17 +51,3 @@ pub fn aes128_decrypt8(bh: &mut test::Bencher) {
});
bh.bytes = (input[0].len() * input.len()) as u64;
}
/*
#[bench]
pub fn ctr_aes128(bh: &mut test::Bencher) {
let mut cipher = aes::CtrAes128::new(&[0; 16], &[0; 16]);
let mut input = [0u8; 10000];
bh.iter(|| {
cipher.xor(&mut input);
test::black_box(&input);
});
bh.bytes = input.len() as u64;
}
*/
16 changes: 0 additions & 16 deletions aes/aes-soft/benches/aes192.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![no_std]
#![feature(test)]
extern crate test;

Expand Down Expand Up @@ -52,18 +51,3 @@ pub fn aes192_decrypt8(bh: &mut test::Bencher) {
});
bh.bytes = (input[0].len() * input.len()) as u64;
}

/*
#[bench]
pub fn ctr_aes192(bh: &mut test::Bencher) {
let mut cipher = aes::CtrAes192::new(&[0; 24], &[0; 16]);
let mut input = [0u8; 10000];
bh.iter(|| {
cipher.xor(&mut input);
test::black_box(&input);
});
bh.bytes = input.len() as u64;
}
*/
15 changes: 0 additions & 15 deletions aes/aes-soft/benches/aes256.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![no_std]
#![feature(test)]
extern crate test;

Expand Down Expand Up @@ -52,17 +51,3 @@ pub fn aes256_decrypt8(bh: &mut test::Bencher) {
});
bh.bytes = (input[0].len() * input.len()) as u64;
}
/*
#[bench]
pub fn ctr_aes256(bh: &mut test::Bencher) {
let mut cipher = aes::CtrAes256::new(&[0; 32], &[0; 16]);
let mut input = [0u8; 10000];
bh.iter(|| {
cipher.xor(&mut input);
test::black_box(&input);
});
bh.bytes = input.len() as u64;
}
*/
Binary file modified aes/aes-soft/tests/data/aes128.blb
Binary file not shown.
Binary file modified aes/aes-soft/tests/data/aes192.blb
Binary file not shown.
Binary file modified aes/aes-soft/tests/data/aes256.blb
Binary file not shown.
9 changes: 3 additions & 6 deletions aes/aes-soft/tests/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//! Test vectors are from NESSIE:
//! https://www.cosic.esat.kuleuven.be/nessie/testvectors/
#![no_std]

use block_cipher::new_test;

new_test!(aes128_test, "aes128", aes_soft::Aes128);
new_test!(aes192_test, "aes192", aes_soft::Aes192);
new_test!(aes256_test, "aes256", aes_soft::Aes256);
block_cipher::new_test!(aes128_test, "aes128", aes_soft::Aes128);
block_cipher::new_test!(aes192_test, "aes192", aes_soft::Aes192);
block_cipher::new_test!(aes256_test, "aes256", aes_soft::Aes256);
Loading

0 comments on commit dcf7d3d

Please sign in to comment.