-
Notifications
You must be signed in to change notification settings - Fork 126
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
FFI version of SuiteB AES functions #1398
Comments
I ended up implementing this with AES-NI in #1416, but I also have an implementation of just the AES-128 key expansion and encryption functions using the |
@qsctr Here's one I did using openssl's sha384 implementation -- https://github.com/weaversa/cryptol-ffi-tests. I'm wondering why it's so slow? I have a 2meg file (just random data) and Cryptol reads it in immediately ( |
I think when you do |
Ok, after further investigation it seems like processing the result of
void id(size_t len, uint8_t *in, uint8_t *out) {
for (size_t i = 0; i < len; ++i) {
out[i] = in[i];
}
} which essentially rebuilds the sequence in an optimized way, where it stores the actual values so lookup is constant time instead of linear time. Then running |
As a demo for the FFI, implement a drop-in replacement for the builtin SuiteB module that uses the FFI instead of Cryptol and Haskell primitives, and see if it results in a speedup in code like this.
The text was updated successfully, but these errors were encountered: