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

Public Types

enum  dir_t { SNOW3G_UPLINK , SNOW3G_DOWNLINK }
 

Public Member Functions

 jsnow3g (dir_t dir, uint8_t *key, uint32_t keylen, uint32_t count, uint8_t bearer)
 
 jsnow3g (dir_t dir, uint8_t *key, uint32_t keylen, uint32_t count, uint32_t fresh)
 
 jsnow3g (dir_t dir, uint32_t *ctx, uint32_t ctxlen)
 
 ~jsnow3g ()
 Standard deconstructor.
 
void ProcessData (const uint8_t *input, uint8_t *output, int length)
 
void ProcessData (const uint8_t *input, uint64_t length)
 
void context (uint32_t *context)
 
void result (uint8_t *icv)
 
uint32_t result_size ()
 
 jsnow3g (jsnow3g &rhs)=delete
 
 jsnow3g (const jsnow3g &rhs)=delete
 

Member Enumeration Documentation

◆ dir_t

Direction of processing for SNOW3G SNOW3G_UPLINK - User to tower SNOW3G_DOWNLINK - Tower to user

Constructor & Destructor Documentation

◆ jsnow3g() [1/3]

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

Interface for Snow-3G encryption

Parameters
dir- Direction of the data
key- Key for encryption of the data
keylen- Key length for encryption of the data
count- Count value to generate key stream
bearer- Bearer value for initialize the cipher

◆ jsnow3g() [2/3]

ProtocolPP::jsnow3g::jsnow3g ( dir_t  dir,
uint8_t *  key,
uint32_t  keylen,
uint32_t  count,
uint32_t  fresh 
)

Interface for Snow-3G authentication

Parameters
dir- Direction of the data
key- Key for authentication of the data
keylen- Key length for authentication of the data
count- Count value to generate key stream
fresh- Fresh value for initialize the authenticator

◆ jsnow3g() [3/3]

ProtocolPP::jsnow3g::jsnow3g ( dir_t  dir,
uint32_t *  ctx,
uint32_t  ctxlen 
)

Interface for Snow-3G authentication

Parameters
dir- Direction of the data
ctx- Context (keystream data) to rebuild engine
ctxlen- Length of context in words (should be 19)

Member Function Documentation

◆ context()

void ProtocolPP::jsnow3g::context ( uint32_t *  context)

Retrieves the context of the engine returns current keystream context during processing, 19 word pointer expected

◆ ProcessData() [1/2]

void ProtocolPP::jsnow3g::ProcessData ( const uint8_t *  input,
uint64_t  length 
)

Authenticates the input

Parameters
input- data to authenticate
length- bit length

◆ ProcessData() [2/2]

void ProtocolPP::jsnow3g::ProcessData ( const uint8_t *  input,
uint8_t *  output,
int  length 
)

Calculates either the ciphertext or plaintext based on dir using a bitlength that is passed to the function

Parameters
input- either the ciphertext or plaintext to be calculated
output- result of encryption process
length- bit length

◆ result()

void ProtocolPP::jsnow3g::result ( uint8_t *  icv)

Retrieves the result of the authentication returns icv result of the authentication process

◆ result_size()

uint32_t ProtocolPP::jsnow3g::result_size ( )

Size of the result

Returns
size of the result or ICV

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