Camellia block cipher. More...
#include "config.h"
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | mbedtls_camellia_context |
CAMELLIA context structure. More... | |
Defines | |
#define | MBEDTLS_CAMELLIA_ENCRYPT 1 |
#define | MBEDTLS_CAMELLIA_DECRYPT 0 |
#define | MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH -0x0024 |
#define | MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026 |
#define | MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED -0x0027 |
Functions | |
void | mbedtls_camellia_init (mbedtls_camellia_context *ctx) |
Initialize CAMELLIA context. | |
void | mbedtls_camellia_free (mbedtls_camellia_context *ctx) |
Clear CAMELLIA context. | |
int | mbedtls_camellia_setkey_enc (mbedtls_camellia_context *ctx, const unsigned char *key, unsigned int keybits) |
CAMELLIA key schedule (encryption). | |
int | mbedtls_camellia_setkey_dec (mbedtls_camellia_context *ctx, const unsigned char *key, unsigned int keybits) |
CAMELLIA key schedule (decryption). | |
int | mbedtls_camellia_crypt_ecb (mbedtls_camellia_context *ctx, int mode, const unsigned char input[16], unsigned char output[16]) |
CAMELLIA-ECB block encryption/decryption. | |
int | mbedtls_camellia_self_test (int verbose) |
Checkup routine. |
Camellia block cipher.
Definition in file camellia.h.
#define MBEDTLS_CAMELLIA_DECRYPT 0 |
Definition at line 64 of file camellia.h.
#define MBEDTLS_CAMELLIA_ENCRYPT 1 |
Definition at line 63 of file camellia.h.
#define MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED -0x0027 |
Camellia hardware accelerator failed.
Definition at line 68 of file camellia.h.
#define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026 |
Invalid data input length.
Definition at line 67 of file camellia.h.
#define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH -0x0024 |
Invalid key length.
Definition at line 66 of file camellia.h.
int mbedtls_camellia_crypt_ecb | ( | mbedtls_camellia_context * | ctx, | |
int | mode, | |||
const unsigned char | input[16], | |||
unsigned char | output[16] | |||
) |
CAMELLIA-ECB block encryption/decryption.
ctx | CAMELLIA context | |
mode | MBEDTLS_CAMELLIA_ENCRYPT or MBEDTLS_CAMELLIA_DECRYPT | |
input | 16-byte input block | |
output | 16-byte output block |
void mbedtls_camellia_free | ( | mbedtls_camellia_context * | ctx | ) |
Clear CAMELLIA context.
ctx | CAMELLIA context to be cleared |
void mbedtls_camellia_init | ( | mbedtls_camellia_context * | ctx | ) |
Initialize CAMELLIA context.
ctx | CAMELLIA context to be initialized |
int mbedtls_camellia_self_test | ( | int | verbose | ) |
Checkup routine.
int mbedtls_camellia_setkey_dec | ( | mbedtls_camellia_context * | ctx, | |
const unsigned char * | key, | |||
unsigned int | keybits | |||
) |
CAMELLIA key schedule (decryption).
ctx | CAMELLIA context to be initialized | |
key | decryption key | |
keybits | must be 128, 192 or 256 |
int mbedtls_camellia_setkey_enc | ( | mbedtls_camellia_context * | ctx, | |
const unsigned char * | key, | |||
unsigned int | keybits | |||
) |
CAMELLIA key schedule (encryption).
ctx | CAMELLIA context to be initialized | |
key | encryption key | |
keybits | must be 128, 192 or 256 |