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


Public Member Functions | |
| jdtlsa13 () | |
| jdtlsa13 (direction_t dir, tls_ciphersuite_t ciphersuite, tlstype_t type, uint64_t epoch, uint64_t seqnum, uint64_t authfail, uint8_t cid, bool cbit, bool sbit, bool lbit, uint32_t icvlen, uint32_t ivlen, std::shared_ptr< jarray< uint8_t >> iv, uint32_t ckeylen, std::shared_ptr< jarray< uint8_t >> cipherkey, std::shared_ptr< jarray< uint8_t >> app_traffic_secret, uint32_t arlen, jarray< uint8_t > arwin, uint32_t mtu) | |
| jdtlsa13 (jdtlsa13 &rhs) | |
| jdtlsa13 (std::shared_ptr< jdtlsa13 > &rhs) | |
| ~jdtlsa13 () | |
| 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) |
| jdtlsa13 (const jdtlsa13 &rhs)=delete | |
Public Member Functions inherited from ProtocolPP::jsecass | |
| jsecass () | |
| virtual | ~jsecass ()=default |
| Standard deconstructor. | |
| jsecass (jsecass &jsecass)=delete | |
| jsecass (const jsecass &jsecass)=delete | |
| ProtocolPP::jdtlsa13::jdtlsa13 | ( | ) |
| ProtocolPP::jdtlsa13::jdtlsa13 | ( | direction_t | dir, |
| tls_ciphersuite_t | ciphersuite, | ||
| tlstype_t | type, | ||
| uint64_t | epoch, | ||
| uint64_t | seqnum, | ||
| uint64_t | authfail, | ||
| uint8_t | cid, | ||
| bool | cbit, | ||
| bool | sbit, | ||
| bool | lbit, | ||
| uint32_t | icvlen, | ||
| uint32_t | ivlen, | ||
| std::shared_ptr< jarray< uint8_t >> | iv, | ||
| uint32_t | ckeylen, | ||
| std::shared_ptr< jarray< uint8_t >> | cipherkey, | ||
| std::shared_ptr< jarray< uint8_t >> | app_traffic_secret, | ||
| uint32_t | arlen, | ||
| jarray< uint8_t > | arwin, | ||
| uint32_t | mtu | ||
| ) |
Security Association for DTLS13
| dir | - Direction of processing (ENCAP or DECAP) |
| ciphersuite | - Ciphersuite to use with TLS v1.3 |
| icvlen | - Length of the ICV tag |
| mtu | - Maximum transmition unit |
| type | - Default type of packet to send (usually Application) |
| epoch | - Initial Epoch number |
| seqnum | - Initial sequence number |
| authfail | - Initial ICV failures |
| cid | - Connection ID |
| cbit | - Indicates presence of connection ID (CID) field in variable length DTLS header |
| sbit | - Indicates length of SeqNum field in variable length DTLS header. SBIT=0 SeqNum length is 8 bits, SBIT=1 SeqNum length is 16 bits |
| lbit | - Indicates presence of length field in variable length DTLS header |
| ivlen | - Length of the initialization vector (IV) |
| iv | - Initialization Vector (IV) |
| ckeylen | - Length of the cipher key |
| cipherkey | - Key for the encryption algorithm |
| app_traffic_secret | - Per EPOCH Application Traffic Secret |
| arlen | - Number og packets to track in the replay window |
| arwin | - Anti-replay window for tracking packets |
| ProtocolPP::jdtlsa13::jdtlsa13 | ( | jdtlsa13 & | rhs | ) |
Constructor for TLS Security Association
| rhs | - Security association (SA) for this TLS flow |
|
explicit |
Constructor for TLS Security Association
| rhs | - Security association (SA) for this TLS flow |
| T ProtocolPP::jdtlsa13::get_field | ( | field_t | field | ) |
Retrieve the field from the TLS security association
| field type | field name | Example |
|---|---|---|
| direction_t | DIRECTION | direction_t mydir = get_field<direction_t>(field_t::DIRECTION) |
| tls_ciphersuite_t | CIPHERSUITE | tls_ciphersuite_t mycsuite = get_field<tls_ciphersuite_t>(field_t::CIPHERSUITE) |
| tlsver_t | VERSION | tlsver_t myver = get_field<tlsver_t>(field_t::VERSION) |
| tlstype_t | TYPE | tlstype_t mytype = get_field<tlstype_t>(field_t::TYPE) |
| uint32_t | ICVLEN | uint32_t myicvlen = get_field<uint32_t>(field_t::ICVLEN); |
| IVLEN | uint32_t myivlen = get_field<uint32_t>(field_t::IVLEN); | |
| CKEYLEN | uint32_t myckeylen = get_field<uint32_t>(field_t::CKEYLEN); | |
| ARLEN | uint32_t myarlen = get_field<uint32_t>(field_t::ARLEN); | |
| MTU | uint32_t mymtu = get_field<uint32_t>(field_t::MTU); | |
| uint64_t | EPOCH | uint64_t myepoch = get_field<uint64_t>(field_t::EPOCH); |
| uint64_t | SEQNUM | uint64_t myseqnum = get_field<uint64_t>(field_t::SEQNUM); |
| uint8_t | CID | uint8_t mycid = get_field<uint8_t>(field_t::CID); |
| bool | CBIT | bool mycbit = get_field<bool>(field_t::CBIT); |
| bool | SBIT | bool mysbit = get_field<bool>(field_t::SBIT); |
| bool | LBIT | bool mylbit = get_field<bool>(field_t::LBIT); |
| jarray<uint8_t> | ARWIN | jarray<uint8_t> myarwin = get_field<jarray<uint8_t>>(field_t::ARWIN) |
| std::shared_ptr<jarray<uint8_t>> | IV | std::shared_ptr<jarray<uint8_t>> myarwin = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::IV) |
| CIPHERKEY | std::shared_ptr<jarray<uint8_t>> myarwin = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY) |
| field | - field to retrieve |
| void ProtocolPP::jdtlsa13::set_field | ( | field_t | field, |
| T | fieldval | ||
| ) |
Update the field in the TLS security association
| field type | field name | Example |
|---|---|---|
| direction_t | DIRECTION | set_field<direction_t>(field_t::DIRECTION, direction_t::DECAP) |
| tls_ciphersuite_t | CIPHERSUITE | set_field<tls_ciphersuite_t>(field_t::CIPHERSUITE, tls_ciphersuite::TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA) |
| tlsver_t | VERSION | set_field<tlsver_t>(field_t::VERSION, tlsver_t::DTLS) |
| tlstype_t | TYPE | set_field<tlstype_t>(field_t::TYPE, tlstype_t::APPLICATION) |
| uint32_t | ICVLEN | set_field<uint32_t>(field_t::ICVLEN, 0); |
| IVLEN | set_field<uint32_t>(field_t::IVLEN, 0); | |
| CKEYLEN | set_field<uint32_t>(field_t::CKEYLEN, 0); | |
| ARLEN | set_field<uint32_t>(field_t::ARLEN, 0); | |
| MTU | set_field<uint32_t>(field_t::MTU, 0); | |
| uint64_t | EPOCH | set_field<uint64_t>(field_t::EPOCH, 0); |
| uint64_t | SEQNUM | set_field<uint64_t>(field_t::SEQNUM, 0); |
| uint8_t | CID | set_field<uint8_t>(field_t::CID, 0); |
| bool | CBIT | set_field<bool>(field_t::CBIT, false); |
| bool | SBIT | set_field<bool>(field_t::SBIT, true); |
| bool | LBIT | set_field<bool>(field_t::LBIT, true); |
| jarray<uint8_t> | ARWIN | set_field<jarray<uint8_t>>(field_t::ARWIN, jarray<uint8_t>("000000000000001")) |
| std::shared_ptr<jarray<uint8_t>> | IV | set_field<std::shared_ptr<jarray<uint8_t>>>(field_t::IV, std::make_shared<rotocolPP::jarray<uint8_t>>("000000000000001")) |
| CIPHERKEY | set_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY, std::make_shared<rotocolPP::jarray<uint8_t>>("000000000000001")) |
| field | - TLS field to update |
| fieldval | - new value for the field |
|
virtual |
Print the protocol and security objects to JSON
| myjson | - JSON object |
| direction | - facilitator for random descriptor generation |
| indent | - indentation for JSON output |
Implements ProtocolPP::jsecass.
|
virtual |
Print the protocol and security objects to XML
| myxml | - XMLPrinter object |
| direction | - facilitator for random descriptor generation |
Implements ProtocolPP::jsecass.