-
Notifications
You must be signed in to change notification settings - Fork 2
Replace the rust-crypto crate to other crates #8
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
Conversation
|
The first and second commit looks good to be merged. |
|
The 4th commit seems to take more time to be implemented. |
|
I'll try to complete the 4th commit within today. If I can't finish it by today, I'll split it up. |
|
It looks good to me up to the 3rd commit. I'll review the fourth when you finish it. |
|
@sgkim126 @HoOngEe I replaced crates related to aes-256-cbc to other crates. I'm waiting for your review. : ) There are still two parts left to be fixed: 1) ctr mode, and 2) error handling. And I don't know how to solve 2) error handling. To be exact, I don't understand our error handling structure, and roles of If the third and forth commit looks good to be merged too, I'll split it up. |
sgkim126
left a comment
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 seems that there is no test to check whether the encrypted result has been changed.
Please add tests like
rust-codechain-crypto/src/blake.rs
Line 108 in 0e2cc25
| assert_eq!(H128::from("46fb7408d4f285228f4af516ea25851b"), result); |
HoOngEe
left a comment
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.
I checked the functions in ctr crate. We can implement encryption and decryption using apply_keystream method in SyncStreamCipher trait. However I still cannot understand why ctr does not provide StreamCipher methods. I think it still remains unimplemented.
|
@sgkim126 @HoOngEe I replaced crates related to the I'm working on replacing |
HoOngEe
left a comment
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
The
[email protected]crate that we are using now is unaudited and has not received a commit since 2016. We are still unknown whether there are any vulnerabilities offhand. But if there are ones, they will never receive fixes. Thus, we think that it is necessary to completely replace the rust-crypto crate to other crypto crates.I replaced hash in the
rust-cryptocrate to other crates(sha-1,sha2,sha3,ripemd160anddigest), and blake2 in therust-cryptocrate toblake2crate. And I'm working on replacingaesandblock modeto other crates(block-modes,aes,aes-soft).I think there are unnecessary and dirty codes, so I need your review to modify them.