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

Alignement requirements quesiton. #392

Open
dpc opened this issue Oct 26, 2016 · 1 comment
Open

Alignement requirements quesiton. #392

dpc opened this issue Oct 26, 2016 · 1 comment

Comments

@dpc
Copy link

dpc commented Oct 26, 2016

Hi,

AFAIK, AESNI and potentially other primitives require that the encryption blocks are properly aligned. Are alignment requirements described/handled by rust-crypto? How would I go about making a best possible job for plain text, cipher destination, iv and everything else? Do they always have to be "block size" aligned or are there more nuances there?

@dpc dpc changed the title Alignement requirements. Alignement requirements quesiton. Oct 26, 2016
@burdges
Copy link

burdges commented Oct 26, 2016

Interesting. It's unclear to me from the .asm or .c files if or how they handle this, but if so its built into the compiler's handling of the inline assembly for SSE instructions. Appears Rust does not yet offer #[repr(align=16)], so nothing easy one can do from Rust. It's probably worth adding tests to aesni.rs that try badly aligned keys, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants