| author | |
| committer | |
| log | ee8af8cffb42603ead90db6a3d7b7df9f2b2a683 |
| tree | c5bfd7c92ff25cb494b3cf56d8e2d9e3902937ad |
| parent | 3ee5cf627fbf2e5e006535b25d48e070b4442ce8 |
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 | } |