Contents

encapsulate()

Generates and encapsulates a shared secret.

Declaration

func encapsulate() throws -> KEM.EncapsulationResult

Return Value

The shared secret, and its encapsulated version.

Discussion

Share the encapsulated secret with the person who has the KEMPrivateKey. They use decapsulate(_:) to recover the shared secret.