Loading...
Searching...
No Matches
lime_defines.hpp
Go to the documentation of this file.
/*
lime_defines.hpp
@author Johan Pascal
@copyright Copyright (C) 2017 Belledonne Communications SARL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef lime_defines_hpp
#define lime_defines_hpp
#include <string>
namespace lime {
namespace settings {
/******************************************************************************/
/* */
/* Double Ratchet related definitions */
/* */
/******************************************************************************/
constexpr size_t DRChainKeySize=32;
const std::string hkdf_DRChainKey_info{"DR Root Chain Key Derivation"};
constexpr size_t DRMessageKeySize=32;
constexpr size_t DRMessageIVSize=16;
constexpr size_t DRrandomSeedSize=32;
const std::string hkdf_randomSeed_info{"DR Message Key Derivation"};
constexpr size_t DRMessageAuthTagSize=16;
/******************************************************************************/
/* */
/* Local Storage related definitions */
/* */
/******************************************************************************/
constexpr int DBuserVersion=0x000100;
constexpr uint16_t DBInactiveUserBit = 0x0100;
constexpr uint16_t DBCurveIdByte = 0x00FF;
constexpr uint8_t DBInvalidIk = 0x00;
/******************************************************************************/
/* */
/* X3DH related definitions */
/* */
/******************************************************************************/
const std::string X3DH_SK_info{"Lime"};
const std::string X3DH_AD_info{"X3DH Associated Data"};
} // namespace settings
} // namespace lime
#endif /* lime_defines_hpp */
lime::settings
Hold constants definition used as settings in all components of the lime library.
Definition lime_defines.hpp:35
lime::settings::DRMessageAuthTagSize
constexpr size_t DRMessageAuthTagSize
AEAD generates tag 16 bytes long.
Definition lime_defines.hpp:67
lime::settings::DRrandomSeedSize
constexpr size_t DRrandomSeedSize
Definition lime_defines.hpp:58
lime::settings::DRMessageKeySize
constexpr size_t DRMessageKeySize
DR Message Key are composed of a 32 bytes key and 16 bytes of IV.
Definition lime_defines.hpp:49
lime::settings::hkdf_DRChainKey_info
const std::string hkdf_DRChainKey_info
String used as info in the root key derivation.
Definition lime_defines.hpp:46
lime::settings::X3DH_AD_info
const std::string X3DH_AD_info
used to generate a shared AD based on Ik and deviceID
Definition lime_defines.hpp:91
lime::settings::DBInactiveUserBit
constexpr uint16_t DBInactiveUserBit
Definition lime_defines.hpp:79
lime::settings::DBCurveIdByte
constexpr uint16_t DBCurveIdByte
Definition lime_defines.hpp:80
lime::settings::X3DH_SK_info
const std::string X3DH_SK_info
shall be an ASCII string identifying the application (X3DH spec section 2.1)
Definition lime_defines.hpp:89
lime::settings::hkdf_randomSeed_info
const std::string hkdf_randomSeed_info
Definition lime_defines.hpp:64
lime::settings::DRMessageIVSize
constexpr size_t DRMessageIVSize
DR Message Key are composed of a 32 bytes key and 16 bytes of IV.
Definition lime_defines.hpp:51
lime::settings::DBuserVersion
constexpr int DBuserVersion
Definition lime_defines.hpp:78
lime::settings::DBInvalidIk
constexpr uint8_t DBInvalidIk
Definition lime_defines.hpp:81
lime::settings::DRChainKeySize
constexpr size_t DRChainKeySize
Sending, Receiving and Root key chain use 32 bytes keys (spec 3.2).
Definition lime_defines.hpp:44
lime
Definition lime.cpp:30