|
| jlmsa () |
| LMS security association with default values.
|
|
| jlmsa (keymode_t mode, const char *algorithm, const char *otsalg, int treelvl) |
|
| jlmsa (keymode_t mode, const char *algorithm, const char *otsalg, int treelvl, std::shared_ptr< jarray< uint8_t >> &prvkey, std::shared_ptr< jarray< uint8_t >> &pubkey) |
|
| jlmsa (jlmsa &security) |
|
| jlmsa (std::shared_ptr< jlmsa > &security) |
|
| ~jlmsa () |
| Standard deconstructor.
|
|
template<typename T > |
void | set_field (field_t field, T fieldval) |
|
template<typename T > |
T | get_field (field_t field) |
|
void | to_xml (tinyxml2::XMLPrinter &myxml, direction_t direction) |
|
void | to_json (std::ofstream &myjson, direction_t direction, std::string &indent) |
|
| jlmsa (const jlmsa &rhs)=delete |
|
| jsecass () |
|
virtual | ~jsecass ()=default |
| Standard deconstructor.
|
|
| jsecass (jsecass &jsecass)=delete |
|
| jsecass (const jsecass &jsecass)=delete |
|
◆ jlmsa() [1/4]
ProtocolPP::jlmsa::jlmsa |
( |
keymode_t |
mode, |
|
|
const char * |
algorithm, |
|
|
const char * |
otsalg, |
|
|
int |
treelvl |
|
) |
| |
LMS security association with values chosen by algorithm
- Parameters
-
mode | - Mode of operation (GENKEYPAIR, PKISIGN, PKIVERIFY) |
algorithm | - LMS algorith to use for keys, signing, and verification. For HSS signatures, hash function for each level must be the same |
otsalg | - LMSOTS algorith to use for keys, signing, and verification. For HSS signatures, hash function for each level must be the same |
treelvl | - number of levels in LMS tree, Must match with number of algorithms passed |
◆ jlmsa() [2/4]
ProtocolPP::jlmsa::jlmsa |
( |
keymode_t |
mode, |
|
|
const char * |
algorithm, |
|
|
const char * |
otsalg, |
|
|
int |
treelvl, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
prvkey, |
|
|
std::shared_ptr< jarray< uint8_t >> & |
pubkey |
|
) |
| |
LMS security association with values chosen by algorithm
- Parameters
-
mode | - Mode of operation (GENKEYPAIR, PKISIGN, PKIVERIFY) |
algorithm | - LMS algorith to use for keys, signing, and verification. For HSS signatures, hash function for each level must be the same |
otsalg | - LMSOTS algorith to use for keys, signing, and verification. For HSS signatures, hash function for each level must be the same |
treelvl | - number of levels in LMS tree, Must match with number of algorithms passed |
prvkey | - Previously generated private key |
pubkey | - Previously generated public key |
◆ jlmsa() [3/4]
ProtocolPP::jlmsa::jlmsa |
( |
jlmsa & |
security | ) |
|
LMS security association copy constructor
- Parameters
-
security | - LMS security association |
◆ jlmsa() [4/4]
ProtocolPP::jlmsa::jlmsa |
( |
std::shared_ptr< jlmsa > & |
security | ) |
|
|
explicit |
LMS security association copy constructor from shared descriptor
- Parameters
-
security | - LMS security association |
◆ get_field()
template<typename T >
T ProtocolPP::jlmsa::get_field |
( |
field_t |
field | ) |
|
Returns the field in LMSA
LMS SA Get Fields
field type | field name | Example |
direction_t | DIRECTION | ProtocolPP::direction_t mydir = get_field<ProtocolPP::direction_t>(ProtocolPP::field_t::DIRECTION) |
std::vector<lms_algorithm_t> | AUTH | std::vector<ProtocolPP::lms_algorithm_t> myalg = get_field<std::vector<ProtocolPP::lms_algorithm_t>>(ProtocolPP::field_t::AUTH) |
std::vector<lmots_algorithm_t> | AUTH | std::vector<ProtocolPP::lmots_algorithm_t> myalg = get_field<std::vector<ProtocolPP::lmots_algorithm_t>>(ProtocolPP::field_t::AUTH) |
int | LMTREELVLS | int mytreelvl = get_field<int>(ProtocolPP::field_t::LMTREELVLS) |
uint32_t | PRVKEYLEN | uint32_t myprvlen = get_field<uint32_t>(ProtocolPP::field_t::PRVKEYLEN) |
uint32_t | PUBKEYLEN | uint32_t mypublen = get_field<uint32_t>(ProtocolPP::field_t::PUBKEYLEN) |
jarray<uint8_t> | PRVKEY | jarray<uint8_t> myprvkey = get_field<jarray<uint8_t>>(ProtocolPP::field_t::PRVKEY) |
jarray<uint8_t> | PUBKEY | jarray<uint8_t> mypubkey = get_field<jarray<uint8_t>>(ProtocolPP::field_t::PUBKEY) |
uint8_t* | PRVKEY | uint8_t* myprvkey = get_field<uint8_t*>(ProtocolPP::field_t::PRVKEY) |
uint8_t* | PUBKEY | uint8_t* mypubkey = get_field<uint8_t*>(ProtocolPP::field_t::PUBKEY) |
std::shared_ptr<jarray<uint8_t>> | PRVKEY | std::shared_ptr<jarray<uint8_t>> myprvkey = get_field<std::shared_ptr<jarray<uint8_t>>>(ProtocolPP::field_t::PRVKEY) |
std::shared_ptr<jarray<uint8_t>> | PUBKEY | std::shared_ptr<jarray<uint8_t>> mypubkey = get_field<std::shared_ptr<jarray<uint8_t>>>(ProtocolPP::field_t::PUBKEY) |
- Parameters
-
field | - field to retrieve from the security association |
- Returns
- value of the field in the security association
◆ set_field()
template<typename T >
void ProtocolPP::jlmsa::set_field |
( |
field_t |
field, |
|
|
T |
fieldval |
|
) |
| |
Allows the user to update the fields of LMSA security association
LMS SA Set Fields
field type | field name | Example |
std::vector<lms_algorithm_t | AUTH | set_field<std::vector<lms_algorithm_t>(ProtocolPP::field_t::AUTH, std::vector<lms_algorithm_t>& fieldval) |
std::vector<lmots_algorithm_t | AUTH | set_field<std::vector<lmots_algorithm_t>(ProtocolPP::field_t::AUTH, std::vector<lmots_algorithm_t>& fieldval) |
int | LMTREELVLS | set_field<int>(ProtocolPP::field_t::LMTREELVLS, int fieldval) |
jarray<uint8_t> | PRVKEY | set_field<jarray<uint8_t>>(ProtocolPP::field_t::PRVKEY, jarray<uint8_t>& fieldval) |
jarray<uint8_t> | PUBKEY | set_field<jarray<uint8_t>>(ProtocolPP::field_t::PUBKEY, jarray<uint8_t>& fieldval) |
std::shared_ptr<jarray<uint8_t>> | PRVKEY | set_field<std::shared_ptr<jarray<uint8_t>>>(ProtocolPP::field_t::PRVKEY, std::shared_ptr<jarray<uint8_t>>& fieldval) |
std::shared_ptr<jarray<uint8_t>> | PUBKEY | set_field<std::shared_ptr<jarray<uint8_t>>>(ProtocolPP::field_t::PUBKEY, std::shared_ptr<jarray<uint8_t>>& fieldval) |
- Parameters
-
field | - field to update the security association with |
fieldval | - value to update the security association with |
◆ to_json()
void ProtocolPP::jlmsa::to_json |
( |
std::ofstream & |
myjson, |
|
|
direction_t |
direction, |
|
|
std::string & |
indent |
|
) |
| |
|
virtual |
Prints the protocol as an JSON object
- Parameters
-
myjson | - JSON object to print with |
direction | - randomization |
indent | - indentation for JSON output |
Implements ProtocolPP::jsecass.
◆ to_xml()
Prints the protocol as an XML object
- Parameters
-
myxml | - XMLPrinter object to print with |
direction | - randomization |
Implements ProtocolPP::jsecass.
The documentation for this class was generated from the following file: