Replace the rust-crypto crate to other crates#8
Replace the rust-crypto crate to other crates#8sgkim126 merged 5 commits intoCodeChain-io:masterfrom somniumism:Change
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.
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
HoOngEe
left a comment
There was a problem hiding this comment.
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 |
The
rust-crypto@2.3.6crate 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.