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

Easier checks for pre-conditions (wrt hardware capabilities) #2

Open
surendarchandra opened this issue Oct 5, 2016 · 3 comments
Open

Comments

@surendarchandra
Copy link

I know that each function has a set of preconditions, it would be great if we can easily check for those at run time (instead of rolling our own custom checkers). E.g., AES key expansion adapts to AVX or SSE. However, it also requires AES. Ran into a setup which used Haswell but with AES-NI disabled in BIOS (not sure why this is still the default with certain vendors). Got an illegal instruction error. Thanks

@gbtucker
Copy link
Contributor

gbtucker commented Oct 6, 2016

Almost all functions in the library have base functions that are highly portable and few minimum requirements so the multi-binary interface has few restrictions. The block ciphers in isa-l_crypto are one exception to this and do require AES-NI as a minimum.

Some early CRB boards have AES-NI disabled in BIOS but do re-enable for production boards.

@surendarchandra
Copy link
Author

Looks like Super-Micros disable them by default.

I use a CPUID based lookup: ecx, bit 25 to detect AES.

@ilmarmors
Copy link
Contributor

I have bumped into this issue as well - somebody run Java JNI wrapper for isa-l_crypto I wrote on computer without AES instructions. That ended ugly with Java core dump. I will need to write check for AES support. If there would be something simple like that added to isa-l_crypto, I would use it for sure.

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

No branches or pull requests

3 participants