init(seedRepresentation:publicKey:)
Initializes a private key from the seed representation.
Declaration
init<D>(seedRepresentation: D, publicKey: MLDSA65.PublicKey?) throws where D : DataProtocolParameters
- seedRepresentation:
The seed representation of the private key. This parameter needs to be 32 bytes long.
- publicKey:
The public key associated with the secret key.
Discussion
This initializer implements the ML-DSA.KeyGen_internal algorithm (Algorithm 16) of FIPS 204.
If a public key is provided, a consistency check is performed between it and the derived public key.