49#ifndef MBEDTLS_CAMELLIA_H
50#define MBEDTLS_CAMELLIA_H
52#if !defined(MBEDTLS_CONFIG_FILE)
55#include MBEDTLS_CONFIG_FILE
63#define MBEDTLS_CAMELLIA_ENCRYPT 1
64#define MBEDTLS_CAMELLIA_DECRYPT 0
66#if !defined(MBEDTLS_DEPRECATED_REMOVED)
67#define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0024 )
69#define MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA -0x0024
71#define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026
75#define MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED -0x0027
81#if !defined(MBEDTLS_CAMELLIA_ALT)
96#include "camellia_alt.h"
129 const unsigned char *
key,
130 unsigned int keybits );
145 const unsigned char *
key,
146 unsigned int keybits );
165 const unsigned char input[16],
166 unsigned char output[16] );
168#if defined(MBEDTLS_CIPHER_MODE_CBC)
200 unsigned char iv[16],
201 const unsigned char *
input,
202 unsigned char *output );
205#if defined(MBEDTLS_CIPHER_MODE_CFB)
247 unsigned char iv[16],
248 const unsigned char *
input,
249 unsigned char *output );
252#if defined(MBEDTLS_CIPHER_MODE_CTR)
330 unsigned char nonce_counter[16],
331 unsigned char stream_block[16],
332 const unsigned char *
input,
333 unsigned char *output );
336#if defined(MBEDTLS_SELF_TEST)
343int mbedtls_camellia_self_test(
int verbose );
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.
int mbedtls_camellia_crypt_cbc(mbedtls_camellia_context *ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output)
Perform a CAMELLIA-CBC buffer encryption/decryption operation.
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.
int mbedtls_camellia_crypt_cfb128(mbedtls_camellia_context *ctx, int mode, size_t length, size_t *iv_off, unsigned char iv[16], const unsigned char *input, unsigned char *output)
Perform a CAMELLIA-CFB128 buffer encryption/decryption operation.
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
CAMELLIA context structure.