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

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 >
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
 

Constructor & Destructor Documentation

◆ jltesa() [1/2]

ProtocolPP::jltesa::jltesa ( )

Standard Constructor with defaults

LTE/RLC Defaults
fieldDefault Value
dirdirection_t::DOWNLINK
typeprotocol_t::LTE
ciphercipher_t::SNOWE
authauth_t::SNOWA
snlen7
datctrltrue
pollfalse
exttrue
rsnfalse
pdutype0
hdrext0
pgkindex0
sdutype0
bearer0
lenind0
ptkident0
kdid0
seqnum0
hfni0x000FFFFF
fms0
nmp0
hrw0
fresh0
icvlen4
ckeylen16
akeylen16
bitmaplen0
sufi0
bitmap0
cipherkey0
authkey0
jltesa rcv;
rcv.set_field<cipher_t>(field_t::CIPHER, cipher_t::ZUCE);
rcv.set_field<uint8_t>(field_t::BEARER, 0x1E);
rcv.set_field<uint32_t>(field_t::HFNI, 0x000ABCDE);
rcv.set_field<uint32_t>(field_t::FRESH, 0x12345678);
rcv.set_field<uint32_t>(field_t::ICVLEN, 4);
rcv.set_field<uint32_t>(field_t::CKEYLEN, 16);
rcv.set_field<uint32_t>(field_t::AKEYLEN, 16);
rcv.set_field<jarray<uint8_t>>(field_t::CIPHERKEY, m_rand->getbyte(16));
rcv.set_field<jarray<uint8_t>>(field_t::AIPHERKEY, m_rand->getbyte(16));
cipher_t
Definition: jenum.h:1759

◆ jltesa() [2/2]

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

Parameters
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

Member Function Documentation

◆ get_field()

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

Returns the version field of the LTE security association

LTE/RLC Get Fields
field typefield nameExample
direction_tDIRECTIONdirection_t mydir = get_field<direction_t>(field_t::DIRECTION)
protocol_tTYPEprotocol_t mytype = get_field<protocol_t>(field_t::TYPE)
cipher_tCIPHERcipher_t mycipher = get_field<cipher_t>(field_t::CIPHER)
auth_tAUTHauth_t myauth = get_field<auth_t>(field_t::AUTH)
intSNLENint mysnlen = get_field<int>(field_t::SNLEN)
booLDATCTRLbool mydatctrl = get_field<bool>(field_t::DATCTRL)
POLLBITbool mypoll = get_field<bool>(field_t::POLLBIT)
EXTENSIONbool myext = get_field<bool>(field_t::EXTENSION)
RNbool myrn = get_field<bool>(field_t::RSN)
uint8_tPDUTYPEuint8_t mypdu = get_field<uint8_t>(field_t::PDUTYPE)
HDREXTuint8_t myhdrext = get_field<uint8_t>(field_t::HDREXT)
PGKINDEXuint8_t mypgkident = get_field<uint8_t>(field_t::PGKINDEX)
SDUTYPEuint8_t mysdutype = get_field<uint8_t>(field_t::SDUTYPE)
BEARERuint8_t mybearer = get_field<uint8_t>(field_t::BEARER)
uint16_tLENGTHINDuint16_t mylenind = get_field<uint16_t>(field_t::LENGTHIND)
PTKINDENTuint16_t ptkident = get_field<uint16_t>(field_t::PTKINDENT)
KDIDuint16_t mykdid = get_field<uint16_t>(field_t::KDID)
uint32_tSEQNUMuint32_t myseqnum = get_field<uint32_t>(field_t::SEQNUM)
HFNIuint32_t myhfni = get_field<uint32_t>(field_t::HFNI)
FMSuint32_t myfms = get_field<uint32_t>(field_t::FMS)
NMPuint32_t mynmp = get_field<uint32_t>(field_t::NMP)
HRWuint32_t myhrw = get_field<uint32_t>(field_t::HRW)
FRESHuint32_t myfresh = get_field<uint32_t>(field_t::FRESH)
ICVLENuint32_t myicvlen = get_field<uint32_t>(field_t::ICVLEN)
CKEYLENuint32_t myckeylen = get_field<uint32_t>(field_t::CKEYLEN)
AKEYLENuint32_t myakeylen = get_field<uint32_t>(field_t::AKEYLEN)
BITMAPLENuint32_t mybitmaplen = get_field<uint32_t>(field_t::BITMAPLEN)
jarray<uint8_t>SUFIjarray<uint8_t> mysufi = get_field<jarray<uint8_t>>(field_t::SUFI)
BITMAPjarray<uint8_t> mybitmap = get_field<jarray<uint8_t>>(field_t::BITMAP)
std::shared_ptr<jarray<uint8_t>>CIPHERKEYstd::shared_ptr<jarray<uint8_t>> mycipherkey = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY)
AUTHKEYstd::shared_ptr<jarray<uint8_t>> myauthkey = get_field<std::shared_ptr<jarray<uint8_t>>>(field_t::AUTHKEY)
Parameters
field- field to retrieve from the LTE security association
Returns
version field of the LTE security association

