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

Holds everything found in a key bundle received from X3DH server. More...

#include <lime_x3dh_protocol.hpp>

Public Member Functions

 X3DH_peerBundle (std::string &&deviceId, const std::vector< uint8_t >::const_iterator bundle, bool haveOPk, std::ostringstream &message_trace)
 X3DH_peerBundle (std::string &&deviceId)

Static Public Member Functions

static constexpr size_t ssize (bool haveOPk)

Public Attributes

const std::string deviceId
const DSA< typename Curve::EC, lime::DSAtype::publicKey > Ik
const SignedPreKey< Curve > SPk
OneTimePreKey< Curve > OPk
const lime::X3DHKeyBundleFlag bundleFlag

Detailed Description

template<typename Curve>
struct lime::X3DH_peerBundle< Curve >

Holds everything found in a key bundle received from X3DH server.

Constructor & Destructor Documentation

◆ X3DH_peerBundle() [1/2]

template<typename Curve>
lime::X3DH_peerBundle< Curve >::X3DH_peerBundle ( std::string && deviceId,
const std::vector< uint8_t >::const_iterator bundle,
bool haveOPk,
std::ostringstream & message_trace )
inline

Constructor gets vector<uint8_t> iterators to the bundle begining

Parameters
[in]deviceIdpeer Device Id providing this key bundle
[in]bundleiterator pointing to the begining of the key bundle - Ik begin
[in]haveOPktrue when there is an OPk to parse
[in/out]message_trace Debug information to accumulate

◆ X3DH_peerBundle() [2/2]

template<typename Curve>
lime::X3DH_peerBundle< Curve >::X3DH_peerBundle ( std::string && deviceId)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. construct without bundle when not present in the parsed server response

Member Function Documentation

◆ ssize()

template<typename Curve>
constexpr size_t lime::X3DH_peerBundle< Curve >::ssize ( bool haveOPk)
inlinestaticconstexpr

Member Data Documentation

◆ bundleFlag

template<typename Curve>
const lime::X3DHKeyBundleFlag lime::X3DH_peerBundle< Curve >::bundleFlag

Flag this bundle as empty and if not if it holds an OPk, possible values : noOPk, OPk, noBundle

◆ deviceId

template<typename Curve>
const std::string lime::X3DH_peerBundle< Curve >::deviceId

peer device Id

◆ Ik

template<typename Curve>
const DSA<typename Curve::EC, lime::DSAtype::publicKey> lime::X3DH_peerBundle< Curve >::Ik

peer device public identity key

◆ OPk

template<typename Curve>
OneTimePreKey<Curve> lime::X3DH_peerBundle< Curve >::OPk

peer device One Time preKey

◆ SPk

template<typename Curve>
const SignedPreKey<Curve> lime::X3DH_peerBundle< Curve >::SPk

peer device current public pre-signed key


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