| author | |
| committer | |
| log | feb806a212355956a33cc843a6d593741b93c5ec |
| tree | 55577e257e02bbf07a4afa251110d61cd09b347f |
| parent | 02e1facc72fa9cb8e4793ecf114fdd61ea8df6bd |
| signature |
If the noise parameter was null, we didn't use any noise at all.
We unconditionally generated random noise (`noise2`) but didn't use it.
Spotted by @cryptocode, thanks!1 files changed, 1 insertions(+), 0 deletions(-)
lib/std/crypto/25519/ed25519.zig+1| ... | ... | @@ -318,6 +318,7 @@ pub const Ed25519 = struct { |
| 318 | 318 | h.update(&scalar_and_prefix.prefix); |
| 319 | 319 | var noise2: [noise_length]u8 = undefined; |
| 320 | 320 | crypto.random.bytes(&noise2); |
| 321 | h.update(&noise2); | |
| 321 | 322 | if (noise) |*z| { |
| 322 | 323 | h.update(z); |
| 323 | 324 | } |