-
Notifications
You must be signed in to change notification settings - Fork 1
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
replace Shake with the appropriate SHA3 functions #148
base: tbz/review-policy-spec
Are you sure you want to change the base?
Conversation
src/core/primitives.rs
Outdated
) -> ([u8; TAG_LENGTH], Secret<SHARED_SECRET_LENGTH>) { | ||
let mut hasher = Sha3::v384(); | ||
let mut bytes = [0; 48]; |
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.
Is there any existing constant in tiny-keccak
for this?
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.
No such thing exists, 48 is just 384/8.
src/core/primitives.rs
Outdated
@@ -103,37 +103,44 @@ fn verify(msk: &MasterSecretKey, usk: &UserSecretKey) -> Result<(), Error> { | |||
|
|||
fn G_hash(seed: &Secret<SHARED_SECRET_LENGTH>) -> Result<Scalar, Error> { | |||
let mut bytes = [0; 64]; |
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.
Is there any existing constant in tiny-keccak
for this? (or discard this comment if this is purely internal)
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.
Good catch, 64 is not 256 / 8. Corrected in 18534ae.
No description provided.