lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Classes | Namespaces | Functions
lime_crypto_primitives.cpp File Reference

Classes

class  lime::bctbx_RNG
 A wrapper around the bctoolbox Random Number Generator, implements the RNG interface. More...
 
class  lime::bctbx_EDDSA< Curve >
 a wrapper around bctoolbox signature algorithms, implements the Signature interface More...
 
class  lime::bctbx_ECDH< Curve >
 a wrapper around bctoolbox key exchange algorithms, implements the keyExchange interface More...
 

Namespaces

 lime
 

Functions

std::shared_ptr< RNG > lime::make_RNG ()
 
template<typename Curve >
bctbx_EDDSAContext_t * lime::bctbx_EDDSAInit (void)
 
template<typename Curve >
bctbx_ECDHContext_t * lime::bctbx_ECDHInit (void)
 
template<typename Curve >
std::shared_ptr< keyExchange< Curve > > lime::make_keyExchange ()
 
template<typename Curve >
std::shared_ptr< Signature< Curve > > lime::make_Signature ()
 
template<typename hashAlgo >
void lime::HMAC (const uint8_t *const key, const size_t keySize, const uint8_t *const input, const size_t inputSize, uint8_t *hash, size_t hashSize)
 templated HMAC More...
 
template<>
void lime::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)
 
template<typename hashAlgo , typename infoType >
void lime::HMAC_KDF (const uint8_t *const salt, const size_t saltSize, const uint8_t *const ikm, const size_t ikmSize, const infoType &info, uint8_t *output, size_t outputSize)
 
template<typename hashAlgo , typename infoType >
void lime::HMAC_KDF (const std::vector< uint8_t > &salt, const std::vector< uint8_t > &ikm, const infoType &info, uint8_t *okm, size_t okmSize)
 HKDF as described in RFC5869. More...
 
template void lime::HMAC_KDF< SHA512, std::vector< uint8_t > > (const uint8_t *const salt, const size_t saltSize, const uint8_t *const ikm, const size_t ikmSize, const std::vector< uint8_t > &info, uint8_t *output, size_t outputSize)
 
template void lime::HMAC_KDF< SHA512, std::string > (const uint8_t *const salt, const size_t saltSize, const uint8_t *const ikm, const size_t ikmSize, const std::string &info, uint8_t *output, size_t outputSize)
 
template void lime::HMAC_KDF< SHA512, std::vector< uint8_t > > (const std::vector< uint8_t > &salt, const std::vector< uint8_t > &ikm, const std::vector< uint8_t > &info, uint8_t *output, size_t outputSize)
 
template void lime::HMAC_KDF< SHA512, std::string > (const std::vector< uint8_t > &salt, const std::vector< uint8_t > &ikm, const std::string &info, uint8_t *output, size_t outputSize)
 
template<typename AEADAlgo >
void lime::AEAD_encrypt (const uint8_t *const key, const size_t keySize, const uint8_t *const IV, const size_t IVSize, const uint8_t *const plain, const size_t plainSize, const uint8_t *const AD, const size_t ADSize, uint8_t *tag, const size_t tagSize, uint8_t *cipher)
 Encrypt and tag using scheme given as template parameter. More...
 
template<typename AEADAlgo >
bool lime::AEAD_decrypt (const uint8_t *const key, const size_t keySize, const uint8_t *const IV, const size_t IVSize, const uint8_t *const cipher, const size_t cipherSize, const uint8_t *const AD, const size_t ADSize, const uint8_t *const tag, const size_t tagSize, uint8_t *plain)
 Authenticate and Decrypt using scheme given as template parameter. More...
 
template<>
void lime::AEAD_encrypt< AES256GCM > (const uint8_t *const key, const size_t keySize, const uint8_t *const IV, const size_t IVSize, const uint8_t *const plain, const size_t plainSize, const uint8_t *const AD, const size_t ADSize, uint8_t *tag, const size_t tagSize, uint8_t *cipher)
 
template<>
bool lime::AEAD_decrypt< AES256GCM > (const uint8_t *const key, const size_t keySize, const uint8_t *const IV, const size_t IVSize, const uint8_t *const cipher, const size_t cipherSize, const uint8_t *const AD, const size_t ADSize, const uint8_t *const tag, const size_t tagSize, uint8_t *plain)
 
void lime::cleanBuffer (uint8_t *buffer, size_t size)
 force a buffer values to zero in a way that shall prevent the compiler from optimizing it out More...