23 #ifndef MBEDTLS_CAMELLIA_H 24 #define MBEDTLS_CAMELLIA_H 26 #if !defined(MBEDTLS_CONFIG_FILE) 29 #include MBEDTLS_CONFIG_FILE 35 #define MBEDTLS_CAMELLIA_ENCRYPT 1 36 #define MBEDTLS_CAMELLIA_DECRYPT 0 38 #define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH -0x0024 39 #define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026 41 #if !defined(MBEDTLS_CAMELLIA_ALT) 57 mbedtls_camellia_context;
64 void mbedtls_camellia_init( mbedtls_camellia_context *ctx );
71 void mbedtls_camellia_free( mbedtls_camellia_context *ctx );
82 int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx,
const unsigned char *key,
83 unsigned int keybits );
94 int mbedtls_camellia_setkey_dec( mbedtls_camellia_context *ctx,
const unsigned char *key,
95 unsigned int keybits );
107 int mbedtls_camellia_crypt_ecb( mbedtls_camellia_context *ctx,
109 const unsigned char input[16],
110 unsigned char output[16] );
112 #if defined(MBEDTLS_CIPHER_MODE_CBC) 136 int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx,
139 unsigned char iv[16],
140 const unsigned char *input,
141 unsigned char *output );
144 #if defined(MBEDTLS_CIPHER_MODE_CFB) 171 int mbedtls_camellia_crypt_cfb128( mbedtls_camellia_context *ctx,
175 unsigned char iv[16],
176 const unsigned char *input,
177 unsigned char *output );
180 #if defined(MBEDTLS_CIPHER_MODE_CTR) 203 int mbedtls_camellia_crypt_ctr( mbedtls_camellia_context *ctx,
206 unsigned char nonce_counter[16],
207 unsigned char stream_block[16],
208 const unsigned char *input,
209 unsigned char *output );
217 #include "camellia_alt.h" int mbedtls_camellia_self_test(int verbose)
Checkup routine.
Configuration options (set of defines)