Contents

init(seedRepresentation:publicKey:)

Initializes a private key from the seed representation.

Declaration

init<D>(seedRepresentation: D, publicKey: MLDSA87.PublicKey?) throws where D : DataProtocol

Parameters

  • 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.

See Also

Creating a private key