@@ -5842,12 +5842,20 @@ internally — `digest` is expected to be a pre-computed hash digest.
58425842The interpretation of ` algorithm ` and ` digest ` depends on the key type:
58435843
58445844* RSA, ECDSA, DSA: ` algorithm ` identifies the hash function used to create
5845- ` digest ` .
5846- * Ed25519, Ed448: ` algorithm ` must be ` null ` or ` undefined ` . ` digest ` must
5845+ ` digest ` . The resulting signatures are compatible with [ ` crypto.verify() ` ] [ ]
5846+ and signatures produced by [ ` crypto.sign() ` ] [ ] can be verified with
5847+ [ ` crypto.verifyDigest() ` ] [ ] .
5848+ * Ed25519, Ed448: ` algorithm ` must be ` null ` or ` undefined ` . These keys
5849+ use the Ed25519ph and Ed448ph prehash variants respectively. ` digest ` must
58475850 be the output of the appropriate prehash function (SHA-512 for Ed25519ph,
5848- SHAKE256 with 64-byte output for Ed448ph).
5851+ SHAKE256 with 64-byte output for Ed448ph). The resulting signatures are
5852+ not compatible with [ ` crypto.sign() ` ] [ ] or [ ` crypto.verify() ` ] [ ] because
5853+ those use the non-prehash Ed25519/Ed448 variants which have different domain
5854+ separation.
58495855* ML-DSA: ` algorithm ` must be ` null ` or ` undefined ` . ` digest ` must be the
5850- 64-byte external mu value per FIPS 204.
5856+ 64-byte external mu value per FIPS 204. The resulting signatures are
5857+ compatible with [ ` crypto.verify() ` ] [ ] when the mu value is correctly computed
5858+ from the message per FIPS 204.
58515859
58525860If ` key ` is not a [ ` KeyObject ` ] [ ] , this function behaves as if ` key ` had been
58535861passed to [ ` crypto.createPrivateKey() ` ] [ ] . If it is an object, the following
@@ -6043,12 +6051,20 @@ internally — `digest` is expected to be a pre-computed hash digest.
60436051The interpretation of ` algorithm ` and ` digest ` depends on the key type:
60446052
60456053* RSA, ECDSA, DSA: ` algorithm ` identifies the hash function used to create
6046- ` digest ` .
6047- * Ed25519, Ed448: ` algorithm ` must be ` null ` or ` undefined ` . ` digest ` must
6054+ ` digest ` . Signatures produced by [ ` crypto.sign() ` ] [ ] can be verified with
6055+ this function, and signatures produced by [ ` crypto.signDigest() ` ] [ ] can be
6056+ verified with [ ` crypto.verify() ` ] [ ] .
6057+ * Ed25519, Ed448: ` algorithm ` must be ` null ` or ` undefined ` . These keys
6058+ use the Ed25519ph and Ed448ph prehash variants respectively. ` digest ` must
60486059 be the output of the appropriate prehash function (SHA-512 for Ed25519ph,
6049- SHAKE256 with 64-byte output for Ed448ph).
6060+ SHAKE256 with 64-byte output for Ed448ph). The resulting signatures are
6061+ not compatible with [ ` crypto.sign() ` ] [ ] or [ ` crypto.verify() ` ] [ ] because
6062+ those use the non-prehash Ed25519/Ed448 variants which have different domain
6063+ separation.
60506064* ML-DSA: ` algorithm ` must be ` null ` or ` undefined ` . ` digest ` must be the
6051- 64-byte external mu value per FIPS 204.
6065+ 64-byte external mu value per FIPS 204. Signatures produced by
6066+ [ ` crypto.sign() ` ] [ ] can be verified with this function when the mu value is
6067+ correctly computed from the message per FIPS 204.
60526068
60536069If ` key ` is not a [ ` KeyObject ` ] [ ] , this function behaves as if ` key ` had been
60546070passed to [ ` crypto.createPublicKey() ` ] [ ] . If it is an object, the following
@@ -6705,7 +6721,9 @@ See the [list of SSL OP Flags][] for details.
67056721[ `crypto.randomBytes()` ] : #cryptorandombytessize-callback
67066722[ `crypto.randomFill()` ] : #cryptorandomfillbuffer-offset-size-callback
67076723[ `crypto.sign()` ] : #cryptosignalgorithm-data-key-callback
6724+ [ `crypto.signDigest()` ] : #cryptosigndigestalgorithm-digest-key-callback
67086725[ `crypto.verify()` ] : #cryptoverifyalgorithm-data-key-signature-callback
6726+ [ `crypto.verifyDigest()` ] : #cryptoverifydigestalgorithm-digest-key-signature-callback
67096727[ `crypto.webcrypto.getRandomValues()` ] : webcrypto.md#cryptogetrandomvaluestypedarray
67106728[ `crypto.webcrypto.subtle` ] : webcrypto.md#class-subtlecrypto
67116729[ `decipher.final()` ] : #decipherfinaloutputencoding
0 commit comments