Proposal Details
In the crypto/mldsa package (go 1.27), PrivateKey.Sign accepts crypto.SignerOpts. It allows signing an external μ message by checking opts.HashFunc() == crypto.MLDSAMu:
func (sk *PrivateKey) Sign(_ io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) {
// ...
switch opts.HashFunc() {
case 0:
// ... directly-signed message
case crypto.MLDSAMu:
return mldsa.SignExternalMu(&sk.k, message)
default:
return nil, errInvalidSignerOpts
}
}
However, the public Verify API only accepts *Options instead of an interface like crypto.SignerOpts or a mechanism to support crypto.MLDSAMu.
func Verify(pk *PublicKey, message []byte, signature []byte, opts *Options) error {
// ...
return mldsa.Verify(&pk.p, message, signature, opts.Context)
}
Because Verify only passes opts.Context into the internal mldsa.Verify, there is currently no way to verify a signature that was generated using crypto.MLDSAMu. The underlying mldsa.VerifyExternalMu functionality is completely trapped and unexported to consumers of the public crypto/mldsa package.
Proposal:
Change the opts parameter of Verify to support crypto.MLDSAMu, or export a dedicated VerifyExternalMu function.
Proposal Details
In the
crypto/mldsapackage (go 1.27),PrivateKey.Signacceptscrypto.SignerOpts. It allows signing an external μ message by checkingopts.HashFunc() == crypto.MLDSAMu:However, the public
VerifyAPI only accepts*Optionsinstead of an interface likecrypto.SignerOptsor a mechanism to supportcrypto.MLDSAMu.Because
Verifyonly passesopts.Contextinto the internalmldsa.Verify, there is currently no way to verify a signature that was generated usingcrypto.MLDSAMu. The underlyingmldsa.VerifyExternalMufunctionality is completely trapped and unexported to consumers of the publiccrypto/mldsapackage.Proposal:
Change the
optsparameter ofVerifyto supportcrypto.MLDSAMu, or export a dedicatedVerifyExternalMufunction.