#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.
◆ CTR_IV_LENGTH
◆ magma_decrypt_ctr()
| MagmaResult magma_decrypt_ctr |
( |
const unsigned char | keys[ITER_KEYS_COUNT][ITER_KEY_LEN], |
|
|
const unsigned char | iv[CTR_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). |
| 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_ctr()
| MagmaResult magma_encrypt_ctr |
( |
const unsigned char | keys[ITER_KEYS_COUNT][ITER_KEY_LEN], |
|
|
const unsigned char | iv[CTR_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). |
| 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.