Documentation ¶
Overview ¶
Package mldsa_eddsa implements hybrid ML-DSA + EdDSA encryption, suitable for OpenPGP, experimental. It follows the specs https://www.ietf.org/archive/id/draft-ietf-openpgp-pqc-05.html#name-composite-signature-schemes
Index ¶
Constants ¶
const (
MlDsaSeedLen = 32
)
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
func Sign(priv *PrivateKey, message []byte) (dSig, ecSig []byte, err error)
Sign generates a ML-DSA + EdDSA composite signature as specified in https://www.ietf.org/archive/id/draft-ietf-openpgp-pqc-05.html#name-signature-generation
func Validate ¶
func Validate(priv *PrivateKey) (err error)
Validate checks that the public key corresponds to the private key
Types ¶
type PrivateKey ¶
type PrivateKey struct { PublicKey SecretEc []byte SecretMldsa sign.PrivateKey SecretMldsaSeed []byte }
func GenerateKey ¶
func GenerateKey(rand io.Reader, algId uint8, c ecc.EdDSACurve, d sign.Scheme) (priv *PrivateKey, err error)
GenerateKey generates a ML-DSA + EdDSA composite key as specified in https://www.ietf.org/archive/id/draft-ietf-openpgp-pqc-05.html#name-key-generation-procedure-2
func (*PrivateKey) DeriveMlDsaKeys ¶
func (priv *PrivateKey) DeriveMlDsaKeys(seed []byte, overridePublicKey bool) (err error)
DeriveMlDsaKeys derives the ML-DSA keys from the provided seed and stores them inside priv.