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

sha3.Shake128 with abstract.NoKey NOT random #70

Closed
nikkolasg opened this issue Jun 8, 2016 · 1 comment
Closed

sha3.Shake128 with abstract.NoKey NOT random #70

nikkolasg opened this issue Jun 8, 2016 · 1 comment
Labels

Comments

@nikkolasg
Copy link
Collaborator

Found a unusual behavior when debugging edwards/ed25519 suites:
If you create a rand := cipher.Stream from those suites (using sha3.Shake128), and then retrieve a slice of bytes from it using random.Bytes(32,rand), the slice of bytes are always zero the first 6 times. Having discussed with @Daeinar , it may be related to the size of the state of sha3.Shake128 but as I'm really not familiar with those sponge cipher (yet!), I can't say.
It's definitely not a correct behavior as every output should look completely random whatever the input is.
This faulty behavior is kinda hidden in nist.Int.Pick(rand) where this function calls random.Int which iterates as long as the number returned fulfills n != 0.

@jeffallen
Copy link
Contributor

This is no longer an issue since XOF replaced Cipher.

ineiti added a commit that referenced this issue Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants