You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 usingrandom.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 callsrandom.Int
which iterates as long as the number returned fulfillsn != 0
.The text was updated successfully, but these errors were encountered: