27 #include "bctoolbox/crypto.hh"
29 #include "postquantumcryptoengine/crypto.hh"
62 static const std::string
Id() {
return std::string(
"CURVE25519");};
66 static constexpr
size_t Xsize(
lime::Xtype dataType) {
return BCTBX_ECDH_X25519_PUBLIC_SIZE;};
77 static const std::string
Id() {
return std::string(
"CURVE448");};
81 static constexpr
size_t Xsize(
lime::Xtype dataType) {
return BCTBX_ECDH_X448_PUBLIC_SIZE;};
93 struct K512:
public genericKEM {
95 static const std::string Id(
void) {
return std::string(
"KYBER512");};
97 static constexpr
size_t Ksize(
lime::Ktype dataType) {
100 return bctoolbox::KYBER512::kPkSize;
103 return bctoolbox::KYBER512::kSkSize;
106 return bctoolbox::KYBER512::kCtSize;
109 return bctoolbox::KYBER512::kSsSize;
119 struct MLK512:
public genericKEM {
121 static const std::string Id(
void) {
return std::string(
"MLKEM512");};
123 static constexpr
size_t Ksize(
lime::Ktype dataType) {
126 return bctoolbox::MLKEM512::kPkSize;
129 return bctoolbox::MLKEM512::kSkSize;
132 return bctoolbox::MLKEM512::kCtSize;
135 return bctoolbox::MLKEM512::kSsSize;
145 struct MLK1024:
public genericKEM {
147 static const std::string Id(
void) {
return std::string(
"MLKEM1024");};
149 static constexpr
size_t Ksize(
lime::Ktype dataType) {
152 return bctoolbox::MLKEM1024::kPkSize;
155 return bctoolbox::MLKEM1024::kSkSize;
158 return bctoolbox::MLKEM1024::kCtSize;
161 return bctoolbox::MLKEM1024::kSsSize;
169 struct C255K512:
public C255,K512 {
174 struct C255MLK512:
public C255,MLK512 {
179 struct C448MLK1024:
public C448,MLK1024 {
184 #endif // HAVE_BCTBXPQ
192 static constexpr
size_t ssize() {
return 64;}
201 static constexpr
size_t keySize(
void) {
return 32;};
203 static constexpr
size_t tagSize(
void) {
return 16;};
static constexpr lime::CurveId curveId()
Definition: lime_keys.hpp:87
static const std::string Id()
a string to indentify this curve
Definition: lime_keys.hpp:62
DSAtype
List of data types used by Signature algorithm.
Definition: lime_keys.hpp:49
static const std::string Id()
a string to indentify this curve
Definition: lime_keys.hpp:77
SHA512 buffer size definition.
Definition: lime_keys.hpp:190
static constexpr size_t ssize()
maximum output size for SHA512 is 64 bytes
Definition: lime_keys.hpp:192
static constexpr size_t keySize(void)
key size is 32 bytes
Definition: lime_keys.hpp:201
curve 25519 data types size definition
Definition: lime_keys.hpp:59
Ktype
List of data types used by key encapsulation mechanism algorithm.
Definition: lime_keys.hpp:43
static constexpr size_t Xsize(lime::Xtype dataType)
for X448, public, private and shared secret have the same length 56 bytes
Definition: lime_keys.hpp:81
static constexpr size_t Xsize(lime::Xtype dataType)
for X25519, public, private and shared secret have the same length: 32 bytes
Definition: lime_keys.hpp:66
Xtype
List of data types used by key Echange algorithm.
Definition: lime_keys.hpp:38
static constexpr lime::CurveId curveId()
the C448 curve id using the CurveId enumeration
Definition: lime_keys.hpp:79
static constexpr size_t DSAsize(lime::DSAtype dataType)
for Ed25519, public and private key have the same length: 32 bytes, signature is 64 bytes long ...
Definition: lime_keys.hpp:68
Definition: lime_keys.hpp:86
static constexpr size_t tagSize(void)
we use authentication tag size of 16 bytes
Definition: lime_keys.hpp:203
curve 448-goldilocks data types size definition
Definition: lime_keys.hpp:74
static constexpr size_t DSAsize(lime::DSAtype dataType)
for Ed448, public and private key have the same length 57 bytes, signature is 114 bytes long ...
Definition: lime_keys.hpp:83
static constexpr lime::CurveId curveId()
the C25519 curve id using the CurveId enumeration
Definition: lime_keys.hpp:64
AES256GCM buffers size definition.
Definition: lime_keys.hpp:199
CurveId
Definition: lime.hpp:37