-
Notifications
You must be signed in to change notification settings - Fork 290
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
remove rust-cypto dependency, fix issuse 2404 3254 #3609
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3609 +/- ##
==========================================
- Coverage 29.29% 29.00% -0.28%
==========================================
Files 589 589
Lines 49864 49864
Branches 23450 23450
==========================================
- Hits 14601 14458 -143
+ Misses 21264 21257 -7
- Partials 13999 14149 +150
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Benchmark for 99d2ef1Click to view benchmark
|
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.
@nkysg
Seems like you are using tiny-keccak to replace rust-crypto, but the latest commit to tini-keccak is 2 years ago. Not sure if it is maintained.
When reading the codes in Move language, we noticed that they are using crate sha2 to do some hash algorithms.
https://docs.rs/sha2/latest/sha2/
https://github.com/RustCrypto/hashes
@JerryKwan we should use lib sha3 or tiny-keccak, our HashValue compute hash implement sha3 algo。 #[cfg(not(feature = "avx512f"))]
pub fn sha3_256_of(buffer: &[u8]) -> Self {
let mut sha3 = Sha3::v256();
sha3.update(buffer);
HashValue::from_keccak(sha3)
} HashValue code is port from diem-crypto |
Benchmark for 49c0531Click to view benchmark
|
Benchmark for 9712801Click to view benchmark
|
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
fix issue
#2404
#3254
Issue Number: N/A
What is the new behavior?
Other information