init(recipientKey:ciphersuite:info:authenticatedBy:)
Creates a sender in authentication mode.
Declaration
init<SK>(recipientKey: SK.PublicKey, ciphersuite: HPKE.Ciphersuite, info: Data, authenticatedBy authenticationKey: SK) throws where SK : HPKEDiffieHellmanPrivateKeyParameters
- recipientKey:
The recipient’s public key for encrypting the messages.
- ciphersuite:
The cipher suite that defines the cryptographic algorithms to use.
- info:
Data that the key derivation function uses to compute the symmetric key material. The sender and the recipient need to use the same
infodata. - authenticationKey:
The sender’s private key for generating the HMAC.
Discussion
The Sender encrypts messages in authentication mode with a symmetric encryption key. Messages also include authentication data so that the recipient can verify the authenticity of the sender’s private key.