Structure
MLDSA.PrivateKey
A struct representing a private key used in MLDSA (Module-Lattice-Based Digital Signature Algorithm).
struct PrivateKey<KeyType> where KeyType : MLDSAType
Overview
MLDSA private keys are used to sign tokens. The parameter set the key belongs to is expressed by the MLDSA.PrivateKey.MLDSAType generic parameter, so a key is written as, for example, MLDSA.PrivateKey<MLDSA87>. The MLDSA65PrivateKey and MLDSA87PrivateKey typealiases are provided as a shorthand.
Topics
Initializers
init(backing: some MLDSAPrivateKey)Creates anMLDSA.PrivateKeyinstance using the provided private key.init(seedRepresentation: some DataProtocol, publicKey: KeyType.PrivateKey.PublicKey?) throwsCreates anMLDSA.PrivateKeyinstance using the seed it is derived from.
Instance Properties
var publicKey: MLDSA.PublicKey<KeyType>The public key associated with this private key.
Type Aliases
typealias MLDSATypeThe MLDSA parameter set this key belongs to.
Relationships
Conforms To
MLDSAKeySwift.SendableSwift.SendableMetatype