You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an issue with current_pos on Aes256Ctr while compiling with the recommended flags from the README.
To reproduce:
use aes_ctr;use aes_ctr::stream_cipher::{NewStreamCipher,SyncStreamCipherSeek};fnmain(){let key = [0u8;32];let counter_block = [0u8;16];// Prepare the cipher for further operationsletmut cipher = aes_ctr::Aes256Ctr::new_var(&key,&counter_block).unwrap();
cipher.seek(16);println!("{}", cipher.current_pos());}
[dependencies]
aes-ctr = "0"
$ cargo version
cargo 1.42.0 (86334295e 2020-01-31)
Here's what I obtain:
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/test_aes`
16
$ cargo run --release
Finished release [optimized] target(s) in 0.01s
Running `target/release/test_aes`
16
$ RUSTFLAGS="-C target-feature=+aes,+ssse3" cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/test_aes`
0
$ RUSTFLAGS="-C target-feature=+aes,+ssse3" cargo run --release
Finished release [optimized] target(s) in 0.01s
Running `target/release/test_aes`
0
This is a re-post of RustCrypto/stream-ciphers#108 , as a bug in
aesni
is likely the root causeHello,
I got an issue with
current_pos
onAes256Ctr
while compiling with the recommended flags from the README.To reproduce:
Here's what I obtain:
Am I doing something wrong?
Instead of
.seek
, I've also tried with:Leading to the same incoherent result.
Regarding rustc flags:
+aes,+sse2
,+aes
,+ssse3
lead to correct results+aes,+ssse3
leads to the result aboveAs a side note, the encryption is still keeping its internal state correctly, ie:
Returns, with flags:
The text was updated successfully, but these errors were encountered: