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
[seraphis] crypto: add blake2b #9198
base: master
Are you sure you want to change the base?
Conversation
/// END: blake2-impl.h | ||
|
||
void clear_internal_memory(void *mem, const size_t length) { | ||
memwipe(mem, length); |
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.
Adding this memwipe
is the main difference with the randomx version, which comments out all calls to clear_internal_memory()
.
src/crypto/blake2b.h
Outdated
// crypto namespace (fixes naming collisions with libsodium) | ||
#define blake2b_init crypto_blake2b_init | ||
#define blake2b_init_key crypto_blake2b_init_key | ||
#define blake2b_init_param crypto_blake2b_init_param | ||
#define blake2b_update crypto_blake2b_update | ||
#define blake2b_final crypto_blake2b_final | ||
#define blake2b crypto_blake2b | ||
#define blake2b_long crypto_blake2b_long |
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.
Setting the namespace to crypto
is the only other difference from randomx, which uses the randomx
namespace.
Could you please revert whitespace diffs from the RandomX Blake2b file? |
@jeffro256 done, looks like someone in the history of these files was not using spaces for tabs... |
This is a PR in my 'upstreaming seraphis_lib project', the changes here are not used anywhere yet.
src/crypto
. The code is lifted almost verbatim from randomx.src/crypto/blake2b.h
. Test withctest -R hash-blake2b
in thetests/hash
folder in your build directory.