* Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
*/
+ /* Copyright (c) 2017 National Security Resarch Institute. All rights reserved. */
+
#ifndef HEADER_ARIA_H
# define HEADER_ARIA_H
# error ARIA is disabled.
# endif
-# include <stddef.h>
-
# define ARIA_ENCRYPT 1
# define ARIA_DECRYPT 0
extern "C" {
# endif
-typedef unsigned char ARIA_u128[ARIA_BLOCK_SIZE];
+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 {
- unsigned int rounds;
ARIA_u128 rd_key[ARIA_MAX_KEYS];
+ unsigned int rounds;
};
typedef struct aria_key_st ARIA_KEY;