#include <stddef.h>
#include <stdint.h>
#include "core/keys.h"
#include "core/crypt.h"
#include "core/utils.h"
Go to the source code of this file.
|
| MagmaResult | magma_encrypt_cbc (const unsigned char keys[ITER_KEYS_COUNT][ITER_KEY_LEN], const unsigned char *iv, const size_t iv_length, const unsigned char *input, unsigned char *output, const size_t length) |
| MagmaResult | magma_decrypt_cbc (const unsigned char keys[ITER_KEYS_COUNT][ITER_KEY_LEN], const unsigned char *iv, const size_t iv_length, const unsigned char *input, unsigned char *output, const size_t length) |
◆ magma_decrypt_cbc()
| MagmaResult magma_decrypt_cbc |
( |
const unsigned char | keys[ITER_KEYS_COUNT][ITER_KEY_LEN], |
|
|
const unsigned char * | iv, |
|
|
const size_t | iv_length, |
|
|
const unsigned char * | input, |
|
|
unsigned char * | output, |
|
|
const size_t | length ) |
- Parameters
-
| keys | Expanded iteration keys. |
| iv | Pointer to the IV (initialization vector). |
| iv_length | Length of the IV in bytes. |
| input | Pointer to the input data. |
| output | Pointer to the output data. |
| length | Length of the input data in bytes. |
- Returns
- MAGMA_SUCCESS on success, error code otherwise.
◆ magma_encrypt_cbc()
| MagmaResult magma_encrypt_cbc |
( |
const unsigned char | keys[ITER_KEYS_COUNT][ITER_KEY_LEN], |
|
|
const unsigned char * | iv, |
|
|
const size_t | iv_length, |
|
|
const unsigned char * | input, |
|
|
unsigned char * | output, |
|
|
const size_t | length ) |
- Parameters
-
| keys | Expanded iteration keys. |
| iv | Pointer to the IV (initialization vector). |
| iv_length | Length of the IV in bytes. |
| input | Pointer to the input data. |
| output | Pointer to the output data. |
| length | Length of the input data in bytes. |
- Returns
- MAGMA_SUCCESS on success, error code otherwise.