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


Public Member Functions | |
| jwifisa () | |
| jwifisa (direction_t dir, protocol_t mode, cipher_t cipher, auth_t auth, auth_t kdfalg, uint64_t addr1, uint64_t addr2, uint64_t addr3, uint64_t addr4, uint64_t pn, uint16_t framectl, wifictlext_t ctlext, uint16_t id, uint16_t seqctl, uint16_t qosctl, uint32_t htctl, uint8_t keyid, uint32_t icvlen, uint32_t ckeylen, std::shared_ptr< jarray< uint8_t >> cipherkey, uint32_t arlen, jarray< uint8_t > arwin, bool extiv, bool fcs, bool sppcap) | |
| jwifisa (jwifisa &rhs) | |
| jwifisa (std::shared_ptr< jwifisa > &rhs) | |
| ~jwifisa () | |
| 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) |
| jwifisa (const jwifisa &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::jwifisa::jwifisa | ( | ) |
Standard constructor with default settings
| field | Default Value |
|---|---|
| dir | direction_t::ENCAP |
| mode | protocol_t::WIFI (or WIGIG) |
| cipher | cipher_t::AES_CCM |
| auth | cipher_t::NULL_AUTH |
| kdfalg | auth_t::SHA256 |
| addr1 | 0 |
| addr2 | 0 |
| addr3 | 0 |
| addr4 | 0 |
| pn | 0 |
| framectl | 0 |
| ctlext | 0 |
| id | 0 |
| seqctl | 0 |
| qosctl | 0 |
| htctl | 0 |
| keyid | 0 |
| icvlen | 8 |
| ckeylen | 16 |
| arlen | 0 |
| arwin | 0 |
| extiv | true |
| fcs | true |
| sppcap | false |
| cipherkey | 0 |
| ProtocolPP::jwifisa::jwifisa | ( | direction_t | dir, |
| protocol_t | mode, | ||
| cipher_t | cipher, | ||
| auth_t | auth, | ||
| auth_t | kdfalg, | ||
| uint64_t | addr1, | ||
| uint64_t | addr2, | ||
| uint64_t | addr3, | ||
| uint64_t | addr4, | ||
| uint64_t | pn, | ||
| uint16_t | framectl, | ||
| wifictlext_t | ctlext, | ||
| uint16_t | id, | ||
| uint16_t | seqctl, | ||
| uint16_t | qosctl, | ||
| uint32_t | htctl, | ||
| uint8_t | keyid, | ||
| uint32_t | icvlen, | ||
| uint32_t | ckeylen, | ||
| std::shared_ptr< jarray< uint8_t >> | cipherkey, | ||
| uint32_t | arlen, | ||
| jarray< uint8_t > | arwin, | ||
| bool | extiv, | ||
| bool | fcs, | ||
| bool | sppcap | ||
| ) |
Security Association for Wifi/WiGig
| dir | - Direction of processing (ENCAP or DECAP) |
| mode | - Protocol (either WIFI or WIGIG) |
| cipher | - Mode of encryption (AES_GCM, AES_CCM, SM4_GCM, SM4_CCM, NULL_CIPHER) |
| auth | - Mode of authentication (AES_CMAC, AES_GMAC, NULL_AUTH) |
| kdfalg | - Key derivation function (KDF) algorithm (SHA1, SHA256, SHA384, SHA512) |
| addr1 | - First address |
| addr2 | - Second address |
| addr3 | - Third address |
| addr4 | - Fourth address |
| pn | - Six byte packet number |
| framectl | - Frame control sequence |
| ctlext | - Control frame extension |
| id | - Duration Identification |
| seqctl | - Sequence control |
| qosctl | - Quality of Service (QoS) control |
| htctl | - High Traffic (HT) control |
| keyid | - Key identification field |
| icvlen | - length of the ICV |
| ckeylen | - length of the key |
| cipherkey | - Key for the encryption algorithm |
| arlen | - Number of packets to track with replay window |
| arwin | - Anti-replay window for tracking packets |
| extiv | - Extended IV (always present for CCMP) |
| fcs | - Enables CRC-32 for the packet |
| sppcap | - SPP A-MSDU Capable field |
| ProtocolPP::jwifisa::jwifisa | ( | jwifisa & | rhs | ) |
Constructor for Wifi
| rhs | - Security association (SA) for this Wifi flow |
|
explicit |
Constructor for Wifi
| rhs | - Security association (SA) for this Wifi flow |
| T ProtocolPP::jwifisa::get_field | ( | field_t | field | ) |
Retrieve the field from the Wifi security association
| field type | field name | Example |
|---|---|---|
| direction_t | DIRECTION | direction_t tmp = get_field<direction_t>(field_t::DIRECTION) |
| protocol_t | MODE | protocol_t tmp = get_field<protocol_t>(field_t::MODE) |
| cipher_t | CIPHER | cipher_t tmp = get_field<cipher_t>(field_t::CIPHER) |
| auth_t | KDFALG | auth_t tmp = get_field<auth_t>(field_t::KDFALG) |
| AUTH | auth_t tmp = get_field<auth_t>(field_t::AUTH) | |
| wifictlext_t | CTLEXT | wifictlext_t tmp = get_field<wifictlext_t>(field_t::CTLEXT) |
| bool | EXTIV | bool tmp = get_field<bool>(field_t::EXTIV) |
| FCS | bool tmp = get_field<bool>(field_t::FCS) | |
| SPPCAP | bool tmp = get_field<bool>(field_t::COUNT) | |
| uint8_t | KEYID | uint8_t tmp = get_field<uint8_t>(field_t::KEYID) |
| uint16_t | FRAMECTL | uint16_t tmp = get_field<uint8_t>(field_t::FRAMECTL) |
| ID | uint16_t tmp = get_field<uint8_t>(field_t::ID) | |
| SEQCTL | uint16_t tmp = get_field<uint8_t>(field_t::SEQCTL) | |
| QOSCTL | uint16_t tmp = get_field<uint8_t>(field_t::QOSCTL) | |
| uint32_t | HTCTL | uint32_t tmp = get_field<uint32_t>(field_t::HTCTL) |
| ICVLEN | uint32_t tmp = get_field<uint32_t>(field_t::ICVLEN) | |
| CKEYLEN | uint32_t tmp = get_field<uint32_t>(field_t::CKEYLEN) | |
| ARLEN | uint32_t tmp = get_field<uint32_t>(field_t::ARLEN) | |
| uint64_t | ADDR1 | uint64_t tmp = get_field<uint64_t>(field_t::ADDR1) |
| ADDR2 | uint64_t tmp = get_field<uint64_t>(field_t::ADDR2) | |
| ADDR3 | uint64_t tmp = get_field<uint64_t>(field_t::ADDR3) | |
| ADDR4 | uint64_t tmp = get_field<uint64_t>(field_t::ADDR4) | |
| PN | uint64_t tmp = get_field<uint64_t>(field_t::PN) | |
| jarray<uint8_t> | ARWIN | jarray<uint8_t> tmp = get_field<jarray<uint8_t>>(field_t::ARWIN) |
| CIPHERKEY | jarray<uint8_t> tmp = get_field<jarray<uint8_t>>(field_t::CIPHERKEY) | |
| std::shared_ptr<jarray<uint8_t>> | ARWIN | std::shared_ptr<jarray<uint8_t>> tmp = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::ARWIN) |
| CIPHERKEY | std::shared_ptr<jarray<uint8_t>> tmp = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY) |
| field | - field to retrieve |
| void ProtocolPP::jwifisa::set_field | ( | field_t | field, |
| T | fieldval | ||
| ) |
Update Wifi field with the new value
| field type | field name | Example |
|---|---|---|
| direction_t | DIRECTION | set_field<direction_t>(field_t::DIRECTION, direction_t::ENC) |
| protocol_t | MODE | set_field<protocol_t>(field_t::MODE, protocol_t::WIGIG) |
| cipher_t | CIPHER | set_field<cipher_t>(field_t::CIPHER, cipher_t::AES_CCM) |
| auth_t | KDFALG | set_field<auth_t>(field_t::KDFALG, auth_t::SHA384) |
| AUTH | set_field<auth_t>(field_t::AUTH, auth_t::SHA256) | |
| wifictlext_t | CTLEXT | set_field<wifictlext_t>(field_t::CTLEXT, wifictlext_t::POLL) |
| bool | EXTIV | set_field<bool>(field_t::EXTIV, true) |
| FCS | set_field<bool>(field_t::FCS, false) | |
| SPPCAP | set_field<bool>(field_t::COUNT, true) | |
| uint8_t | KEYID | set_field<uint8_t>(field_t::KEYID, 5) |
| uint16_t | FRAMECTL | set_field<uint8_t>(field_t::FRAMECTL, 0x1100) |
| ID | set_field<uint8_t>(field_t::ID, 0x1355) | |
| SEQCTL | set_field<uint8_t>(field_t::SEQCTL, 0x0811) | |
| QOSCTL | set_field<uint8_t>(field_t::QOSCTL, 0x1FC0) | |
| uint32_t | HTCTL | set_field<uint32_t>(field_t::HTCTL, 8) |
| ICVLEN | set_field<uint32_t>(field_t::ICVLEN, 12) | |
| CKEYLEN | set_field<uint32_t>(field_t::CKEYLEN, 16) | |
| ARLEN | set_field<uint32_t>(field_t::ARLEN, 1024) | |
| uint64_t | ADDR1 | set_field<uint64_t>(field_t::ADDR1, 0x0102030405060708) |
| ADDR1 | set_field<uint64_t>(field_t::ADDR1, 0x2102030405060708) | |
| ADDR1 | set_field<uint64_t>(field_t::ADDR1, 0x3102030405060708) | |
| ADDR1 | set_field<uint64_t>(field_t::ADDR1, 0x4102030405060708) | |
| PN | set_field<uint64_t>(field_t::PN, 0x1102034405067708) | |
| jarray<uint8_t> | ARWIN | set_field<jarray<uint8_t>>(field_t::ARWIN, myarwin) |
| CIPHERKEY | set_field<jarray<uint8_t>>(field_t::CIPHERKEY, mykey) | |
| std::shared_ptr<jarray<uint8_t>> | ARWIN | set_field<std::shared_ptr<jarray<uint8_t>>>(field_t::ARWIN, myarwinptr) |
| CIPHERKEY | set_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY, mykeyptr) |
| field | - field to update |
| fieldval | - new value for the field |
|
virtual |
Print the protocol and security objects to JSON
| myjson | - JSON object to print with |
| direction | - facilitator for random generation |
| indent | - indentation for JSON output |
Implements ProtocolPP::jsecass.
|
virtual |
Print the protocol and security objects to XML
| myxml | - XMLPrinter object to print with |
| direction | - facilitator for random generation |
Implements ProtocolPP::jsecass.