29 #ifndef MBEDTLS_ARIA_H
30 #define MBEDTLS_ARIA_H
40 #define MBEDTLS_ARIA_ENCRYPT 1
41 #define MBEDTLS_ARIA_DECRYPT 0
43 #define MBEDTLS_ARIA_BLOCKSIZE 16
44 #define MBEDTLS_ARIA_MAX_ROUNDS 16
45 #define MBEDTLS_ARIA_MAX_KEYSIZE 32
48 #define MBEDTLS_ERR_ARIA_BAD_INPUT_DATA -0x005C
51 #define MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH -0x005E
57 #if !defined(MBEDTLS_ARIA_ALT)
64 typedef struct mbedtls_aria_context
111 const unsigned char *key,
112 unsigned int keybits );
130 const unsigned char *key,
131 unsigned int keybits );
155 unsigned char output[MBEDTLS_ARIA_BLOCKSIZE] );
157 #if defined(MBEDTLS_CIPHER_MODE_CBC)
202 unsigned char iv[MBEDTLS_ARIA_BLOCKSIZE],
203 const unsigned char *input,
204 unsigned char *output );
207 #if defined(MBEDTLS_CIPHER_MODE_CFB)
253 unsigned char iv[MBEDTLS_ARIA_BLOCKSIZE],
254 const unsigned char *input,
255 unsigned char *output );
258 #if defined(MBEDTLS_CIPHER_MODE_CTR)
339 unsigned char nonce_counter[MBEDTLS_ARIA_BLOCKSIZE],
340 unsigned char stream_block[MBEDTLS_ARIA_BLOCKSIZE],
341 const unsigned char *input,
342 unsigned char *output );
345 #if defined(MBEDTLS_SELF_TEST)
int mbedtls_aria_crypt_cfb128(mbedtls_aria_context *ctx, int mode, size_t length, size_t *iv_off, unsigned char iv[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char *input, unsigned char *output)
This function performs an ARIA-CFB128 encryption or decryption operation.
int mbedtls_aria_setkey_dec(mbedtls_aria_context *ctx, const unsigned char *key, unsigned int keybits)
This function sets the decryption key.
#define MBEDTLS_PRIVATE(member)
#define MBEDTLS_ARIA_MAX_ROUNDS
Macro wrapper for struct's memebrs.
int mbedtls_aria_crypt_ctr(mbedtls_aria_context *ctx, size_t length, size_t *nc_off, unsigned char nonce_counter[MBEDTLS_ARIA_BLOCKSIZE], unsigned char stream_block[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char *input, unsigned char *output)
This function performs an ARIA-CTR encryption or decryption operation.
Build-time configuration info.
#define MBEDTLS_ARIA_BLOCKSIZE
void mbedtls_aria_free(mbedtls_aria_context *ctx)
This function releases and clears the specified ARIA context.
int mbedtls_aria_crypt_ecb(mbedtls_aria_context *ctx, const unsigned char input[MBEDTLS_ARIA_BLOCKSIZE], unsigned char output[MBEDTLS_ARIA_BLOCKSIZE])
This function performs an ARIA single-block encryption or decryption operation.
int mbedtls_aria_self_test(int verbose)
Checkup routine.
int mbedtls_aria_setkey_enc(mbedtls_aria_context *ctx, const unsigned char *key, unsigned int keybits)
This function sets the encryption key.
void mbedtls_aria_init(mbedtls_aria_context *ctx)
This function initializes the specified ARIA context.
int mbedtls_aria_crypt_cbc(mbedtls_aria_context *ctx, int mode, size_t length, unsigned char iv[MBEDTLS_ARIA_BLOCKSIZE], const unsigned char *input, unsigned char *output)
This function performs an ARIA-CBC encryption or decryption operation on full blocks.