Skip to content

crypto: make crypto.sign() support poly1305 mac

Rodrigo Muino Tomonari requested to merge github/fork/bnoordhuis/fix32433 into main

Fixes: https://github.com/nodejs/node/issues/32433

@nodejs/crypto this needs input on design decisions.

  1. What should the "create raw private key" API look like?

  2. Is crypto.sign() the right place?

crypto.createSign() doesn't feel right because you need to provide the key upfront rather than at sign.sign() time.

You also can't just substitute EVP_DigestInit_ex() with EVP_DigestSignInit().

crypto.createHmac() doesn't feel right either because poly1305 is a MAC, not a HMAC.

Merge request reports

Loading