Skip to content
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

Open
wants to merge 3 commits into
base: tbz/review-policy-spec
Choose a base branch
from

Conversation

tbrezot
Copy link
Collaborator

@tbrezot tbrezot commented Feb 12, 2025

No description provided.

Base automatically changed from fix/hash-T to tbz/review-policy-spec February 12, 2025 17:08
) -> ([u8; TAG_LENGTH], Secret<SHARED_SECRET_LENGTH>) {
let mut hasher = Sha3::v384();
let mut bytes = [0; 48];
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

@@ -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];
Copy link
Contributor

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)

Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants