49 #ifndef MBEDTLS_CAMELLIA_H
50 #define MBEDTLS_CAMELLIA_H
52 #if !defined(MBEDTLS_CONFIG_FILE)
55 #include MBEDTLS_CONFIG_FILE
61 #define MBEDTLS_CAMELLIA_ENCRYPT 1
62 #define MBEDTLS_CAMELLIA_DECRYPT 0
64 #define MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH -0x0024
65 #define MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026
66 #define MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED -0x0027
68 #if !defined(MBEDTLS_CAMELLIA_ALT)
110 unsigned int keybits );
122 unsigned int keybits );
136 const unsigned char input[16],
137 unsigned char output[16] );
139 #if defined(MBEDTLS_CIPHER_MODE_CBC)
166 unsigned char iv[16],
167 const unsigned char *input,
168 unsigned char *output );
171 #if defined(MBEDTLS_CIPHER_MODE_CFB)
202 unsigned char iv[16],
203 const unsigned char *input,
204 unsigned char *output );
207 #if defined(MBEDTLS_CIPHER_MODE_CTR)
233 unsigned char nonce_counter[16],
234 unsigned char stream_block[16],
235 const unsigned char *input,
236 unsigned char *output );
244 #include "camellia_alt.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.
int mbedtls_camellia_self_test(int verbose)
Checkup routine.
void mbedtls_camellia_free(mbedtls_camellia_context *ctx)
Clear CAMELLIA context.
Configuration options (set of defines)
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)
CAMELLIA-CFB128 buffer encryption/decryption.
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_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)
CAMELLIA-CTR buffer encryption/decryption.
void mbedtls_camellia_init(mbedtls_camellia_context *ctx)
Initialize CAMELLIA context.
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)
CAMELLIA-CBC buffer encryption/decryption Length should be a multiple of the block size (16 bytes) ...
CAMELLIA context structure.