-
Notifications
You must be signed in to change notification settings - Fork 516
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
Optimize Keccak implementation and remove Crypto++ dependency #47
base: master
Are you sure you want to change the base?
Conversation
#define FOR5(v, s, e) v = 0; REPEAT5(e; v += s;) | ||
|
||
/// Keccak-f[1600] | ||
inline void keccakf1600(uint64_t* a) noexcept |
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.
This fails on Windows since msvc seems to not havenoexcept
.
Can you add something like:
#ifndef _MSC_VER
#define NOEXCEPT noexcept
#else
#define NOEXCEPT
#endif
and use that instead?
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.
It's not needed.
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.
It's not needed in the function? So you mean you will remove the attribute in general?
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.
Yep. Compiler will know that without my help.
Can you also update python's sha3.c would need to be renamed to keccak.cpp there too. |
Some license headers are missing. |
Not sure about CC0 - GPL compatibility. |
fails on the CI? |
Hmmm .. this will also need rebasing now. As for the CI it's the python tests that fail since python's setup.py needs updating after the file changes. |
CI fails is because my added file is C++11 and requires The solution might be to restrict implementation to C or C++ only. |
As I talked with @LefterisJP and @gavofyork some time ago this is some code from my pet project https://github.com/chfast/ethminer.