crypto: verify empty KMAC outputs · nodejs/node@ceeb371 · GitHub
Skip to content

Commit ceeb371

Browse files
panvaaduh95
authored andcommitted
crypto: verify empty KMAC outputs
Compare empty KMAC outputs with empty signatures as equal, as required by the verification algorithm. Skip CRYPTO_memcmp for zero-length buffers while retaining the constant-time comparison for other MACs. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #66237 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh>
1 parent c6bbc1b commit ceeb371

2 files changed

Lines changed: 46 additions & 3 deletions

File tree

‎src/crypto/crypto_kmac.cc‎

Lines changed: 4 additions & 3 deletions
Lines changed: 42 additions & 0 deletions

0 commit comments

Comments
 (0)