lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Loading...
Searching...
No Matches
lime::ARsKey< Algo, true > Struct Template Reference

#include <lime_double_ratchet.hpp>

Public Types

using serializedBuffer
using serializedPublicBuffer

Public Member Functions

 ARsKey (const Xpair< typename Algo::EC > &ecDHs, const Kpair< typename Algo::KEM > &kemDHs, const K< typename Algo::KEM, lime::Ktype::cipherText > &kemCTs)
 ARsKey (const SignedPreKey< Algo > &SPk)
 ARsKey (const Xpair< typename Algo::EC > &ecDHs, const Kpair< typename Algo::KEM > &kemDHs)
 ARsKey (const X< typename Algo::EC, lime::Xtype::publicKey > &ECPublic, const X< typename Algo::EC, lime::Xtype::privateKey > &ECPrivate, const K< typename Algo::KEM, lime::Ktype::publicKey > &KEMPublic, const K< typename Algo::KEM, lime::Ktype::privateKey > &KEMPrivate, const K< typename Algo::KEM, lime::Ktype::cipherText > &KEMCT)
 ARsKey ()
 ARsKey (const serializedBuffer &DHs)
void setEC (const X< typename Algo::EC, lime::Xtype::publicKey > &ECPublic, const X< typename Algo::EC, lime::Xtype::privateKey > &ECPrivate)
 Set Ec key pair only: used to update this part without touching the KEM one.
X< typename Algo::EC, lime::Xtype::privateKey > & ECPrivateKey (void)
const X< typename Algo::EC, lime::Xtype::publicKey > & ECPublicKey (void) const
K< typename Algo::KEM, lime::Ktype::privateKey > & KEMPrivateKey (void)
const K< typename Algo::KEM, lime::Ktype::publicKey > & KEMPublicKey (void) const
K< typename Algo::KEM, lime::Ktype::cipherText > & KEMCipherText (void)
serializedBuffer serialize (void) const
 Serialize the key pair (to store in DB): First the public value, then the private one, then the cipherText.
std::vector< uint8_t > serializePublic (void) const
 Serialize the public part only to insert in the DR message header: EC public || KEM public || KEM ciphertext.
std::vector< uint8_t > serializeECPublic (void) const
 Serialize the EC public part only to insert in the DR message header when we avoid sending the KEM part.
std::vector< uint8_t > getKEMIndex (void) const
 Index is a hash of KEM public key/Cipher Text to identify it without sending/storing it all.

Static Public Member Functions

static constexpr size_t serializedSize (void)
static constexpr size_t serializedPublicSize (void)

Member Typedef Documentation

◆ serializedBuffer

template<typename Algo>
using lime::ARsKey< Algo, true >::serializedBuffer
Initial value:
static constexpr size_t ssize(void)
provide a static size function to be able to call the function not on an object
Definition lime_crypto_primitives.hpp:105
static constexpr size_t ssize(void)
provide a static size function to be able to call the function not on an object
Definition lime_crypto_primitives.hpp:59
auto clean fixed size buffer(std::array based)
Definition lime_crypto_primitives.hpp:42

◆ serializedPublicBuffer

template<typename Algo>
using lime::ARsKey< Algo, true >::serializedPublicBuffer

Constructor & Destructor Documentation

◆ ARsKey() [1/6]

template<typename Algo>
lime::ARsKey< Algo, true >::ARsKey ( const Xpair< typename Algo::EC > & ecDHs,
const Kpair< typename Algo::KEM > & kemDHs,
const K< typename Algo::KEM, lime::Ktype::cipherText > & kemCTs )
inline

◆ ARsKey() [2/6]

template<typename Algo>
lime::ARsKey< Algo, true >::ARsKey ( const SignedPreKey< Algo > & SPk)
inline

◆ ARsKey() [3/6]

template<typename Algo>
lime::ARsKey< Algo, true >::ARsKey ( const Xpair< typename Algo::EC > & ecDHs,
const Kpair< typename Algo::KEM > & kemDHs )
inline

◆ ARsKey() [4/6]

template<typename Algo>
lime::ARsKey< Algo, true >::ARsKey ( const X< typename Algo::EC, lime::Xtype::publicKey > & ECPublic,
const X< typename Algo::EC, lime::Xtype::privateKey > & ECPrivate,
const K< typename Algo::KEM, lime::Ktype::publicKey > & KEMPublic,
const K< typename Algo::KEM, lime::Ktype::privateKey > & KEMPrivate,
const K< typename Algo::KEM, lime::Ktype::cipherText > & KEMCT )
inline

◆ ARsKey() [5/6]

template<typename Algo>
lime::ARsKey< Algo, true >::ARsKey ( )
inline

◆ ARsKey() [6/6]

template<typename Algo>
lime::ARsKey< Algo, true >::ARsKey ( const serializedBuffer & DHs)
inline

Member Function Documentation

◆ ECPrivateKey()

template<typename Algo>
X< typename Algo::EC, lime::Xtype::privateKey > & lime::ARsKey< Algo, true >::ECPrivateKey ( void )
inline

◆ ECPublicKey()

template<typename Algo>
const X< typename Algo::EC, lime::Xtype::publicKey > & lime::ARsKey< Algo, true >::ECPublicKey ( void ) const
inline

◆ getKEMIndex()

template<typename Algo>
std::vector< uint8_t > lime::ARsKey< Algo, true >::getKEMIndex ( void ) const
inline

Index is a hash of KEM public key/Cipher Text to identify it without sending/storing it all.

◆ KEMCipherText()

template<typename Algo>
K< typename Algo::KEM, lime::Ktype::cipherText > & lime::ARsKey< Algo, true >::KEMCipherText ( void )
inline

◆ KEMPrivateKey()

template<typename Algo>
K< typename Algo::KEM, lime::Ktype::privateKey > & lime::ARsKey< Algo, true >::KEMPrivateKey ( void )
inline

◆ KEMPublicKey()

template<typename Algo>
const K< typename Algo::KEM, lime::Ktype::publicKey > & lime::ARsKey< Algo, true >::KEMPublicKey ( void ) const
inline

◆ serialize()

template<typename Algo>
serializedBuffer lime::ARsKey< Algo, true >::serialize ( void ) const
inline

Serialize the key pair (to store in DB): First the public value, then the private one, then the cipherText.

◆ serializedPublicSize()

template<typename Algo>
constexpr size_t lime::ARsKey< Algo, true >::serializedPublicSize ( void )
inlinestaticconstexpr

◆ serializedSize()

template<typename Algo>
constexpr size_t lime::ARsKey< Algo, true >::serializedSize ( void )
inlinestaticconstexpr

◆ serializeECPublic()

template<typename Algo>
std::vector< uint8_t > lime::ARsKey< Algo, true >::serializeECPublic ( void ) const
inline

Serialize the EC public part only to insert in the DR message header when we avoid sending the KEM part.

◆ serializePublic()

template<typename Algo>
std::vector< uint8_t > lime::ARsKey< Algo, true >::serializePublic ( void ) const
inline

Serialize the public part only to insert in the DR message header: EC public || KEM public || KEM ciphertext.

◆ setEC()

template<typename Algo>
void lime::ARsKey< Algo, true >::setEC ( const X< typename Algo::EC, lime::Xtype::publicKey > & ECPublic,
const X< typename Algo::EC, lime::Xtype::privateKey > & ECPrivate )
inline

Set Ec key pair only: used to update this part without touching the KEM one.


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