1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
-
- #ifndef OSSL_CRYPTO_ARIA_H
- # define OSSL_CRYPTO_ARIA_H
- # include <openssl/opensslconf.h>
- # ifdef OPENSSL_NO_ARIA
- # error ARIA is disabled.
- # endif
- # define ARIA_ENCRYPT 1
- # define ARIA_DECRYPT 0
- # define ARIA_BLOCK_SIZE 16
- # define ARIA_MAX_KEYS 17
- typedef union {
- unsigned char c[ARIA_BLOCK_SIZE];
- unsigned int u[ARIA_BLOCK_SIZE / sizeof(unsigned int)];
- } ARIA_u128;
- typedef unsigned char ARIA_c128[ARIA_BLOCK_SIZE];
- struct aria_key_st {
- ARIA_u128 rd_key[ARIA_MAX_KEYS];
- unsigned int rounds;
- };
- typedef struct aria_key_st ARIA_KEY;
- int aria_set_encrypt_key(const unsigned char *userKey, const int bits,
- ARIA_KEY *key);
- int aria_set_decrypt_key(const unsigned char *userKey, const int bits,
- ARIA_KEY *key);
- void aria_encrypt(const unsigned char *in, unsigned char *out,
- const ARIA_KEY *key);
- #endif
|