-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
crypto: remove unused OAES code #9505
base: master
Are you sure you want to change the base?
crypto: remove unused OAES code #9505
Conversation
55eb889
to
9dba2ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was about to PR the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@SyntheticBird45 reported that the OpenBSD compiler gives warnings about string functions used in `oaes_sprintf`, as well as use of `rand()` in `oaes_key_gen`. Neither of these functions are used in the codebase. Removing the unused OAES functions silences these warnings.
9dba2ae
to
0f9a5c1
Compare
Calling `oaes_alloc`, then `oaes_key_import_data`, then `oaes_free` calls the functions `calloc` and `free` four times each. This PR rewrites the key expansion function to expand directly into a 240 byte buffer with no allocations. This should speed up Cryptonight on platforms such as Raspberry PI. Hash tests are expanded to test slow hash using software AES on all platforms. Depends on monero-project#9505
e210944
to
0f9a5c1
Compare
Oops, I pushed an extra commit. Reverted. @SyntheticBird45 can you test now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error disappeared. Good job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@SyntheticBird45 reported that the OpenBSD compiler gives warnings about string functions used in
oaes_sprintf
, as well as use ofrand()
inoaes_key_gen
. Neither of these functions are used in the codebase. Removing the unused OAES functions silences these warnings.