Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jxmssa Class Reference
Inheritance diagram for ProtocolPP::jxmssa:
Collaboration diagram for ProtocolPP::jxmssa:

Public Member Functions

 jxmssa ()
 XMSS security association with default values.
 
 jxmssa (keymode_t mode, xmss_algorithm_t xmss_alg, xmssmt_algorithm_t xmssmt_alg)
 
 jxmssa (keymode_t mode, xmss_algorithm_t xmss_alg, xmssmt_algorithm_t xmssmt_alg, std::shared_ptr< jarray< uint8_t >> &prvkey, std::shared_ptr< jarray< uint8_t >> &pubkey)
 
 jxmssa (jxmssa &security)
 
 jxmssa (std::shared_ptr< jxmssa > &security)
 
 ~jxmssa ()
 Standard deconstructor.
 
template<typename T >
void set_field (field_t field, T fieldval)
 
template<typename 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)
 
- Public Member Functions inherited from ProtocolPP::jsecass
 jsecass ()
 
virtual ~jsecass ()=default
 Standard deconstructor.
 
 jsecass (jsecass &jsecass)=delete
 
 jsecass (const jsecass &jsecass)=delete
 

Constructor & Destructor Documentation

◆ jxmssa() [1/4]

ProtocolPP::jxmssa::jxmssa ( keymode_t  mode,
xmss_algorithm_t  xmss_alg,
xmssmt_algorithm_t  xmssmt_alg 
)

XMSS Generate an XMSS key pair

Parameters
mode- Mode of operation (GENKEYPAIR, PKISIGN, PKIVERIFY)
xmss_alg- XMSS algorithm to use (must be mutually exclusive with xmssmt_alg)
xmssmt_alg- XMSS^MT algorithm to use (must be mutually exclusive with xmss_alg)

◆ jxmssa() [2/4]

ProtocolPP::jxmssa::jxmssa ( keymode_t  mode,
xmss_algorithm_t  xmss_alg,
xmssmt_algorithm_t  xmssmt_alg,
std::shared_ptr< jarray< uint8_t >> &  prvkey,
std::shared_ptr< jarray< uint8_t >> &  pubkey 
)

XMSS Generate an XMSS key pair

Parameters
mode- Mode of operation (GENKEYPAIR, PKISIGN, PKIVERIFY)
xmss_alg- XMSS algorithm to use (must be mutually exclusive with xmssmt_alg)
xmssmt_alg- XMSS^MT algorithm to use (must be mutually exclusive with xmss_alg)
prvkey- Private XMSS key
pubkey- Public XMSS key

◆ jxmssa() [3/4]

ProtocolPP::jxmssa::jxmssa ( jxmssa security)

treeSig - Generate a XMSS signature and update XMSS private key

Parameters
security- XMSS security association

◆ jxmssa() [4/4]

ProtocolPP::jxmssa::jxmssa ( std::shared_ptr< jxmssa > &  security)
explicit

treeSig - Generate a XMSS signature and update XMSS private key

Parameters
security- XMSS security association

Member Function Documentation

◆ get_field()

template<typename T >
T ProtocolPP::jxmssa::get_field ( field_t  field)

Returns the field in XMSSA

XMSS SA Get Fields
field typefield nameExample
direction_tDIRECTIONProtocolPP::direction_t mydir = get_field<ProtocolPP::direction_t>(ProtocolPP::field_t::DIRECTION)
xmss_algorithm_tXMSSALGProtocolPP::xmss_algorithm_t myalg = get_field<ProtocolPP::xmss_algorithm_t>(ProtocolPP::field_t::XMSSALG)
xmssmt_algorithm_tXMSSALGProtocolPP::xmssmt_algorithm_t myalg = get_field<ProtocolPP::xmssmt_algorithm_t>(ProtocolPP::field_t::XMSSALG)
uint8_t*PRVKEYuint8_t* prvkey = get_field<uint8_t*>(ProtocolPP::field_t::PRVKEY)
uint8_t*PUBKEYuint8_t* pubkey = get_field<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::jxmssa::set_field ( field_t  field,
fieldval 
)

Allows the user to update the fields of XMSS security association

XMSS SA Set Fields
field typefield nameExample
xmss_algorithm_tAUTHset_field<ProtocolPP::xmss_algorithm_t>(ProtocolPP::field_t::XMSSALG, ProtocolPP::XMSS_SHA2_10_256)
xmssmt_algorithm_tAUTHset_field<ProtocolPP::xmssmt_algorithm_t>(ProtocolPP::field_t::XMSSALG, ProtocolPP::XMSSMT_SHA2_20_2_256)
jarray<uint8_t>PRVKEYset_field<jarray<uint8_t>>(ProtocolPP::field_t::PRVKEY, jarray<uint8_t> prvkey)
jarray<uint8_t>PUBKEYset_field<jarray<uint8_t>>(ProtocolPP::field_t::PUBKEY, jarray<uint8_t> pubkey)
Parameters
field- field to update the security association with
fieldval- value to update the security association with

◆ to_json()

void ProtocolPP::jxmssa::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()

void ProtocolPP::jxmssa::to_xml ( tinyxml2::XMLPrinter myxml,
direction_t  direction 
)
virtual

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: