summaryrefslogtreecommitdiffstats
path: root/crypto/objects
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2017-02-01 10:10:13 +1000
committerAndy Polyakov <appro@openssl.org>2017-02-21 11:51:45 +0100
commitd42d0a4dc7925e3ea398821028a254c94665d733 (patch)
tree4525cbb07e99c47cd4e8576b014111ccd427e398 /crypto/objects
parentad39b31c1ce0323d6f6ec44842d955f9f2556adf (diff)
Implementation of the ARIA cipher as described in RFC 5794.
This implementation is written in endian agnostic C code. No attempt at providing machine specific assembly code has been made. This implementation expands the evptests by including the test cases from RFC 5794 and ARIA official site rather than providing an individual test case. Support for ARIA has been integrated into the command line applications, but not TLS. Implemented modes are CBC, CFB1, CFB8, CFB128, CTR, ECB and OFB128. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2337)
Diffstat (limited to 'crypto/objects')
-rw-r--r--crypto/objects/obj_dat.h105
-rw-r--r--crypto/objects/obj_dat.pl4
-rw-r--r--crypto/objects/obj_mac.num21
-rw-r--r--crypto/objects/objects.pl4
-rw-r--r--crypto/objects/objects.txt35
5 files changed, 159 insertions, 10 deletions
diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h
index 8de2592341..93843e16c2 100644
--- a/crypto/objects/obj_dat.h
+++ b/crypto/objects/obj_dat.h
@@ -2,7 +2,7 @@
* WARNING: do not edit!
* Generated by crypto/objects/obj_dat.pl
*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
* Licensed under the OpenSSL license (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
@@ -10,7 +10,7 @@
*/
/* Serialized OID's */
-static const unsigned char so[6765] = {
+static const unsigned char so[6900] = {
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 0] OBJ_rsadsi */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 6] OBJ_pkcs */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 13] OBJ_md2 */
@@ -961,9 +961,24 @@ static const unsigned char so[6765] = {
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x13, /* [ 6731] OBJ_id_smime_ct_contentCollection */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x17, /* [ 6742] OBJ_id_smime_ct_authEnvelopedData */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x1C, /* [ 6753] OBJ_id_ct_xml */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x01, /* [ 6764] OBJ_aria_128_ecb */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x02, /* [ 6773] OBJ_aria_128_cbc */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x03, /* [ 6782] OBJ_aria_128_cfb128 */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x04, /* [ 6791] OBJ_aria_128_ofb128 */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x05, /* [ 6800] OBJ_aria_128_ctr */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x06, /* [ 6809] OBJ_aria_192_ecb */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x07, /* [ 6818] OBJ_aria_192_cbc */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x08, /* [ 6827] OBJ_aria_192_cfb128 */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x09, /* [ 6836] OBJ_aria_192_ofb128 */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x0A, /* [ 6845] OBJ_aria_192_ctr */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x0B, /* [ 6854] OBJ_aria_256_ecb */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x0C, /* [ 6863] OBJ_aria_256_cbc */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x0D, /* [ 6872] OBJ_aria_256_cfb128 */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x0E, /* [ 6881] OBJ_aria_256_ofb128 */
+ 0x2A,0x83,0x1A,0x8C,0x9A,0x6E,0x01,0x01,0x0F, /* [ 6890] OBJ_aria_256_ctr */
};
-#define NUM_NID 1065
+#define NUM_NID 1086
static const ASN1_OBJECT nid_objs[NUM_NID] = {
{"UNDEF", "undefined", NID_undef},
{"rsadsi", "RSA Data Security, Inc.", NID_rsadsi, 6, &so[0]},
@@ -2030,9 +2045,30 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = {
{"SipHash", "siphash", NID_siphash},
{"KxANY", "kx-any", NID_kx_any},
{"AuthANY", "auth-any", NID_auth_any},
+ {"ARIA-128-ECB", "aria-128-ecb", NID_aria_128_ecb, 9, &so[6764]},
+ {"ARIA-128-CBC", "aria-128-cbc", NID_aria_128_cbc, 9, &so[6773]},
+ {"ARIA-128-CFB", "aria-128-cfb", NID_aria_128_cfb128, 9, &so[6782]},
+ {"ARIA-128-OFB", "aria-128-ofb", NID_aria_128_ofb128, 9, &so[6791]},
+ {"ARIA-128-CTR", "aria-128-ctr", NID_aria_128_ctr, 9, &so[6800]},
+ {"ARIA-192-ECB", "aria-192-ecb", NID_aria_192_ecb, 9, &so[6809]},
+ {"ARIA-192-CBC", "aria-192-cbc", NID_aria_192_cbc, 9, &so[6818]},
+ {"ARIA-192-CFB", "aria-192-cfb", NID_aria_192_cfb128, 9, &so[6827]},
+ {"ARIA-192-OFB", "aria-192-ofb", NID_aria_192_ofb128, 9, &so[6836]},
+ {"ARIA-192-CTR", "aria-192-ctr", NID_aria_192_ctr, 9, &so[6845]},
+ {"ARIA-256-ECB", "aria-256-ecb", NID_aria_256_ecb, 9, &so[6854]},
+ {"ARIA-256-CBC", "aria-256-cbc", NID_aria_256_cbc, 9, &so[6863]},
+ {"ARIA-256-CFB", "aria-256-cfb", NID_aria_256_cfb128, 9, &so[6872]},
+ {"ARIA-256-OFB", "aria-256-ofb", NID_aria_256_ofb128, 9, &so[6881]},
+ {"ARIA-256-CTR", "aria-256-ctr", NID_aria_256_ctr, 9, &so[6890]},
+ {"ARIA-128-CFB1", "aria-128-cfb1", NID_aria_128_cfb1},
+ {"ARIA-192-CFB1", "aria-192-cfb1", NID_aria_192_cfb1},
+ {"ARIA-256-CFB1", "aria-256-cfb1", NID_aria_256_cfb1},
+ {"ARIA-128-CFB8", "aria-128-cfb8", NID_aria_128_cfb8},
+ {"ARIA-192-CFB8", "aria-192-cfb8", NID_aria_192_cfb8},
+ {"ARIA-256-CFB8", "aria-256-cfb8", NID_aria_256_cfb8},
};
-#define NUM_SN 1056
+#define NUM_SN 1077
static const unsigned int sn_objs[NUM_SN] = {
364, /* "AD_DVCS" */
419, /* "AES-128-CBC" */
@@ -2067,6 +2103,27 @@ static const unsigned int sn_objs[NUM_SN] = {
960, /* "AES-256-OCB" */
428, /* "AES-256-OFB" */
914, /* "AES-256-XTS" */
+ 1066, /* "ARIA-128-CBC" */
+ 1067, /* "ARIA-128-CFB" */
+ 1080, /* "ARIA-128-CFB1" */
+ 1083, /* "ARIA-128-CFB8" */
+ 1069, /* "ARIA-128-CTR" */
+ 1065, /* "ARIA-128-ECB" */
+ 1068, /* "ARIA-128-OFB" */
+ 1071, /* "ARIA-192-CBC" */
+ 1072, /* "ARIA-192-CFB" */
+ 1081, /* "ARIA-192-CFB1" */
+ 1084, /* "ARIA-192-CFB8" */
+ 1074, /* "ARIA-192-CTR" */
+ 1070, /* "ARIA-192-ECB" */
+ 1073, /* "ARIA-192-OFB" */
+ 1076, /* "ARIA-256-CBC" */
+ 1077, /* "ARIA-256-CFB" */
+ 1082, /* "ARIA-256-CFB1" */
+ 1085, /* "ARIA-256-CFB8" */
+ 1079, /* "ARIA-256-CTR" */
+ 1075, /* "ARIA-256-ECB" */
+ 1078, /* "ARIA-256-OFB" */
1064, /* "AuthANY" */
1049, /* "AuthDSS" */
1047, /* "AuthECDSA" */
@@ -3092,7 +3149,7 @@ static const unsigned int sn_objs[NUM_SN] = {
160, /* "x509Crl" */
};
-#define NUM_LN 1056
+#define NUM_LN 1077
static const unsigned int ln_objs[NUM_LN] = {
363, /* "AD Time Stamping" */
405, /* "ANSI X9.62" */
@@ -3311,6 +3368,27 @@ static const unsigned int ln_objs[NUM_LN] = {
428, /* "aes-256-ofb" */
914, /* "aes-256-xts" */
376, /* "algorithm" */
+ 1066, /* "aria-128-cbc" */
+ 1067, /* "aria-128-cfb" */
+ 1080, /* "aria-128-cfb1" */
+ 1083, /* "aria-128-cfb8" */
+ 1069, /* "aria-128-ctr" */
+ 1065, /* "aria-128-ecb" */
+ 1068, /* "aria-128-ofb" */
+ 1071, /* "aria-192-cbc" */
+ 1072, /* "aria-192-cfb" */
+ 1081, /* "aria-192-cfb1" */
+ 1084, /* "aria-192-cfb8" */
+ 1074, /* "aria-192-ctr" */
+ 1070, /* "aria-192-ecb" */
+ 1073, /* "aria-192-ofb" */
+ 1076, /* "aria-256-cbc" */
+ 1077, /* "aria-256-cfb" */
+ 1082, /* "aria-256-cfb1" */
+ 1085, /* "aria-256-cfb8" */
+ 1079, /* "aria-256-ctr" */
+ 1075, /* "aria-256-ecb" */
+ 1078, /* "aria-256-ofb" */
484, /* "associatedDomain" */
485, /* "associatedName" */
501, /* "audio" */
@@ -4152,7 +4230,7 @@ static const unsigned int ln_objs[NUM_LN] = {
125, /* "zlib compression" */
};
-#define NUM_OBJ 956
+#define NUM_OBJ 971
static const unsigned int obj_objs[NUM_OBJ] = {
0, /* OBJ_undef 0 */
181, /* OBJ_iso 1 */
@@ -4797,6 +4875,21 @@ static const unsigned int obj_objs[NUM_OBJ] = {
439, /* OBJ_pilotAttributeSyntax 0 9 2342 19200300 100 3 */
440, /* OBJ_pilotObjectClass 0 9 2342 19200300 100 4 */
441, /* OBJ_pilotGroups 0 9 2342 19200300 100 10 */
+ 1065, /* OBJ_aria_128_ecb 1 2 410 200046 1 1 1 */
+ 1066, /* OBJ_aria_128_cbc 1 2 410 200046 1 1 2 */
+ 1067, /* OBJ_aria_128_cfb128 1 2 410 200046 1 1 3 */
+ 1068, /* OBJ_aria_128_ofb128 1 2 410 200046 1 1 4 */
+ 1069, /* OBJ_aria_128_ctr 1 2 410 200046 1 1 5 */
+ 1070, /* OBJ_aria_192_ecb 1 2 410 200046 1 1 6 */
+ 1071, /* OBJ_aria_192_cbc 1 2 410 200046 1 1 7 */
+ 1072, /* OBJ_aria_192_cfb128 1 2 410 200046 1 1 8 */
+ 1073, /* OBJ_aria_192_ofb128 1 2 410 200046 1 1 9 */
+ 1074, /* OBJ_aria_192_ctr 1 2 410 200046 1 1 10 */
+ 1075, /* OBJ_aria_256_ecb 1 2 410 200046 1 1 11 */
+ 1076, /* OBJ_aria_256_cbc 1 2 410 200046 1 1 12 */
+ 1077, /* OBJ_aria_256_cfb128 1 2 410 200046 1 1 13 */
+ 1078, /* OBJ_aria_256_ofb128 1 2 410 200046 1 1 14 */
+ 1079, /* OBJ_aria_256_ctr 1 2 410 200046 1 1 15 */
997, /* OBJ_id_tc26_gost_3410_2012_512_paramSetTest 1 2 643 7 1 2 1 2 0 */
998, /* OBJ_id_tc26_gost_3410_2012_512_paramSetA 1 2 643 7 1 2 1 2 1 */
999, /* OBJ_id_tc26_gost_3410_2012_512_paramSetB 1 2 643 7 1 2 1 2 2 */
diff --git a/crypto/objects/obj_dat.pl b/crypto/objects/obj_dat.pl
index 1cb3d1c9af..947cceed1d 100644
--- a/crypto/objects/obj_dat.pl
+++ b/crypto/objects/obj_dat.pl
@@ -1,5 +1,5 @@
#! /usr/bin/env perl
-# Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
@@ -154,7 +154,7 @@ print OUT <<'EOF';
* WARNING: do not edit!
* Generated by crypto/objects/obj_dat.pl
*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
* Licensed under the OpenSSL license (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
diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num
index 5ca5260fb1..270e7e51a6 100644
--- a/crypto/objects/obj_mac.num
+++ b/crypto/objects/obj_mac.num
@@ -1062,3 +1062,24 @@ poly1305 1061
siphash 1062
kx_any 1063
auth_any 1064
+aria_128_ecb 1065
+aria_128_cbc 1066
+aria_128_cfb128 1067
+aria_128_ofb128 1068
+aria_128_ctr 1069
+aria_192_ecb 1070
+aria_192_cbc 1071
+aria_192_cfb128 1072
+aria_192_ofb128 1073
+aria_192_ctr 1074
+aria_256_ecb 1075
+aria_256_cbc 1076
+aria_256_cfb128 1077
+aria_256_ofb128 1078
+aria_256_ctr 1079
+aria_128_cfb1 1080
+aria_192_cfb1 1081
+aria_256_cfb1 1082
+aria_128_cfb8 1083
+aria_192_cfb8 1084
+aria_256_cfb8 1085
diff --git a/crypto/objects/objects.pl b/crypto/objects/objects.pl
index 3b40277a23..6598b5e700 100644
--- a/crypto/objects/objects.pl
+++ b/crypto/objects/objects.pl
@@ -1,5 +1,5 @@
#! /usr/bin/env perl
-# Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
@@ -129,7 +129,7 @@ print OUT <<'EOF';
* WARNING: do not edit!
* Generated by crypto/objects/objects.pl
*
- * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
* Licensed under the OpenSSL license (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
diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt
index 0d189f8b4a..442b39caa3 100644
--- a/crypto/objects/objects.txt
+++ b/crypto/objects/objects.txt
@@ -1363,6 +1363,41 @@ camellia 50 : CAMELLIA-256-CMAC : camellia-256-cmac
: CAMELLIA-192-CFB8 : camellia-192-cfb8
: CAMELLIA-256-CFB8 : camellia-256-cfb8
+# Definitions for ARIA cipher
+
+!Alias aria 1 2 410 200046 1 1
+aria 1 : ARIA-128-ECB : aria-128-ecb
+aria 2 : ARIA-128-CBC : aria-128-cbc
+!Cname aria-128-cfb128
+aria 3 : ARIA-128-CFB : aria-128-cfb
+!Cname aria-128-ofb128
+aria 4 : ARIA-128-OFB : aria-128-ofb
+aria 5 : ARIA-128-CTR : aria-128-ctr
+
+aria 6 : ARIA-192-ECB : aria-192-ecb
+aria 7 : ARIA-192-CBC : aria-192-cbc
+!Cname aria-192-cfb128
+aria 8 : ARIA-192-CFB : aria-192-cfb
+!Cname aria-192-ofb128
+aria 9 : ARIA-192-OFB : aria-192-ofb
+aria 10 : ARIA-192-CTR : aria-192-ctr
+
+aria 11 : ARIA-256-ECB : aria-256-ecb
+aria 12 : ARIA-256-CBC : aria-256-cbc
+!Cname aria-256-cfb128
+aria 13 : ARIA-256-CFB : aria-256-cfb
+!Cname aria-256-ofb128
+aria 14 : ARIA-256-OFB : aria-256-ofb
+aria 15 : ARIA-256-CTR : aria-256-ctr
+
+# There are no OIDs for these ARIA modes...
+ : ARIA-128-CFB1 : aria-128-cfb1
+ : ARIA-192-CFB1 : aria-192-cfb1
+ : ARIA-256-CFB1 : aria-256-cfb1
+ : ARIA-128-CFB8 : aria-128-cfb8
+ : ARIA-192-CFB8 : aria-192-cfb8
+ : ARIA-256-CFB8 : aria-256-cfb8
+
# Definitions for SEED cipher - ECB, CBC, OFB mode
member-body 410 200004 : KISA : kisa