MAGMA
Cryptographic Library
Loading...
Searching...
No Matches
ofb.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "core/keys.h"
#include "core/crypt.h"
#include "core/utils.h"
Include dependency graph for ofb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

MagmaResult magma_encrypt_ofb (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_ofb (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)

Function Documentation

◆ magma_decrypt_ofb()

MagmaResult magma_decrypt_ofb ( 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
keysExpanded iteration keys.
ivPointer to the IV (initialization vector).
iv_lengthLength of the IV in bytes.
inputPointer to the input data.
outputPointer to the output data.
lengthLength of the input data in bytes.
Returns
MAGMA_SUCCESS on success, error code otherwise.

◆ magma_encrypt_ofb()

MagmaResult magma_encrypt_ofb ( 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
keysExpanded iteration keys.
ivPointer to the IV (initialization vector).
iv_lengthLength of the IV in bytes.
inputPointer to the input data.
outputPointer to the output data.
lengthLength of the input data in bytes.
Returns
MAGMA_SUCCESS on success, error code otherwise.