27 #ifndef POLARSSL_CAMELLIA_H
28 #define POLARSSL_CAMELLIA_H
30 #if !defined(POLARSSL_CONFIG_FILE)
33 #include POLARSSL_CONFIG_FILE
38 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
40 typedef UINT32 uint32_t;
45 #define CAMELLIA_ENCRYPT 1
46 #define CAMELLIA_DECRYPT 0
48 #define POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH -0x0024
49 #define POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH -0x0026
51 #if !defined(POLARSSL_CAMELLIA_ALT)
79 unsigned int keysize );
91 unsigned int keysize );
105 const unsigned char input[16],
106 unsigned char output[16] );
108 #if defined(POLARSSL_CIPHER_MODE_CBC)
127 unsigned char iv[16],
128 const unsigned char *input,
129 unsigned char *output );
132 #if defined(POLARSSL_CIPHER_MODE_CFB)
155 unsigned char iv[16],
156 const unsigned char *input,
157 unsigned char *output );
160 #if defined(POLARSSL_CIPHER_MODE_CTR)
186 unsigned char nonce_counter[16],
187 unsigned char stream_block[16],
188 const unsigned char *input,
189 unsigned char *output );
197 #include "camellia_alt.h"
int camellia_crypt_cbc(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) ...
Configuration options (set of defines)
int camellia_setkey_enc(camellia_context *ctx, const unsigned char *key, unsigned int keysize)
CAMELLIA key schedule (encryption)
int camellia_crypt_ctr(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.
int camellia_self_test(int verbose)
Checkup routine.
int camellia_crypt_cfb128(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.
CAMELLIA context structure.
int camellia_crypt_ecb(camellia_context *ctx, int mode, const unsigned char input[16], unsigned char output[16])
CAMELLIA-ECB block encryption/decryption.
int camellia_setkey_dec(camellia_context *ctx, const unsigned char *key, unsigned int keysize)
CAMELLIA key schedule (decryption)