19#ifndef lime_double_ratchet_hpp
20#define lime_double_ratchet_hpp
24#include <unordered_map>
42 using SharedADBuffer = std::array<uint8_t, lime::settings::DRSessionSharedADSize>;
45 template <
typename Curve,
bool = std::is_base_of_v<genericKEM, Curve>>
49 template <
typename Curve>
56 using serializedBuffer = std::array<uint8_t, X<Curve, lime::Xtype::publicKey>::ssize()>;
75 template <
typename Algo>
102 ARrKey() : m_ec_DHr{}, m_kem_DHr{}, m_kem_CTr{} {};
113 std::vector<uint8_t> serializedKEM(m_kem_DHr.cbegin(), m_kem_DHr.cend());
114 serializedKEM.insert(serializedKEM.end(), m_kem_CTr.cbegin(), m_kem_CTr.cend());
125 index.insert(index.end(), KEMIndex.cbegin(), KEMIndex.cend());
130 std::copy_n(m_ec_DHr.cbegin(), m_ec_DHr.size(), s.begin());
131 std::copy_n(m_kem_DHr.cbegin(), m_kem_DHr.size(), s.begin() + m_ec_DHr.size());
132 std::copy_n(m_kem_CTr.cbegin(), m_kem_CTr.size(), s.begin() + m_ec_DHr.size() + m_kem_DHr.size());
138 template <
typename Curve,
bool = std::is_base_of_v<genericKEM, Curve>>
142 template <
typename Curve>
153 m_DHs.publicKey() = SPk.cpublicKey();
154 m_DHs.privateKey() = SPk.cprivateKey();
157 m_DHs.publicKey() = DHsPublic;
158 m_DHs.privateKey() = DHsPrivate;
177 std::vector<uint8_t>
serializePublic(
void)
const {
return std::vector<uint8_t>(m_DHs.cpublicKey().cbegin(), m_DHs.cpublicKey().cend());}
181 template <
typename Algo>
216 ARsKey() : m_ec_DHs{}, m_kem_DHs{}, m_kem_CTs{} {};
243 std::copy_n(m_ec_DHs.cpublicKey().cbegin(), m_ec_DHs.cpublicKey().size(), s.begin());
245 std::copy_n(m_ec_DHs.cprivateKey().cbegin(), m_ec_DHs.cprivateKey().size(), s.begin()+index);
247 std::copy_n(m_kem_DHs.cpublicKey().cbegin(), m_kem_DHs.cpublicKey().size(), s.begin()+index);
249 std::copy_n(m_kem_DHs.cprivateKey().cbegin(), m_kem_DHs.cprivateKey().size(), s.begin()+index);
251 std::copy_n(m_kem_CTs.cbegin(), m_kem_CTs.size(), s.begin()+index);
256 std::vector<uint8_t> v(m_ec_DHs.cpublicKey().cbegin(), m_ec_DHs.cpublicKey().cend());
257 v.insert(v.end(), m_kem_DHs.cpublicKey().cbegin(), m_kem_DHs.cpublicKey().cend());
258 v.insert(v.end(), m_kem_CTs.cbegin(), m_kem_CTs.cend());
263 return std::vector<uint8_t>(m_ec_DHs.cpublicKey().cbegin(), m_ec_DHs.cpublicKey().cend());
268 std::vector serializedKEM (m_kem_DHs.cpublicKey().cbegin(), m_kem_DHs.cpublicKey().cend());
269 serializedKEM.insert(serializedKEM.end(), m_kem_CTs.cbegin(), m_kem_CTs.cend());
282 template <
typename Curve>
290 ARKeys(
bool valid=
false) : m_DHr{}, m_DHr_valid{valid}, m_DHs{} {};
313 virtual void ratchetEncrypt(
const std::vector<uint8_t> &plaintext, std::vector<uint8_t> &&AD, std::vector<uint8_t> &ciphertext,
const bool payloadDirectEncryption) = 0;
314 virtual bool ratchetDecrypt(
const std::vector<uint8_t> &
cipherText,
const std::vector<uint8_t> &AD, std::vector<uint8_t> &plaintext,
const bool payloadDirectEncryption) = 0;
321 template <
typename Algo> std::shared_ptr<DR>
make_DR_from_localStorage(std::shared_ptr<lime::Db> localStorage,
long sessionId, std::shared_ptr<RNG> RNG_context);
322 template <
typename Algo> std::shared_ptr<DR>
make_DR_for_sender(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARrKey<Algo> &peerPublicKey,
long int peerDid,
const std::string &peerDeviceId,
const DSA<typename Algo::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDid,
const std::vector<uint8_t> &X3DH_initMessage, std::shared_ptr<RNG> RNG_context);
323 template <
typename Algo> std::shared_ptr<DR>
make_DR_for_receiver(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARsKey<Algo> &selfKeyPair,
long int peerDid,
const std::string &peerDeviceId,
const uint32_t OPk_id,
const DSA<typename Algo::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDeviceId, std::shared_ptr<RNG> RNG_context);
349 void encryptMessage(std::vector<RecipientInfos>& recipients,
const std::vector<uint8_t>& plaintext,
const std::vector<uint8_t>& recipientUserId,
const std::string& sourceDeviceId, std::vector<uint8_t>&
cipherMessage,
const lime::EncryptionPolicy encryptionPolicy, std::shared_ptr<lime::Db> localStorage,
const std::shared_ptr<limeRandomSeedCallback> randomSeedCallback =
nullptr);
351 std::shared_ptr<DR>
decryptMessage(
const std::string& sourceDeviceId,
const std::string& recipientDeviceId,
const std::vector<uint8_t>& recipientUserId, std::vector<std::shared_ptr<DR>>& DRSessions,
const std::vector<uint8_t>& DRmessage,
const std::vector<uint8_t>&
cipherMessage, std::vector<uint8_t>& plaintext);
354#ifdef EC25519_ENABLED
355 extern template std::shared_ptr<DR>
make_DR_from_localStorage<C255>(std::shared_ptr<lime::Db> localStorage,
long sessionId, std::shared_ptr<RNG> RNG_context);
356 extern template std::shared_ptr<DR>
make_DR_for_sender(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARrKey<C255> &peerPublicKey,
long int peerDid,
const std::string &peerDeviceId,
const DSA<C255::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDid,
const std::vector<uint8_t> &X3DH_initMessage, std::shared_ptr<RNG> RNG_context);
357 extern template std::shared_ptr<DR>
make_DR_for_receiver(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARsKey<C255> &selfKeyPair,
long int peerDid,
const std::string &peerDeviceId,
const uint32_t OPk_id,
const DSA<C255::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDeviceId, std::shared_ptr<RNG> RNG_context);
361 extern template std::shared_ptr<DR>
make_DR_from_localStorage<C448>(std::shared_ptr<lime::Db> localStorage,
long sessionId, std::shared_ptr<RNG> RNG_context);
362 extern template std::shared_ptr<DR>
make_DR_for_sender(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARrKey<C448> &peerPublicKey,
long int peerDid,
const std::string &peerDeviceId,
const DSA<C448::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDid,
const std::vector<uint8_t> &X3DH_initMessage, std::shared_ptr<RNG> RNG_context);
363 extern template std::shared_ptr<DR>
make_DR_for_receiver(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARsKey<C448> &selfKeyPair,
long int peerDid,
const std::string &peerDeviceId,
const uint32_t OPk_id,
const DSA<C448::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDeviceId, std::shared_ptr<RNG> RNG_context);
367#ifdef EC25519_ENABLED
369 extern template std::shared_ptr<DR>
make_DR_for_sender(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARrKey<C255K512> &peerPublicKey,
long int peerDid,
const std::string &peerDeviceId,
const DSA<C255K512::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDid,
const std::vector<uint8_t> &X3DH_initMessage, std::shared_ptr<RNG> RNG_context);
370 extern template std::shared_ptr<DR>
make_DR_for_receiver(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARsKey<C255K512> &selfKeyPair,
long int peerDid,
const std::string &peerDeviceId,
const uint32_t OPk_id,
const DSA<C255K512::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDeviceId, std::shared_ptr<RNG> RNG_context);
373 extern template std::shared_ptr<DR>
make_DR_for_sender(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARrKey<C255MLK512> &peerPublicKey,
long int peerDid,
const std::string &peerDeviceId,
const DSA<C255MLK512::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDid,
const std::vector<uint8_t> &X3DH_initMessage, std::shared_ptr<RNG> RNG_context);
374 extern template std::shared_ptr<DR>
make_DR_for_receiver(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARsKey<C255MLK512> &selfKeyPair,
long int peerDid,
const std::string &peerDeviceId,
const uint32_t OPk_id,
const DSA<C255MLK512::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDeviceId, std::shared_ptr<RNG> RNG_context);
378 extern template std::shared_ptr<DR>
make_DR_for_sender(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARrKey<C448MLK1024> &peerPublicKey,
long int peerDid,
const std::string &peerDeviceId,
const DSA<C448MLK1024::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDid,
const std::vector<uint8_t> &X3DH_initMessage, std::shared_ptr<RNG> RNG_context);
379 extern template std::shared_ptr<DR>
make_DR_for_receiver(std::shared_ptr<lime::Db> localStorage,
const DRChainKey &SK,
const SharedADBuffer &AD,
const ARsKey<C448MLK1024> &selfKeyPair,
long int peerDid,
const std::string &peerDeviceId,
const uint32_t OPk_id,
const DSA<C448MLK1024::EC, lime::DSAtype::publicKey> &peerIk,
long int selfDeviceId, std::shared_ptr<RNG> RNG_context);
A virtual class to define the Double Ratchet interface.
Definition lime_double_ratchet.hpp:311
virtual bool isActive(void) const =0
return the current status of session
virtual void ratchetEncrypt(const std::vector< uint8_t > &plaintext, std::vector< uint8_t > &&AD, std::vector< uint8_t > &ciphertext, const bool payloadDirectEncryption)=0
virtual bool ratchetDecrypt(const std::vector< uint8_t > &cipherText, const std::vector< uint8_t > &AD, std::vector< uint8_t > &plaintext, const bool payloadDirectEncryption)=0
virtual long int dbSessionId(void) const =0
return the session's local storage id
Base buffer definition for DSA data structure.
Definition lime_crypto_primitives.hpp:148
Database access class.
Definition lime_localStorage.hpp:34
Base buffer definition for KEM data structure.
Definition lime_crypto_primitives.hpp:102
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
Key pair structure for key exchange algorithm.
Definition lime_crypto_primitives.hpp:120
Base buffer definition for Key Exchange data structure.
Definition lime_crypto_primitives.hpp:56
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
Key pair structure for key exchange algorithm.
Definition lime_crypto_primitives.hpp:74
constexpr size_t DRPkIndexSize
Definition lime_defines.hpp:81
@ cipherText
Definition lime_keys.hpp:43
EncryptionPolicy
Definition lime.hpp:47
@ cipherMessage
Definition lime.hpp:49
void encryptMessage(std::vector< RecipientInfos > &recipients, const std::vector< uint8_t > &plaintext, const std::vector< uint8_t > &recipientUserId, const std::string &sourceDeviceId, std::vector< uint8_t > &cipherMessage, const lime::EncryptionPolicy encryptionPolicy, std::shared_ptr< lime::Db > localStorage, const std::shared_ptr< limeRandomSeedCallback > randomSeedCallback)
Encrypt a message to all recipients, identified by their device id.
Definition lime_double_ratchet.cpp:1589
std::shared_ptr< DR > make_DR_for_receiver(std::shared_ptr< lime::Db > localStorage, const DRChainKey &SK, const SharedADBuffer &AD, const ARsKey< Algo > &selfKeyPair, long int peerDid, const std::string &peerDeviceId, const uint32_t OPk_id, const DSA< typename Algo::EC, lime::DSAtype::publicKey > &peerIk, long int selfDeviceId, std::shared_ptr< RNG > RNG_context)
Definition lime_double_ratchet.cpp:1532
lime::sBuffer< lime::settings::DRChainKeySize > DRChainKey
Definition lime_double_ratchet.hpp:39
std::shared_ptr< DR > make_DR_for_sender(std::shared_ptr< lime::Db > localStorage, const DRChainKey &SK, const SharedADBuffer &AD, const ARrKey< Algo > &peerPublicKey, long int peerDid, const std::string &peerDeviceId, const DSA< typename Algo::EC, lime::DSAtype::publicKey > &peerIk, long int selfDid, const std::vector< uint8_t > &X3DH_initMessage, std::shared_ptr< RNG > RNG_context)
Definition lime_double_ratchet.cpp:1529
std::shared_ptr< DR > make_DR_from_localStorage(std::shared_ptr< lime::Db > localStorage, long sessionId, std::shared_ptr< RNG > RNG_context)
Definition lime_double_ratchet.cpp:1526
std::array< uint8_t, lime::settings::DRSessionSharedADSize > SharedADBuffer
Definition lime_double_ratchet.hpp:42
std::shared_ptr< DR > decryptMessage(const std::string &sourceDeviceId, const std::string &recipientDeviceId, const std::vector< uint8_t > &recipientUserId, std::vector< std::shared_ptr< DR > > &DRSessions, const std::vector< uint8_t > &DRmessage, const std::vector< uint8_t > &cipherMessage, std::vector< uint8_t > &plaintext)
Decrypt a message.
Definition lime_double_ratchet.cpp:1737
void HMAC< SHA512 >(const uint8_t *const key, const size_t keySize, const uint8_t *const input, const size_t inputSize, uint8_t *hash, size_t hashSize)
Definition lime_crypto_primitives.cpp:447
ARKeys(const ARrKey< Curve > &DHr)
Definition lime_double_ratchet.hpp:289
ARrKey< Curve > & getDHr(void)
Definition lime_double_ratchet.hpp:297
void setDHr(const ARrKey< Curve > &DHr)
Definition lime_double_ratchet.hpp:296
const std::vector< uint8_t > serializePublicDHs(void) const
Definition lime_double_ratchet.hpp:305
ARKeys(bool valid=false)
Definition lime_double_ratchet.hpp:290
const ARrKey< Curve >::serializedBuffer serializeDHr(void)
Definition lime_double_ratchet.hpp:299
const ARrKey< Curve > & cgetDHr(void) const
Definition lime_double_ratchet.hpp:298
ARsKey< Curve > & getDHs(void)
Definition lime_double_ratchet.hpp:302
ARKeys(const ARsKey< Curve > &DHs)
Definition lime_double_ratchet.hpp:291
void setValid(bool valid)
Definition lime_double_ratchet.hpp:293
bool getValid(void) const
Definition lime_double_ratchet.hpp:294
const ARsKey< Curve >::serializedBuffer serializeDHs(void)
Definition lime_double_ratchet.hpp:304
void setDHs(const ARsKey< Curve > &DHs)
Definition lime_double_ratchet.hpp:301
const ARsKey< Curve > & cgetDHs(void) const
Definition lime_double_ratchet.hpp:303
std::vector< uint8_t > getKEMIndex(void) const
Definition lime_double_ratchet.hpp:111
const X< typename Algo::EC, lime::Xtype::publicKey > & ECPublicKey(void) const
Definition lime_double_ratchet.hpp:105
const K< typename Algo::KEM, lime::Ktype::cipherText > & KEMCipherText(void) const
Definition lime_double_ratchet.hpp:107
std::vector< uint8_t > getIndex(void) const
Definition lime_double_ratchet.hpp:120
static constexpr size_t serializedSize(void)
Definition lime_double_ratchet.hpp:82
const K< typename Algo::KEM, lime::Ktype::publicKey > & KEMPublicKey(void) const
Definition lime_double_ratchet.hpp:106
ARrKey()
Definition lime_double_ratchet.hpp:102
serializedBuffer serialize(void) const
Definition lime_double_ratchet.hpp:128
void setECPk(const X< typename Algo::EC, lime::Xtype::publicKey > ec_Pk)
Definition lime_double_ratchet.hpp:109
ARrKey(const serializedBuffer &DHr)
Definition lime_double_ratchet.hpp:97
ARrKey(const SignedPreKey< Algo > &SPk)
Definition lime_double_ratchet.hpp:95
std::array< uint8_t, X< Algo, lime::Xtype::publicKey >::ssize()+K< Algo, lime::Ktype::publicKey >::ssize()+ K< Algo, lime::Ktype::cipherText >::ssize()> serializedBuffer
Definition lime_double_ratchet.hpp:87
ARrKey(const X< typename Algo::EC, lime::Xtype::publicKey > &ecDHr, K< typename Algo::KEM, lime::Ktype::publicKey > &kemDHr)
Definition lime_double_ratchet.hpp:94
ARrKey(const X< typename Algo::EC, lime::Xtype::publicKey > &ecDHr, K< typename Algo::KEM, lime::Ktype::publicKey > &kemDHr, K< typename Algo::KEM, lime::Ktype::cipherText > &kemCTr)
Definition lime_double_ratchet.hpp:92
ARrKey(const serializedBuffer &DHr)
Definition lime_double_ratchet.hpp:60
const X< Curve, lime::Xtype::publicKey > & publicKey(void) const
Definition lime_double_ratchet.hpp:63
ARrKey(const SignedPreKey< Curve > &SPk)
Definition lime_double_ratchet.hpp:58
std::vector< uint8_t > getIndex(void) const
Index is a hash of public key to identify it without sending/storing it all.
Definition lime_double_ratchet.hpp:65
static constexpr size_t serializedSize(void)
Definition lime_double_ratchet.hpp:55
serializedBuffer serialize(void) const
Definition lime_double_ratchet.hpp:70
ARrKey()
Definition lime_double_ratchet.hpp:61
std::array< uint8_t, X< Curve, lime::Xtype::publicKey >::ssize()> serializedBuffer
Definition lime_double_ratchet.hpp:56
Definition lime_double_ratchet.hpp:46
ARsKey(const SignedPreKey< Algo > &SPk)
Definition lime_double_ratchet.hpp:211
std::array< uint8_t, X< Algo, lime::Xtype::publicKey >::ssize()+K< Algo, lime::Ktype::publicKey >::ssize()+K< Algo, lime::Ktype::cipherText >::ssize()> serializedPublicBuffer
Definition lime_double_ratchet.hpp:204
ARsKey()
Definition lime_double_ratchet.hpp:216
serializedBuffer serialize(void) const
Serialize the key pair (to store in DB): First the public value, then the private one,...
Definition lime_double_ratchet.hpp:241
const X< typename Algo::EC, lime::Xtype::publicKey > & ECPublicKey(void) const
Definition lime_double_ratchet.hpp:236
sBuffer< X< Algo, lime::Xtype::publicKey >::ssize()+X< Algo, lime::Xtype::privateKey >::ssize()+K< Algo, lime::Ktype::publicKey >::ssize()+K< Algo, lime::Ktype::privateKey >::ssize()+K< Algo, lime::Ktype::cipherText >::ssize()> serializedBuffer
Definition lime_double_ratchet.hpp:199
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)
Definition lime_double_ratchet.hpp:213
X< typename Algo::EC, lime::Xtype::privateKey > & ECPrivateKey(void)
Definition lime_double_ratchet.hpp:235
K< typename Algo::KEM, lime::Ktype::privateKey > & KEMPrivateKey(void)
Definition lime_double_ratchet.hpp:237
std::vector< uint8_t > serializePublic(void) const
Serialize the public part only to insert in the DR message header: EC public || KEM public || KEM cip...
Definition lime_double_ratchet.hpp:255
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.
Definition lime_double_ratchet.hpp:266
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 pa...
Definition lime_double_ratchet.hpp:262
static constexpr size_t serializedSize(void)
Definition lime_double_ratchet.hpp:189
static constexpr size_t serializedPublicSize(void)
Definition lime_double_ratchet.hpp:194
ARsKey(const serializedBuffer &DHs)
Definition lime_double_ratchet.hpp:218
const K< typename Algo::KEM, lime::Ktype::publicKey > & KEMPublicKey(void) const
Definition lime_double_ratchet.hpp:238
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.
Definition lime_double_ratchet.hpp:231
K< typename Algo::KEM, lime::Ktype::cipherText > & KEMCipherText(void)
Definition lime_double_ratchet.hpp:239
ARsKey(const Xpair< typename Algo::EC > &ecDHs, const Kpair< typename Algo::KEM > &kemDHs, const K< typename Algo::KEM, lime::Ktype::cipherText > &kemCTs)
Definition lime_double_ratchet.hpp:210
ARsKey(const Xpair< typename Algo::EC > &ecDHs, const Kpair< typename Algo::KEM > &kemDHs)
Definition lime_double_ratchet.hpp:212
static constexpr size_t serializedSize(void)
Definition lime_double_ratchet.hpp:147
serializedBuffer serialize(void) const
Serialize the key pair (to store in DB): First the public value, then the private one.
Definition lime_double_ratchet.hpp:170
ARsKey(const SignedPreKey< Curve > &SPk)
Definition lime_double_ratchet.hpp:152
std::vector< uint8_t > serializePublic(void) const
Serialize the public part only to insert in the DR message header.
Definition lime_double_ratchet.hpp:177
X< Curve, lime::Xtype::publicKey > & publicKey(void)
Definition lime_double_ratchet.hpp:168
ARsKey()
Definition lime_double_ratchet.hpp:160
std::array< uint8_t, X< Curve, lime::Xtype::publicKey >::ssize()> serializedPublicBuffer
Definition lime_double_ratchet.hpp:150
X< Curve, lime::Xtype::privateKey > & privateKey(void)
Definition lime_double_ratchet.hpp:167
sBuffer< X< Curve, lime::Xtype::publicKey >::ssize()+X< Curve, lime::Xtype::privateKey >::ssize()> serializedBuffer
Definition lime_double_ratchet.hpp:149
ARsKey(const serializedBuffer &DHs)
Definition lime_double_ratchet.hpp:162
ARsKey(const X< Curve, lime::Xtype::publicKey > &DHsPublic, const X< Curve, lime::Xtype::privateKey > &DHsPrivate)
Definition lime_double_ratchet.hpp:156
static constexpr size_t serializedPublicSize(void)
Definition lime_double_ratchet.hpp:148
Definition lime_double_ratchet.hpp:139
const std::string deviceId
Definition lime.hpp:74
RecipientData(const std::string &deviceId)
Definition lime.hpp:87
std::shared_ptr< DR > DRSession
Definition lime_double_ratchet.hpp:330
RecipientInfos(const std::string &deviceId, std::shared_ptr< DR > session)
Definition lime_double_ratchet.hpp:339
RecipientInfos(const std::string &deviceId)
Definition lime_double_ratchet.hpp:345
Definition lime_x3dh.hpp:32
auto clean fixed size buffer(std::array based)
Definition lime_crypto_primitives.hpp:42