22#ifndef MBEDTLS_CAMELLIA_H
23#define MBEDTLS_CAMELLIA_H
25#if !defined(MBEDTLS_CONFIG_FILE)
28#include MBEDTLS_CONFIG_FILE
43#define MBEDTLS_CAMELLIA_ENCRYPT 1
44#define MBEDTLS_CAMELLIA_DECRYPT 0
46#if !defined(MBEDTLS_DEPRECATED_REMOVED)
47#define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0024 )
49#define MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA -0x0024
51#define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026
55#define MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED -0x0027
61#if !defined(MBEDTLS_CAMELLIA_ALT)
76#include "camellia_alt.h"
109 const unsigned char *key,
110 unsigned int keybits );
125 const unsigned char *key,
126 unsigned int keybits );
145 const unsigned char input[16],
146 unsigned char output[16] );
148#if defined(MBEDTLS_CIPHER_MODE_CBC)
180 unsigned char iv[16],
181 const unsigned char *input,
182 unsigned char *output );
185#if defined(MBEDTLS_CIPHER_MODE_CFB)
227 unsigned char iv[16],
228 const unsigned char *input,
229 unsigned char *output );
232#if defined(MBEDTLS_CIPHER_MODE_CTR)
310 unsigned char nonce_counter[16],
311 unsigned char stream_block[16],
312 const unsigned char *input,
313 unsigned char *output );
319#if defined(MBEDTLS_SELF_TEST)
326int mbedtls_camellia_self_test(
int verbose );
Configuration options (set of defines)
int mbedtls_camellia_setkey_enc(mbedtls_camellia_context *ctx, const unsigned char *key, unsigned int keybits)
Perform a CAMELLIA key schedule operation for encryption.
int mbedtls_camellia_crypt_ecb(mbedtls_camellia_context *ctx, int mode, const unsigned char input[16], unsigned char output[16])
Perform a CAMELLIA-ECB block encryption/decryption operation.
int mbedtls_camellia_setkey_dec(mbedtls_camellia_context *ctx, const unsigned char *key, unsigned int keybits)
Perform a CAMELLIA key schedule operation for decryption.
void mbedtls_camellia_init(mbedtls_camellia_context *ctx)
Initialize a CAMELLIA context.
void mbedtls_camellia_free(mbedtls_camellia_context *ctx)
Clear a CAMELLIA context.
int mbedtls_camellia_crypt_ctr(mbedtls_camellia_context *ctx, size_t length, size_t *nc_off, unsigned char nonce_counter[16], unsigned char stream_block[16], const unsigned char *input, unsigned char *output)
Perform a CAMELLIA-CTR buffer encryption/decryption operation.
CAMELLIA context structure.