2 * Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 /* ====================================================================
11 * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
14 /* Copyright (c) 2017 National Security Resarch Institute. All rights reserved. */
17 # define HEADER_ARIA_H
19 # include <openssl/opensslconf.h>
21 # ifdef OPENSSL_NO_ARIA
22 # error ARIA is disabled.
25 # define ARIA_ENCRYPT 1
26 # define ARIA_DECRYPT 0
28 # define ARIA_BLOCK_SIZE 16 /* Size of each encryption/decription block */
29 # define ARIA_MAX_KEYS 17 /* Number of keys needed in the worst case */
36 unsigned char c[ARIA_BLOCK_SIZE];
37 unsigned int u[ARIA_BLOCK_SIZE / sizeof(unsigned int)];
41 ARIA_u128 rd_key[ARIA_MAX_KEYS];
44 typedef struct aria_key_st ARIA_KEY;
47 int aria_set_encrypt_key(const unsigned char *userKey, const int bits,
49 int aria_set_decrypt_key(const unsigned char *userKey, const int bits,
52 void aria_encrypt(const unsigned char *in, unsigned char *out,