Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jzuc Class Reference

Public Types

enum  dir_t { ZUC_UPLINK =0x00 , ZUC_DOWNLINK =0x01 }
 

Public Member Functions

 jzuc (dir_t dir, uint8_t *key, uint32_t keylen, uint32_t count, uint8_t bearer)
 
 jzuc (dir_t dir, uint8_t *key, uint32_t keylen, uint8_t *iv, uint32_t ivlen)
 
 jzuc (dir_t dir, uint8_t *key, uint32_t keylen, uint32_t count, uint32_t bearer)
 
 jzuc (dir_t dir, uint8_t *key, uint32_t keylen, uint8_t *iv, uint32_t ivlen, uint32_t icvlen)
 
 ~jzuc ()
 Standard deconstructor.
 
void ProcessData (const uint8_t *input, uint8_t *output, uint32_t length)
 
void ProcessData (const uint8_t *input, uint32_t length)
 
void result (uint8_t *result)
 
uint32_t result_size ()
 
 jzuc (jzuc &rhs)=delete
 
 jzuc (const jzuc &rhs)=delete
 

Member Enumeration Documentation

◆ dir_t

Direction of processing for ZUC ZUC_UPLINK - User to tower ZUC_DOWNLINK - Tower to user

Constructor & Destructor Documentation

◆ jzuc() [1/4]

ProtocolPP::jzuc::jzuc ( dir_t  dir,
uint8_t *  key,
uint32_t  keylen,
uint32_t  count,
uint8_t  bearer 
)

Constructor for ZUC encryption

Parameters
dir- direction of processing
key- encryption key
keylen- length of the encryption key (16 bytes)
count- 32-bit COUNT value
bearer- bearer value

◆ jzuc() [2/4]

ProtocolPP::jzuc::jzuc ( dir_t  dir,
uint8_t *  key,
uint32_t  keylen,
uint8_t *  iv,
uint32_t  ivlen 
)

Constructor for ZUC-256 encryption and authentication

Parameters
dir- direction of processing
key- encryption key
keylen- length of the encryption key (32 bytes)
iv- initialization vector
ivlen- length of the initialization vector (25 bytes)

◆ jzuc() [3/4]

ProtocolPP::jzuc::jzuc ( dir_t  dir,
uint8_t *  key,
uint32_t  keylen,
uint32_t  count,
uint32_t  bearer 
)

Constructor for ZUC authentication with 4-byte ICV

Parameters
dir- direction of processing (ZUC_DOWNLINK, ZUC_UPLINK)
key- authentication key
keylen- length of the authentication key (16 bytes)
count- 32-bit COUNT value
bearer- bearer value

◆ jzuc() [4/4]

ProtocolPP::jzuc::jzuc ( dir_t  dir,
uint8_t *  key,
uint32_t  keylen,
uint8_t *  iv,
uint32_t  ivlen,
uint32_t  icvlen 
)

Constructor for ZUC-256 authentication

Parameters
dir- direction of processing (ZUC_DOWNLINK, ZUC_UPLINK)
key- authentication key
keylen- length of the authentication key (32 bytes)
iv- initialization vector
ivlen- length of the initialization vector (25 bytes)
icvlen- length of the ICV (4, 8, 16 for zuc256)

Member Function Documentation

◆ ProcessData() [1/2]

void ProtocolPP::jzuc::ProcessData ( const uint8_t *  input,
uint32_t  length 
)

calculates the MAC (icv)

Parameters
input- input authentication data
length- length of the input data

◆ ProcessData() [2/2]

void ProtocolPP::jzuc::ProcessData ( const uint8_t *  input,
uint8_t *  output,
uint32_t  length 
)

calculates the ciphertext/plaintext

Parameters
input- input data
output- output data
length- length of the input data

◆ result()

void ProtocolPP::jzuc::result ( uint8_t *  result)

returns the MAC (icv)

Parameters
result- ICV of length 4-bytes

◆ result_size()

uint32_t ProtocolPP::jzuc::result_size ( )

returns the length of the MAC (icv)

Returns
- length of the ICV (4 bytes for ZUC or 4, 8, or 16 for ZUC-256)

The documentation for this class was generated from the following file: