|
Protocol++® (Protocolpp®)
v5.7.0
|


Public Member Functions | |
| jconfident (std::shared_ptr< jconfidentsa > &security) | |
| ~jconfident ()=default | |
| Standard deconstructor. | |
| void | encap_packet (std::shared_ptr< jarray< uint8_t >> &input, std::shared_ptr< jarray< uint8_t >> &output) |
| void | decap_packet (std::shared_ptr< jarray< uint8_t >> &input, std::shared_ptr< jarray< uint8_t >> &output) |
| jarray< uint8_t > | get_hdr () |
| uint64_t | get_field (field_t field, jarray< uint8_t > &hdr) |
| void | set_hdr (jarray< uint8_t > &hdr) |
| void | set_field (field_t field, uint64_t value) |
| template<typename T > | |
| void | set_field (field_t field, T fieldval) |
| template<typename T > | |
| T | get_field (field_t field) |
| void | get_security (std::shared_ptr< jconfidentsa > &sec) |
| void | to_xml (tinyxml2::XMLPrinter &myxml, direction_t direction) |
| void | to_json (std::ofstream &myjson, direction_t direction, std::string &indent) |
| jconfident (jconfident &rsh)=delete | |
| jconfident (const jconfident &rsh)=delete | |
Public Member Functions inherited from ProtocolPP::jprotocol | |
| jprotocol (direction_t dir) | |
| jprotocol (direction_t dir, std::string &file) | |
| jprotocol (direction_t dir, std::shared_ptr< jrand > &rand) | |
| jprotocol (direction_t dir, std::shared_ptr< jrand > &rand, std::string &file) | |
| virtual | ~jprotocol () |
| Standard deconstructor. | |
| virtual void | encap_packet (std::shared_ptr< jarray< uint8_t >> &output) |
| virtual void | decap_packet (std::shared_ptr< jarray< uint8_t >> &input) |
| bool | hasfile () |
| uint32_t | get_status () |
| jarray< uint8_t > | checksum (iana_t prot, direction_t dir, jarray< uint8_t > &check, uint32_t offset=0) |
| jarray< uint8_t > | pad (pad_t padtype, uint32_t len) |
| jprotocol (jprotocol &jprotocol)=delete | |
| jprotocol (const jprotocol &jprotocol)=delete | |
Additional Inherited Members | |
Static Public Member Functions inherited from ProtocolPP::jprotocol | |
| const static std::string | currentDateTime () |
| static std::string | str_status (uint32_t status) |
| static jarray< uint8_t > | to_array (uint8_t input) |
| static jarray< uint8_t > | to_array (uint16_t input) |
| static jarray< uint8_t > | to_array (uint32_t input) |
| static jarray< uint8_t > | to_array (uint64_t input) |
| static uint8_t | to_u8 (jarray< uint8_t > src_array) |
| static uint16_t | to_u16 (jarray< uint8_t > src_array) |
| static uint32_t | to_u32 (jarray< uint8_t > src_array) |
| static uint64_t | to_u64 (jarray< uint8_t > src_array) |
| static uint32_t | fnv_hash (std::shared_ptr< jarray< uint8_t >> &header, jarray< uint8_t > &mask, uint32_t hdrlen) |
Protected Member Functions inherited from ProtocolPP::jprotocol | |
| template<typename T , typename TE > | |
| std::shared_ptr< jreplay< T, TE > > | update_replay (protocol_t prot, T &seqnum, TE &extseq, bool usext, uint32_t size) |
| template<typename T , typename TE > | |
| std::shared_ptr< jreplay< T, TE > > | update_replay (protocol_t prot, T &seqnum, TE &extseq, bool usext, uint32_t size, jarray< uint8_t > &window) |
| void | update_status (uint32_t stat) |
| void | get_data (std::shared_ptr< jarray< uint8_t >> &data) |
| void | put_data (std::shared_ptr< jarray< uint8_t >> &wdata) |
| void | encryptdat (std::shared_ptr< jarray< uint8_t >> &red, std::shared_ptr< jarray< uint8_t >> &black) |
| void | decryptdat (std::shared_ptr< jarray< uint8_t >> &black, std::shared_ptr< jarray< uint8_t >> &red) |
| uint32_t | roundup (uint32_t value, uint32_t mult) |
Protected Attributes inherited from ProtocolPP::jprotocol | |
| direction_t | m_dir |
| direction of processing | |
| uint32_t | m_status |
| std::shared_ptr< jrand > | m_rand |
| random data generator passed into constructor | |
| std::string | m_filename |
| file input string for this protocol | |
| std::fstream | m_file |
| input file stream object for this protocol | |
| endian_t | m_endian |
| endianess string for this protocol | |
|
explicit |
Standard constructor
| security | - Security parameters for cipher protocol |
|
virtual |
Decapsulate the data with the cipher parameters
| input | - Encrypted ciphertext data, AAD (optional), and ICV to decrypt. AAD data is optional for CCM, GCM, AEAD-CHACHA20_POLY1305, SNOWV_GCM, and will only be processed if AADLEN is non-zero * -------------------------------------------- * | AAD DATA | CIPHERTEXT DATA | ICV | * -------------------------------------------- * |
| output | - Decrypted plaintext data * --------------------------- * | PLAINTEXT DATA | * --------------------------- * |
Implements ProtocolPP::jprotocol.
|
virtual |
Encapsulate the data with the cipher parameters
| input | - Plaintext data and AAD (optional) to encrypt. AAD data is optional for CCM, GCM, AEAD-CHACHA20_POLY1305, SNOWV_GCM, and will only be processed if AADLEN is non-zero * -------------------------------------- * | AAD DATA | PLAINTEXT DATA | * -------------------------------------- * |
| output | - Encrypted ciphertext * --------------------------------- * | CIPHERTEXT DATA | ICV | * --------------------------------- * |
Implements ProtocolPP::jprotocol.
|
virtual |
Retrieve the value of the template field
| field type | field name | Example |
|---|---|---|
| cipher_t | CIPHER | cipher_t tmp = get_field<cipher_t>(field_t::CIPHER) |
| direction_t | DIRECTION | direction_t tmp = get_field<direction_t>(field_t::DIRECTION) |
| uint32_t | ICVLEN | uint32_t tmp = get_field<uint32_t>(field_t::ICVLEN) |
| uint32_t | AADLEN | uint32_t tmp = get_field<uint32_t>(field_t::AADLEN) |
| uint32_t | COUNT | uint32_t tmp = get_field<uint32_t>(field_t::COUNT) |
| uint32_t | BLOCKSIZE | uint32_t tmp = get_field<uint32_t>(field_t::BLOCKSIZE) |
| uint8_t | BEARER | uint8_t tmp = get_field<uint8_t>(field_t::BEARER) |
| field | - field to retrieve |
Reimplemented from ProtocolPP::jprotocol.
Retrieve the value of the field
| field | - field to retrieve |
| hdr | - header to retrieve the field from |
Implements ProtocolPP::jprotocol.
|
virtual |
| void ProtocolPP::jconfident::get_security | ( | std::shared_ptr< jconfidentsa > & | sec | ) |
get_security
| sec | - Shared pointer to hold the security association |
| void ProtocolPP::jconfident::set_field | ( | field_t | field, |
| T | fieldval | ||
| ) |
Set the specified field with a new template value
| field type | field name | Example |
|---|---|---|
| cipher_t | CIPHER | set_field<cipher_t>(field_t::CIPHER, cipher_t::SERPENT) |
| direction_t | DIRECTION | set_field<direction_t>(field_t::DIRECTION, direction_t::ENC) |
| uint32_t | ICVLEN | set_field<uint32_t>(field_t::ICVLEN, 16) |
| uint32_t | AADLEN | set_field<uint32_t>(field_t::AADLEN, 16) |
| uint32_t | COUNT | set_field<uint32_t>(field_t::COUNT, 16) |
| uint32_t | BLOCKSIZE | set_field<uint32_t>(field_t::BLOCKSIZE, 8) |
| uint8_t | BEARER | set_field<uint8_t>(field_t::BEARER, 5) |
| field | - field to set |
| fieldval | - New value to set in field |
|
virtual |
Set the specified field with a new value
| field | - field to set |
| value | - new value for the field |
Implements ProtocolPP::jprotocol.
|
virtual |
Set the header to the current value
| hdr | - new header value |
Implements ProtocolPP::jprotocol.
|
virtual |
to_json Convert the security association to JSON for printing
| myjson | - JSON printing object |
| direction | - direction of processing |
| indent | - indentation for JSON output |
Implements ProtocolPP::jprotocol.
|
virtual |
to_xml Convert the security association to XML for printing
| myxml | - XML printing object |
| direction | - direction of processing |
Implements ProtocolPP::jprotocol.