Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
uint8_t authBuffer[CRYPTO_CONFIG_BLOCK_MAX_SIZE]; Buffer containing data that has been encrypted but has not
been authenticated
BLOCK_CIPHER_FunctionEncrypt encrypt; Encrypt function for the algorithm being used with the block
cipher mode module
BLOCK_CIPHER_FunctionDecrypt decrypt; Decrypt function for the algorithm being used with the block
cipher mode module
void * keyStream; Pointer to the key stream. Must be a multiple of the cipher's
block size, but smaller than 2^25 bytes.
void * keyStreamCurrentPosition; Pointer to the current position in the key stream.
uint32_t keyStreamSize; Size of the key stream.
uint32_t bytesRemainingInKeyStream; Number of bytes remaining in the key stream
uint32_t blockSize; Block size of the cipher algorithm being used with the block
cipher mode module
uint32_t cipherTextLen; Current number of ciphertext bytes computed
uint32_t authDataLen; Current number of non-ciphertext bytes authenticated
uint8_t authBufferLen; Number of bytes in the auth Buffer
uint8_t authCompleted : 1; Determines if authentication of non-encrypted data has been
completed for this device.
Module
GCM
Description
Context structure for the Galois counter operation
1.7.1.7.2 BLOCK_CIPHER_GCM_Initialize Function
Initializes a GCM context for encryption/decryption.
File
block_cipher_mode_gcm.h
Syntax
void BLOCK_CIPHER_GCM_Initialize(DRV_HANDLE handle, BLOCK_CIPHER_GCM_CONTEXT * context,
BLOCK_CIPHER_FunctionEncrypt encryptFunction, BLOCK_CIPHER_FunctionDecrypt decryptFunction,
uint32_t blockSize, uint8_t * initializationVector, uint32_t initializationVectorLen, void
* keyStream, uint32_t keyStreamSize, void * key);
Module
GCM
Returns
None.
Description
Initializes a GCM context for encryption/decryption. The user will specify details about the algorithm being used in GCM
mode.
Preconditions
Any required initialization needed by the block cipher algorithm must have been performed.
Example
// Initialize the GCM block cipher module for use with AES.
SYS_MODULE_OBJ sysObject;
DRV_HANDLE handle;
BLOCK_CIPHER_GCM_CONTEXT context;
// Initialization vector for GCM mode
static uint8_t ivValue[12] = {0xca,0xfe,0xba,0xbe,0xfa,0xce,0xdb,0xad,0xde,0xca,0xf8,0x88};
1.7 Library Interface MLA - Crypto Library Help Block Cipher Modes
74
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_crypto.pdf