|
enum | dir_t { SNOWV_DEC
, SNOWV_ENC
} |
|
enum | mode_t { SNOWV
, SNOWV_GCM
} |
|
|
| jsnowv (dir_t dir, mode_t mode, uint8_t *key, uint32_t keylen, uint8_t *iv, uint32_t ivlen) |
|
| ~jsnowv () |
| Standard deconstructor.
|
|
void | ProcessData (const uint8_t *input, uint8_t *output, int length, uint8_t *aad=nullptr, int aadlen=0) |
|
void | context (uint16_t *ctx) |
|
void | result (uint8_t *icv, uint32_t icvlen) |
|
uint32_t | result_size () |
|
| jsnowv (jsnowv &rhs)=delete |
|
| jsnowv (const jsnowv &rhs)=delete |
|
◆ dir_t
Direction of processing for SNOWV SNOWV_DEC - Decrypt data SNOWV_ENC - Encrypt data
◆ mode_t
Mode of operation for SNOWV SNOWV - Stream mode for SNOWV SNOWV_GCM - GCM AEAD mode for SNOWV
◆ jsnowv()
ProtocolPP::jsnowv::jsnowv |
( |
dir_t |
dir, |
|
|
mode_t |
mode, |
|
|
uint8_t * |
key, |
|
|
uint32_t |
keylen, |
|
|
uint8_t * |
iv, |
|
|
uint32_t |
ivlen |
|
) |
| |
Interface for SnowV encryption
- Parameters
-
dir | - Direction of the data |
mode | - Mode of operation (SNOWV or SNOWV_GCM) |
key | - Key for encryption of the data |
keylen | - Key length for encryption of the data |
iv | - Initialization vector |
ivlen | - IV length for encryption of the data |
◆ context()
void ProtocolPP::jsnowv::context |
( |
uint16_t * |
ctx | ) |
|
Returns the keystream state for rebuilding the engine later
- Parameters
-
ctx | - context ordered as a, b, r1, r2, r3 as 44 uint16_t |
◆ ProcessData()
void ProtocolPP::jsnowv::ProcessData |
( |
const uint8_t * |
input, |
|
|
uint8_t * |
output, |
|
|
int |
length, |
|
|
uint8_t * |
aad = nullptr , |
|
|
int |
aadlen = 0 |
|
) |
| |
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 |
aad | - authentication only data (should be nullptr for SNOWV mode) |
aadlen | - length of the authentication only data (should be zero for SNOWV mode) |
◆ result()
void ProtocolPP::jsnowv::result |
( |
uint8_t * |
icv, |
|
|
uint32_t |
icvlen |
|
) |
| |
Returns the calculated ICV
- Parameters
-
icv | - calculated ICV |
icvlen | - length of the ICV (must be 16) |
◆ result_size()
uint32_t ProtocolPP::jsnowv::result_size |
( |
| ) |
|
Size of the result
- Returns
- size of the result or ICV
The documentation for this class was generated from the following file: