# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- Crypto Library

1 January, 2012

- 1
- 2
…
- 111
- 112
- 113
- 114
- 115
…
- 119
- 120

randFunc A pointer to a function used to generate random numbers for
message padding.
padType The type of padding requested.
Function
int DRV_RSA_Configure(DRV_HANDLE handle, uint8_t *xBuffer, uint8_t *yBuffer,
int xLen, int yLen, DRV_RSA_RandomGet randFunc,
DRV_RSA_PAD_TYPE padType)
1.7.6.18 DRV_RSA_RandomGet Type
File
rsa.h
Syntax
typedef uint32_t (* DRV_RSA_RandomGet)(void);
Module
RSA
Description
Function pointer for the rand function type.
1.7.6.19 DRV_RSA_Encrypt Function
Encrypts a message using a public RSA key
File
rsa.h
Syntax
DRV_RSA_STATUS DRV_RSA_Encrypt(DRV_HANDLE handle, uint8_t * cipherText, uint8_t *
plainText, uint16_t msgLen, const DRV_RSA_PUBLIC_KEY * publicKey);
Module
RSA
Returns
Driver status. If running in blocking mode, the function will return DRV_RSA_STATUS_READY aftera successful encryption
operation. If running in non-blocking mode, the driver will start the encryption operation and return immediately with
DRV_RSA_STATUS_BUSY.
Description
This routine encrypts a message using a public RSA key.
Remarks
The plainText and cipherText buffers must be at least as large as the key size
The message length must not be greater than the key size
Preconditions
Driver must be opened by a client.
1.7 Library Interface MLA - Crypto Library Help RSA
113

- 1
- 2
…
- 111
- 112
- 113
- 114
- 115
…
- 119
- 120