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

Public Member Functions

 jxwingsa ()
 
 jxwingsa (keymode_t mode, jarray< uint8_t > &seed)
 
 jxwingsa (keymode_t mode, jarray< uint8_t > &seed, CryptoPP::XWingDecapsulator &prvkey)
 
 jxwingsa (jxwingsa &rhs)
 standard copy constructor
 
 jxwingsa (std::shared_ptr< jxwingsa > &rhs)
 standard copy constructor from shared pointer
 
virtual ~jxwingsa ()=default
 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)
 
 jxwingsa (const jxwingsa &jxwingsa)=delete
 
- 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

◆ jxwingsa() [1/3]

ProtocolPP::jxwingsa::jxwingsa ( )

Standard constructor with defaults

XWing Defaults
fieldDefault Value
modekeymode_t::GENKEYPAIR
seeduint8_t[32] {0}
prvkey0
pubkey0

◆ jxwingsa() [2/3]

ProtocolPP::jxwingsa::jxwingsa ( keymode_t  mode,
jarray< uint8_t > &  seed 
)

Security Association for XWING

Required fields for XWING

Parameters
mode- Type of PKI calculation (GENKEYPAIR:PKISIGN:PKIVERIFY)
seed- 32-byte seed for keypair generation

◆ jxwingsa() [3/3]

ProtocolPP::jxwingsa::jxwingsa ( keymode_t  mode,
jarray< uint8_t > &  seed,
CryptoPP::XWingDecapsulator &  prvkey 
)

Security Association for XWING

Required fields for XWING

Parameters
mode- Type of PKI calculation (GENKEYPAIR:PKISIGN:PKIVERIFY)
seed- 32-byte seed for keypair generation
prvkey- XWing decapsulator with public/private key pair

Member Function Documentation

◆ get_field()

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

Returns the version field of the XWING security association

XWing Get Fields
field typefield nameExample
keymode_tMODEkeymode_t mode = get_field<keymode_t>(field_t::MODE)
jarray<uint8_t>SEEDjarray<uint8_t> seed = get_field<jarray<uint8_t>>(field_t::SEED)
CryptoPP::XWingDecapsulator PRVKEYCryptoPP::XWingDecapsulator prvkey = get_field<CryptoPP::XWingDecapsulator>(field_t::PRVKEY)
jarray<uint8_t> PUBKEYjarray<uint8_t> pubkey = get_field<jarray<uint8_t>>(field_t::PUBKEY)
std::shared_ptr<jarray<uint8_t>> PUBKEYstd::shared_ptr<jarray<uint8_t>> pubkey = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::PUBKEY)
Parameters
field- field to retrieve from the XWing security association
Returns
field of the XWing security association

◆ set_field()

template<typename T >
void ProtocolPP::jxwingsa::set_field ( field_t  field,
fieldval 
)

Allows the user to update the field of the XWING security association

XWINGSA Set Fields
field typefield nameExample
keymode_tMODEset_field<keymode_t>(field_t::MODE, keymode_t::GENKEYPAIR)
jarray<uint8_t>SEEDset_field<jarray<uint8_t>>(field_t::SEED, seed)
CryptoPP::XWingDecapsulator PRVKEYset_field<CryptoPP::XWingDecapsulator>(field_t::PRVKEY, prvkey)
Parameters
field- field to update in the XWing security association
fieldval- value to update in the XWing security association

◆ to_json()

void ProtocolPP::jxwingsa::to_json ( std::ofstream &  myjson,
direction_t  direction,
std::string &  indent 
)
virtual

Prints the protocol object in JSON

Parameters
myjson- JSON object to print to
direction- randomzation
indent- indentation for JSON output

Implements ProtocolPP::jsecass.

◆ to_xml()

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

Prints the protocol object in XML

Parameters
myxml- XMLPrinter object to print to
direction- randomzation

Implements ProtocolPP::jsecass.


The documentation for this class was generated from the following file: