lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Classes | Namespaces | Typedefs | Enumerations | Functions
lime_double_ratchet.hpp File Reference

Go to the source code of this file.

Classes

struct  lime::ReceiverKeyChain< Curve >
 Chain storing the DH and MKs associated with Nr(uint16_t map index) More...
 
class  lime::DR< Curve >
 store a Double Rachet session. More...
 
struct  lime::RecipientInfos< Curve >
 extend the RecipientData to add a Double Ratchet session shared with the recipient More...
 

Namespaces

 lime
 

Typedefs

using lime::DRChainKey = lime::sBuffer< lime::settings::DRChainKeySize >
 
using lime::DRMKey = lime::sBuffer< lime::settings::DRMessageKeySize+lime::settings::DRMessageIVSize >
 
using lime::SharedADBuffer = std::array< uint8_t, lime::settings::DRSessionSharedADSize >
 

Enumerations

enum  lime::DRSessionDbStatus : uint8_t {
  lime::DRSessionDbStatus::clean, lime::DRSessionDbStatus::dirty_encrypt, lime::DRSessionDbStatus::dirty_decrypt, lime::DRSessionDbStatus::dirty_ratchet,
  lime::DRSessionDbStatus::dirty
}
 the possible status of session regarding the Local Storage More...
 

Functions

template<typename Curve >
void lime::encryptMessage (std::vector< RecipientInfos< Curve >> &recipients, const std::vector< uint8_t > &plaintext, const std::string &recipientUserId, const std::string &sourceDeviceId, std::vector< uint8_t > &cipherMessage, const lime::EncryptionPolicy encryptionPolicy)
 Encrypt a message to all recipients, identified by their device id. More...
 
template<typename Curve >
std::shared_ptr< DR< Curve > > lime::decryptMessage (const std::string &sourceDeviceId, const std::string &recipientDeviceId, const std::string &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. More...