◆ set_field()

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

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

LTE/RLC Get Fields
field typefield nameExample
direction_tDIRECTIONset_field<direction_t>(field_t::DIRECTION, direction_t::UPLINK)
protocol_tTYPEset_field<protocol_t>(field_t::TYPE, protocol_t::LTE)
cipher_tCIPHERset_field<cipher_t>(field_t::CIPHER, cipher_t::ZUCE)
auth_tAUTHset_field<auth_t>(field_t::AUTH, auth_t::SNOWA)
intSNLENset_field<int>(field_t::SNLEN, 7)
boolDATCTRLset_field<bool>(field_t::DATCTRL, true)
POLLBITset_field<bool>(field_t::POLLBIT, false)
EXTENSIONset_field<bool>(field_t::EXTENSION, false)
RNset_field<bool>(field_t::RSN, true)
uint8_tPDUTYPEset_field<uint8_t>(field_t::PDUTYPE, 0x32)
HDREXTset_field<uint8_t>(field_t::HDREXT, 0xFC)
PGKINDEXset_field<uint8_t>(field_t::PGKINDEX, 0x03)
SDUTYPEset_field<uint8_t>(field_t::SDUTYPE, 0x15)
BEARERset_field<uint8_t>(field_t::BEARER, 0x54)
uint16_tLENGTHINDset_field<uint16_t>(field_t::LENGTHIND, 0x0101)
PTKINDENTset_field<uint16_t>(field_t::PTKINDENT, 0x0142)
KDIDset_field<uint16_t>(field_t::KDID, 0x3542)
uint32_tSEQNUMset_field<uint32_t>(field_t::SEQNUM, 0x00000001)
HFNIset_field<uint32_t>(field_t::HFNI, 0xFFFFFF80)
FMSset_field<uint32_t>(field_t::FMS, 0x89432178)
NMPset_field<uint32_t>(field_t::NMP, 0x43217874)
HRWset_field<uint32_t>(field_t::HRW, 0x78741122)
FRESHset_field<uint32_t>(field_t::FRESH, 0x78741122)
ICVLENset_field<uint32_t>(field_t::ICVLEN, 4)
CKEYLENset_field<uint32_t>(field_t::CKEYLEN, 16)
AKEYLENset_field<uint32_t>(field_t::AKEYLEN, 16)
BITMAPLENset_field<uint32_t>(field_t::BITMAPLEN, 128)
jarray<uint8_t>SUFIset_field<jarray<uint8_t>>(field_t::SUFI, jarray<uint8_t>("AABBCCDD"))
BITMAPset_field<jarray<uint8_t>>(field_t::BITMAP, jarray<uint8_t>("3322CCDD"))
std::shared_ptr<jarray<uint8_t>>CIPHERKEYset_field<std::shared_ptr<jarray<uint8_t>>>(field_t::CIPHERKEY, std::make_shared<jarray<uint8_t>>("3322CCDD"))
AUTHKEYset_field<std::shared_ptr<jarray<uint8_t>>>(field_t::AUTHKEY, std::make_shared<jarray<uint8_t>>("3322CCDD"))
Parameters
field- field to update the LTE security association
fieldval- value to update the LTE security association

◆ to_json()

void ProtocolPP::jltesa::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::jltesa::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: