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

Strange logic in kerl_squeeze #20

Open
AuntieWhispers opened this issue Mar 6, 2020 · 0 comments
Open

Strange logic in kerl_squeeze #20

AuntieWhispers opened this issue Mar 6, 2020 · 0 comments

Comments

@AuntieWhispers
Copy link

kerl_squeeze function produces trits in chunks by HASH_LENGTH_TRIT. The code here looks suspicious.

First, it reinitializes keccak state and absorbs (inverted) bits that have just been squeezed. This makes the next HASH_LENGTH_TRIT output trits completely dependent on the previous ones (but not the secret state maintained by keccak state). This may potentially reduce security of the hash/tag/key produced.

Second, if the length of the output is HASH_LENGTH_TRIT then the lines mentioned just waste computational resources without producing any result, unless the new state is going to be used later. But in that case security may be compromised due to the first note above.

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

No branches or pull requests

1 participant