-
Notifications
You must be signed in to change notification settings - Fork 47
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
current_pos
wrong value on +aes,+ssse3
#108
Comments
That definitely looks like a bug. It appears that when those target features are enabled, an AES-CTR implementation located directly in the My guess is the CTR implementation in the As a temporary workaround, you can compose AES-CTR using the type Aes128Ctr = ctr::Ctr128<aes::Aes128>; |
Thanks for your acknowledgment and the workaround. As a side note, the encryption is still keeping its internal state correctly, ie: fn main() {
let key = [0u8; 32];
let counter_block = [0u8; 16];
// Prepare the cipher for further operations
let mut cipher = aes_ctr::Aes256Ctr::new_var(&key, &counter_block).unwrap();
let mut temp = [0u8; 0x1000];
cipher.encrypt(&mut temp);
println!("{:?}", &temp[..32]);
let mut temp2 = [0u8; 0x1000];
cipher.encrypt(&mut temp2);
println!("{:?}", &temp2[..32]);
println!("{}", cipher.current_pos());
} Returns, with flags:
|
Yes please, thank you! |
Closing, as re-posted on RustCrypto/block-ciphers#71 |
Hello,
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 aboveThe text was updated successfully, but these errors were encountered: