Conversation
| } | ||
|
|
||
| impl zeroize::Zeroize for BLS12377PrivateKey { | ||
| fn zeroize(&mut self) { |
There was a problem hiding this comment.
what about the privkey? In BLS12_381 we zeroize that too.
There was a problem hiding this comment.
talked to pun about this today, in BLS12-381 it is automatically dropped without explicitly drop here. in fact i commented out https://github.com/MystenLabs/fastcrypto/blob/main/src/bls12381.rs#L618 and all tests still passed
There was a problem hiding this comment.
added a comment here, this is done by the library under the hood, the test suggested this. in addition, the SecertKey in BLS12377 library prohibits a mutable reference, there is actually no easy to explicitly call zeroize on the object.
|
|
||
| impl zeroize::Zeroize for BLS12377PrivateKey { | ||
| fn zeroize(&mut self) { | ||
| // PrivateKey.zeroize here is not necessary here because the underlying implicitly zeroizes. |
There was a problem hiding this comment.
typo: using the word here twice
crypto/src/tests/bls12377_tests.rs
Outdated
| } | ||
| let sk_memory: &[u8] = | ||
| unsafe { ::std::slice::from_raw_parts(bytes_ptr, CELO_BLS_PRIVATE_KEY_LENGTH) }; | ||
| // Assert that this is equal to sk_bytes before deletion |
There was a problem hiding this comment.
Prefer adding period (.) on every comment
No description provided.