Loading...
Searching...
No Matches
lime_double_ratchet.cpp File Reference

## Namespaces

namespace | lime

## Functions

template<typename Curve>
static void | lime::KDF_RK (DRChainKey &RK, DRChainKey &CK, const X< Curve, lime::Xtype::sharedSecret > &dh_out) noexcept
| Key Derivation Function used in Root key/Diffie-Hellman Ratchet chain.
static void | lime::KDF_CK (DRChainKey &CK, DRMKey &MK) noexcept
| Key Derivation Function used in Symmetric key ratchet chain.
static bool | lime::decrypt (const lime::DRMKey &MK, const std::vector< uint8_t > &ciphertext, const size_t headerSize, std::vector< uint8_t > &AD, std::vector< uint8_t > &plaintext)
| Decrypt as described is spec section 3.1.
static bool | lime::decrypt (const lime::DRMKey &MK, const std::vector< uint8_t > &ciphertext, const size_t headerSize, std::vector< uint8_t > &AD, sBuffer< lime::settings::DRrandomSeedSize > &plaintext)
template<typename Curve>
void | lime::encryptMessage (std::vector< RecipientInfos< Curve > > &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)
| Encrypt a message to all recipients, identified by their device id.
template<typename Curve>
std::shared_ptr< DR< Curve > > | lime::decryptMessage (const std::string &sourceDeviceId, const std::string &recipientDeviceId, const std::vector< uint8_t > &recipientUserId, std::vector< std::shared_ptr< DR< Curve > > > &DRSessions, const std::vector< uint8_t > &DRmessage, const std::vector< uint8_t > &cipherMessage, std::vector< uint8_t > &plaintext)
| Decrypt a message.

## Variables

const std::array< uint8_t, 1 > | lime::hkdf_ck_info {{0x02}}
const std::array< uint8_t, 1 > | lime::hkdf_mk_info {{0x01}}