proxygen
fizz::KeyExchange Class Referenceabstract

#include <KeyExchange.h>

Inheritance diagram for fizz::KeyExchange:
fizz::MockKeyExchange fizz::OpenSSLKeyExchange< T > fizz::X25519KeyExchange

Public Member Functions

virtual ~KeyExchange ()=default
 
virtual void generateKeyPair ()=0
 
virtual std::unique_ptr< folly::IOBufgetKeyShare () const =0
 
virtual std::unique_ptr< folly::IOBufgenerateSharedSecret (folly::ByteRange keyShare) const =0
 

Detailed Description

Interface for key exchange algorithms.

Definition at line 19 of file KeyExchange.h.

Constructor & Destructor Documentation

virtual fizz::KeyExchange::~KeyExchange ( )
virtualdefault

Member Function Documentation

virtual void fizz::KeyExchange::generateKeyPair ( )
pure virtual

Generates an ephemeral key pair.

Implemented in fizz::OpenSSLKeyExchange< T >, and fizz::X25519KeyExchange.

virtual std::unique_ptr<folly::IOBuf> fizz::KeyExchange::generateSharedSecret ( folly::ByteRange  keyShare) const
pure virtual

Generate a shared secret with our key pair and a peer's public key share.

Performs all necessary validation of the public key share and throws on error.

generateKeyPair() must be called before.

Implemented in fizz::OpenSSLKeyExchange< T >, and fizz::X25519KeyExchange.

Referenced by fizz::sm::negotiatePsk().

virtual std::unique_ptr<folly::IOBuf> fizz::KeyExchange::getKeyShare ( ) const
pure virtual

Returns the public key to share with peers.

generateKeyPair() must be called before.

Implemented in fizz::OpenSSLKeyExchange< T >, and fizz::X25519KeyExchange.


The documentation for this class was generated from the following file: