If the first serializer we find is the desired one that's ok
[openssl.git] / crypto / aria / aria.c
index a1903d9b2df502f3a6dac3770a9807287ae365e5..c1b2254af7fadc8d1154e9059d58aa3c00d2eff4 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
  * Copyright (c) 2017, Oracle and/or its affiliates.  All rights reserved.
  *
- * Licensed under the OpenSSL license (the "License").  You may not use
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
@@ -19,7 +19,7 @@
  */
 
 #include <openssl/e_os2.h>
-#include "internal/aria.h"
+#include "crypto/aria.h"
 
 #include <assert.h>
 #include <string.h>
@@ -473,13 +473,13 @@ void aria_encrypt(const unsigned char *in, unsigned char *out,
 {
     register uint32_t reg0, reg1, reg2, reg3;
     int Nr;
-
-    const ARIA_u128 *rk = key->rd_key;
+    const ARIA_u128 *rk;
 
     if (in == NULL || out == NULL || key == NULL) {
         return;
     }
 
+    rk = key->rd_key;
     Nr = key->rounds;
 
     if (Nr != 12 && Nr != 14 && Nr != 16) {
@@ -1007,7 +1007,7 @@ static void sl2(ARIA_c128 o, const ARIA_u128 *x, const ARIA_u128 *y)
 {
     unsigned int i;
     for (i = 0; i < ARIA_BLOCK_SIZE; i += 4) {
-        o[i    ] = sb3[x->c[i   ] ^ y->c[i    ]];
+        o[i    ] = sb3[x->c[i    ] ^ y->c[i    ]];
         o[i + 1] = sb4[x->c[i + 1] ^ y->c[i + 1]];
         o[i + 2] = sb1[x->c[i + 2] ^ y->c[i + 2]];
         o[i + 3] = sb2[x->c[i + 3] ^ y->c[i + 3]];