lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Public Member Functions | List of all members
lime::KEM< Algo > Class Template Referenceabstract

Key Encapsulation Mechanism interface. More...

Public Member Functions

virtual void createKeyPair (Kpair< Algo > &keyPair)=0
 generate a new random key pair More...
 
virtual void encaps (const K< Algo, lime::Ktype::publicKey > &publicKey, K< Algo, lime::Ktype::cipherText > &cipherText, K< Algo, lime::Ktype::sharedSecret > &sharedSecret)=0
 Generate and encapsulate a shared secret for a given public key. More...
 
virtual void decaps (const K< Algo, lime::Ktype::privateKey > &privateKey, const K< Algo, lime::Ktype::cipherText > &cipherText, K< Algo, lime::Ktype::sharedSecret > &sharedSecret)=0
 decapsulate a shared secret from a cipher text using a private key More...
 
virtual ~KEM ()=default
 

Detailed Description

template<typename Algo>
class lime::KEM< Algo >

Key Encapsulation Mechanism interface.

shall be able to provide an interface to any algorithm implementing KEM (with PQ or not)

Constructor & Destructor Documentation

template<typename Algo >
virtual lime::KEM< Algo >::~KEM ( )
virtualdefault

Member Function Documentation

template<typename Algo >
virtual void lime::KEM< Algo >::createKeyPair ( Kpair< Algo > &  keyPair)
pure virtual

generate a new random key pair

Parameters
[out]keyPairThe key pair generated
template<typename Algo >
virtual void lime::KEM< Algo >::decaps ( const K< Algo, lime::Ktype::privateKey > &  privateKey,
const K< Algo, lime::Ktype::cipherText > &  cipherText,
K< Algo, lime::Ktype::sharedSecret > &  sharedSecret 
)
pure virtual

decapsulate a shared secret from a cipher text using a private key

Parameters
[in]privateKeyThe private key used to decapsulate
[in]cipherTextThe cipher text
[out]sharedSecretThe retrieved shared secret
template<typename Algo >
virtual void lime::KEM< Algo >::encaps ( const K< Algo, lime::Ktype::publicKey > &  publicKey,
K< Algo, lime::Ktype::cipherText > &  cipherText,
K< Algo, lime::Ktype::sharedSecret > &  sharedSecret 
)
pure virtual

Generate and encapsulate a shared secret for a given public key.

Parameters
[in]publicKeyThe public to encapsulate for
[out]cipherTextThe cipher text generated
[out]sharedSecretThe shared secret generated

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