lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Loading...
Searching...
No Matches
lime::KEM< Algo > Class Template Referenceabstract

Key Encapsulation Mechanism interface. More...

#include <lime_crypto_primitives.hpp>

Public Member Functions

virtual void createKeyPair (Kpair< Algo > &keyPair)=0
 generate a new random key pair
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.
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
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

◆ ~KEM()

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

Member Function Documentation

◆ createKeyPair()

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

◆ decaps()

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

◆ encaps()

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: