KeyExchange
public protocol KeyExchange
Cryptographically secure key exchange
-
Generate a random key pair for key exchange with peer
Declaration
Swift
func keyPair() -> (KeyExchangePrivateKey, KeyExchangePublicKey)?
-
Generate shared key by combining own private key and peer public key
Declaration
Swift
func sharedKey(own: KeyExchangePrivateKey, peer: KeyExchangePublicKey) -> KeyExchangeSharedKey?