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


Public Member Functions | |
| jltesa () | |
| jltesa (direction_t dir, protocol_t type, cipher_t cipher, auth_t auth, int snlen, bool datctrl, bool poll, bool ext, bool rsn, uint8_t pdutype, uint8_t hdrext, uint8_t pgkindex, uint8_t sdutype, uint8_t bearer, uint16_t lenind, uint16_t ptkident, uint16_t kdid, uint32_t seqnum, uint32_t hfni, uint32_t fms, uint32_t nmp, uint32_t hrw, uint32_t fresh, uint32_t icvlen, uint32_t ckeylen, uint32_t akeylen, uint32_t bitmaplen, jarray< uint8_t > sufi, jarray< uint8_t > bitmap, std::shared_ptr< jarray< uint8_t >> cipherkey, std::shared_ptr< jarray< uint8_t >> authkey) | |
| jltesa (jltesa &rhs) | |
| Standard copy constructor. | |
| jltesa (std::shared_ptr< jltesa > &rhs) | |
| Standard copy constructor from shared pointer. | |
| ~jltesa () | |
| 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) |
| jltesa (const jltesa &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::jltesa::jltesa | ( | ) |
Standard Constructor with defaults
| field | Default Value |
|---|---|
| dir | direction_t::DOWNLINK |
| type | protocol_t::LTE |
| cipher | cipher_t::SNOWE |
| auth | auth_t::SNOWA |
| snlen | 7 |
| datctrl | true |
| poll | false |
| ext | true |
| rsn | false |
| pdutype | 0 |
| hdrext | 0 |
| pgkindex | 0 |
| sdutype | 0 |
| bearer | 0 |
| lenind | 0 |
| ptkident | 0 |
| kdid | 0 |
| seqnum | 0 |
| hfni | 0x000FFFFF |
| fms | 0 |
| nmp | 0 |
| hrw | 0 |
| fresh | 0 |
| icvlen | 4 |
| ckeylen | 16 |
| akeylen | 16 |
| bitmaplen | 0 |
| sufi | 0 |
| bitmap | 0 |
| cipherkey | 0 |
| authkey | 0 |
| ProtocolPP::jltesa::jltesa | ( | direction_t | dir, |
| protocol_t | type, | ||
| cipher_t | cipher, | ||
| auth_t | auth, | ||
| int | snlen, | ||
| bool | datctrl, | ||
| bool | poll, | ||
| bool | ext, | ||
| bool | rsn, | ||
| uint8_t | pdutype, | ||
| uint8_t | hdrext, | ||
| uint8_t | pgkindex, | ||
| uint8_t | sdutype, | ||
| uint8_t | bearer, | ||
| uint16_t | lenind, | ||
| uint16_t | ptkident, | ||
| uint16_t | kdid, | ||
| uint32_t | seqnum, | ||
| uint32_t | hfni, | ||
| uint32_t | fms, | ||
| uint32_t | nmp, | ||
| uint32_t | hrw, | ||
| uint32_t | fresh, | ||
| uint32_t | icvlen, | ||
| uint32_t | ckeylen, | ||
| uint32_t | akeylen, | ||
| uint32_t | bitmaplen, | ||
| jarray< uint8_t > | sufi, | ||
| jarray< uint8_t > | bitmap, | ||
| std::shared_ptr< jarray< uint8_t >> | cipherkey, | ||
| std::shared_ptr< jarray< uint8_t >> | authkey | ||
| ) |
LTE security association
| dir | - direction either UPLINK or DOWNLINK |
| type | - Type of packet (RLC or LTE) |
| cipher | - Encryption cipher (SNOWE, ZUCE, AES_CCM, SNOWV, SNOWV_GCM) |
| auth | - Authentication method (SNOW3G, ZUCA, AES_CCM, SNOWVA) |
| snlen | - Sequence number length in bits (7 or 12 for RLC, 5, 7, 12, 15, 16, or 18 bits for LTE) |
| datctrl | - Data or Control flag bit (1-bit) |
| poll | - Polling flag. Used to request a status report from the receiver (1-bit) |
| ext | - Extension bit (1-bit) |
| rsn | - Reset sequence number (RSN) |
| pdutype | - Type of Control PDU (STATUS, RESET, RESET_ACK, RSVD, 3-bits) |
| hdrext | - Header extension flag (2-bits) |
| pgkindex | - Five LSB(s) of PGK identity |
| sdutype | - PDCP SDU type i.e., Layer-3 Protocol Data Unit (IP, ARP, PC5SIG, NONIP, RSVD) |
| bearer | - BEARER (F8) value for SNOW3G and ZUC, not for SNOWV* |
| lenind | - Length indicator |
| ptkident | - PTK identity |
| kdid | - Kd identity |
| seqnum | - Sequence Number (5, 7, 12, 15, 16, or 18 bits) |
| hfni | - Hyper Frame Number Indicator (HFNI, 20-bits) |
| fms | - PDCP SN of the First Missing PDCP SDU (FMS) |
| nmp | - Number of missing PDCP SDU(s) with associated COUNT value |
| hrw | - PDCP SN of the PDCP SDU received on WLAN with highest associated PDCP COUNT value |
| fresh | - FRESH (F9) value for SNOW3G and ZUC, not for SNOWVA |
| icvlen | - ICV length value for SNOW3G and ZUC (must be 4), and SNOWVA or SNOWV_GCM (can be 4, 8, or 16) |
| ckeylen | - Length of the encryption key |
| akeylen | - Length of the authentication key |
| bitmaplen | - Length of the packet bit map |
| sufi | - Super Field (variable number of bits) |
| bitmap | - Sounds alot like a replay window |
| cipherkey | - Encryption key |
| authkey | - Authentication key |
| T ProtocolPP::jltesa::get_field | ( | field_t | field | ) |
Returns the version field of the LTE security association
| field type | field name | Example |
|---|---|---|
| direction_t | DIRECTION | direction_t mydir = get_field<direction_t>(field_t::DIRECTION) |
| protocol_t | TYPE | protocol_t mytype = get_field<protocol_t>(field_t::TYPE) |
| cipher_t | CIPHER | cipher_t mycipher = get_field<cipher_t>(field_t::CIPHER) |
| auth_t | AUTH | auth_t myauth = get_field<auth_t>(field_t::AUTH) |
| int | SNLEN | int mysnlen = get_field<int>(field_t::SNLEN) |
| booL | DATCTRL | bool mydatctrl = get_field<bool>(field_t::DATCTRL) |
| POLLBIT | bool mypoll = get_field<bool>(field_t::POLLBIT) | |
| EXTENSION | bool myext = get_field<bool>(field_t::EXTENSION) | |
| RN | bool myrn = get_field<bool>(field_t::RSN) | |
| uint8_t | PDUTYPE | uint8_t mypdu = get_field<uint8_t>(field_t::PDUTYPE) |
| HDREXT | uint8_t myhdrext = get_field<uint8_t>(field_t::HDREXT) | |
| PGKINDEX | uint8_t mypgkident = get_field<uint8_t>(field_t::PGKINDEX) | |
| SDUTYPE | uint8_t mysdutype = get_field<uint8_t>(field_t::SDUTYPE) | |
| BEARER | uint8_t mybearer = get_field<uint8_t>(field_t::BEARER) | |
| uint16_t | LENGTHIND | uint16_t mylenind = get_field<uint16_t>(field_t::LENGTHIND) |
| PTKINDENT | uint16_t ptkident = get_field<uint16_t>(field_t::PTKINDENT) | |
| KDID | uint16_t mykdid = get_field<uint16_t>(field_t::KDID) | |
| uint32_t | SEQNUM | uint32_t myseqnum = get_field<uint32_t>(field_t::SEQNUM) |
| HFNI | uint32_t myhfni = get_field<uint32_t>(field_t::HFNI) | |
| FMS | uint32_t myfms = get_field<uint32_t>(field_t::FMS) | |
| NMP | uint32_t mynmp = get_field<uint32_t>(field_t::NMP) | |
| HRW | uint32_t myhrw = get_field<uint32_t>(field_t::HRW) | |
| FRESH | uint32_t myfresh = get_field<uint32_t>(field_t::FRESH) | |
| ICVLEN | uint32_t myicvlen = get_field<uint32_t>(field_t::ICVLEN) | |
| CKEYLEN | uint32_t myckeylen = get_field<uint32_t>(field_t::CKEYLEN) | |
| AKEYLEN | uint32_t myakeylen = get_field<uint32_t>(field_t::AKEYLEN) | |
| BITMAPLEN | uint32_t mybitmaplen = get_field<uint32_t>(field_t::BITMAPLEN) | |
| jarray<uint8_t> | SUFI | jarray<uint8_t> mysufi = get_field<jarray<uint8_t>>(field_t::SUFI) |
| BITMAP | jarray<uint8_t> mybitmap = get_field<jarray<uint8_t>>(field_t::BITMAP) | |
| std::shared_ptr<jarray<uint8_t>> | CIPHERKEY | std::shared_ptr<jarray<uint8_t>> mycipherkey = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY) |
| AUTHKEY | std::shared_ptr<jarray<uint8_t>> myauthkey = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::AUTHKEY) |
| field | - field to retrieve from the LTE security association |
| void ProtocolPP::jltesa::set_field | ( | field_t | field, |
| T | fieldval | ||
| ) |
Allows the user to update the field of the LTE security association
| field type | field name | Example |
|---|---|---|
| direction_t | DIRECTION | set_field<direction_t>(field_t::DIRECTION, direction_t::UPLINK) |
| protocol_t | TYPE | set_field<protocol_t>(field_t::TYPE, protocol_t::LTE) |
| cipher_t | CIPHER | set_field<cipher_t>(field_t::CIPHER, cipher_t::ZUCE) |
| auth_t | AUTH | set_field<auth_t>(field_t::AUTH, auth_t::SNOWA) |
| int | SNLEN | set_field<int>(field_t::SNLEN, 7) |
| bool | DATCTRL | set_field<bool>(field_t::DATCTRL, true) |
| POLLBIT | set_field<bool>(field_t::POLLBIT, false) | |
| EXTENSION | set_field<bool>(field_t::EXTENSION, false) | |
| RN | set_field<bool>(field_t::RSN, true) | |
| uint8_t | PDUTYPE | set_field<uint8_t>(field_t::PDUTYPE, 0x32) |
| HDREXT | set_field<uint8_t>(field_t::HDREXT, 0xFC) | |
| PGKINDEX | set_field<uint8_t>(field_t::PGKINDEX, 0x03) | |
| SDUTYPE | set_field<uint8_t>(field_t::SDUTYPE, 0x15) | |
| BEARER | set_field<uint8_t>(field_t::BEARER, 0x54) | |
| uint16_t | LENGTHIND | set_field<uint16_t>(field_t::LENGTHIND, 0x0101) |
| PTKINDENT | set_field<uint16_t>(field_t::PTKINDENT, 0x0142) | |
| KDID | set_field<uint16_t>(field_t::KDID, 0x3542) | |
| uint32_t | SEQNUM | set_field<uint32_t>(field_t::SEQNUM, 0x00000001) |
| HFNI | set_field<uint32_t>(field_t::HFNI, 0xFFFFFF80) | |
| FMS | set_field<uint32_t>(field_t::FMS, 0x89432178) | |
| NMP | set_field<uint32_t>(field_t::NMP, 0x43217874) | |
| HRW | set_field<uint32_t>(field_t::HRW, 0x78741122) | |
| FRESH | set_field<uint32_t>(field_t::FRESH, 0x78741122) | |
| ICVLEN | set_field<uint32_t>(field_t::ICVLEN, 4) | |
| CKEYLEN | set_field<uint32_t>(field_t::CKEYLEN, 16) | |
| AKEYLEN | set_field<uint32_t>(field_t::AKEYLEN, 16) | |
| BITMAPLEN | set_field<uint32_t>(field_t::BITMAPLEN, 128) | |
| jarray<uint8_t> | SUFI | set_field<jarray<uint8_t>>(field_t::SUFI, jarray<uint8_t>("AABBCCDD")) |
| BITMAP | set_field<jarray<uint8_t>>(field_t::BITMAP, jarray<uint8_t>("3322CCDD")) | |
| std::shared_ptr<jarray<uint8_t>> | CIPHERKEY | set_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY, std::make_shared<jarray<uint8_t>>("3322CCDD")) |
| AUTHKEY | set_field<std::shared_ptr<jarray<uint8_t>>>(field_t::AUTHKEY, std::make_shared<jarray<uint8_t>>("3322CCDD")) |
| field | - field to update the LTE security association |
| fieldval | - value to update the LTE security association |
|
virtual |
Prints the protocol object in JSON
| myjson | - JSON object to print to |
| direction | - randomzation |
| indent | - indentation for JSON output |
Implements ProtocolPP::jsecass.
|
virtual |
Prints the protocol object in XML
| myxml | - XMLPrinter object to print to |
| direction | - randomzation |
Implements ProtocolPP::jsecass.