A generic cipher type enables cipher agility, that is, the ability to write code that runs with multiple cipher types. Ciphers can be used through the crypto kernel, or can be accessed directly, if need be.
More...
|
err_status_t | cipher_type_alloc (cipher_type_t *ctype, cipher_t **cipher, unsigned key_len) |
| Allocates a cipher of a particular type. More...
|
|
err_status_t | cipher_init (cipher_t *cipher, const uint8_t *key) |
| Initialized a cipher to use a particular key. May be invoked more than once on the same cipher. More...
|
|
err_status_t | cipher_set_iv (cipher_t *cipher, void *iv) |
| Sets the initialization vector of a given cipher. More...
|
|
err_status_t | cipher_encrypt (cipher_t *cipher, void *buf, unsigned int *len) |
| Encrypts a buffer with a given cipher. More...
|
|
err_status_t | cipher_output (cipher_t *c, uint8_t *buffer, int num_octets_to_output) |
| Sets a buffer to the keystream generated by the cipher. More...
|
|
err_status_t | cipher_dealloc (cipher_t *cipher) |
| Deallocates a cipher. More...
|
|
◆ cipher_dealloc()
err_status_t cipher_dealloc |
( |
cipher_t * |
cipher | ) |
|
- Warning
- May be implemented as a macro.
◆ cipher_encrypt()
err_status_t cipher_encrypt |
( |
cipher_t * |
cipher, |
|
|
void * |
buf, |
|
|
unsigned int * |
len |
|
) |
| |
- Warning
- May be implemented as a macro.
◆ cipher_init()
err_status_t cipher_init |
( |
cipher_t * |
cipher, |
|
|
const uint8_t * |
key |
|
) |
| |
- Warning
- May be implemented as a macro.
◆ cipher_output()
err_status_t cipher_output |
( |
cipher_t * |
c, |
|
|
uint8_t * |
buffer, |
|
|
int |
num_octets_to_output |
|
) |
| |
- Warning
- May be implemented as a macro.
◆ cipher_set_iv()
err_status_t cipher_set_iv |
( |
cipher_t * |
cipher, |
|
|
void * |
iv |
|
) |
| |
- Warning
- May be implemented as a macro.
◆ cipher_type_alloc()
err_status_t cipher_type_alloc |
( |
cipher_type_t * |
ctype, |
|
|
cipher_t ** |
cipher, |
|
|
unsigned |
key_len |
|
) |
| |
- Warning
- May be implemented as a macro.