-
Notifications
You must be signed in to change notification settings - Fork 102
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
Rust wrappers for hash and merkle API #614
Conversation
189b746
to
58fd4ab
Compare
|
||
Hash create_sha3_256_hash(uint64_t input_chunk_size) | ||
{ | ||
std::shared_ptr<HashBackend> backend; | ||
ICICLE_CHECK(Keccak256Dispatcher::execute(input_chunk_size, backend)); | ||
ICICLE_CHECK(Sha3_256Dispatcher::execute(input_chunk_size, backend)); | ||
Hash keccak{backend}; | ||
return keccak; | ||
} | ||
|
||
// Keccak 512 |
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.
// Sha3 512
// TODO implement | ||
ICICLE_LOG_DEBUG << "Keccak/sha3 CPU hash() called, batch=" << config.batch | ||
<< ", single_output_size=" << output_size(); | ||
// TODO implement real logic |
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.
prefer to add asserion
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.
yes it's just that it will fail in CI. Aviad has a PR for that already.
None, // No padding, assume input is correctly sized. | ||
ZeroPadding, // Pad the input with zeroes to fit the expected input size. | ||
LastValue, // Pad the input by repeating the last value. | ||
} |
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.
Do we need other padding policies, such as Random Padding, Repeat Padding, etc.?
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.
Probably yes but we will have to implement them separately
No description provided.