30 #ifndef MBEDTLS_ARIA_H 31 #define MBEDTLS_ARIA_H 33 #if !defined(MBEDTLS_CONFIG_FILE) 36 #include MBEDTLS_CONFIG_FILE 42 #define MBEDTLS_ARIA_ENCRYPT 1 43 #define MBEDTLS_ARIA_DECRYPT 0 45 #define MBEDTLS_ARIA_BLOCKSIZE 16 46 #define MBEDTLS_ARIA_MAX_ROUNDS 16 47 #define MBEDTLS_ARIA_MAX_KEYSIZE 32 49 #define MBEDTLS_ERR_ARIA_INVALID_KEY_LENGTH -0x005C 50 #define MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH -0x005E 54 #define MBEDTLS_ERR_ARIA_FEATURE_UNAVAILABLE -0x005A 57 #define MBEDTLS_ERR_ARIA_HW_ACCEL_FAILED -0x0058 59 #if !defined(MBEDTLS_ARIA_ALT) 113 const unsigned char *key,
114 unsigned int keybits );
129 const unsigned char *key,
130 unsigned int keybits );
154 #if defined(MBEDTLS_CIPHER_MODE_CBC) 195 const unsigned char *input,
196 unsigned char *output );
199 #if defined(MBEDTLS_CIPHER_MODE_CFB) 239 const unsigned char *input,
240 unsigned char *output );
243 #if defined(MBEDTLS_CIPHER_MODE_CTR) 319 const unsigned char *input,
320 unsigned char *output );
323 #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.
Configuration options (set of defines)
#define MBEDTLS_ARIA_MAX_ROUNDS
The ARIA context-type definition.
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.
uint32_t rk[MBEDTLS_ARIA_MAX_ROUNDS+1][MBEDTLS_ARIA_BLOCKSIZE/4]
#define MBEDTLS_ARIA_BLOCKSIZE
void mbedtls_aria_free(mbedtls_aria_context *ctx)
This function releases and clears the specified ARIA context.
struct mbedtls_aria_context mbedtls_aria_context
The ARIA context-type definition.
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.