New cipher and cipher modes standardized in Russia
authorDmitry Belyavskiy <beldmit@gmail.com>
Sun, 4 Oct 2015 09:11:26 +0000 (12:11 +0300)
committerMatt Caswell <matt@openssl.org>
Mon, 5 Oct 2015 20:55:10 +0000 (21:55 +0100)
This change introduces short names and NIDs for Russian GOST ciphers
according to GOST R 34.13-2015

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/objects/obj_dat.h
crypto/objects/obj_mac.num
crypto/objects/objects.txt
include/openssl/obj_mac.h

index 6210784d134d83879be614820786b42bc12f24c6..9fd20596ce3137113d64356e093553a7b44d9b66 100644 (file)
@@ -62,9 +62,9 @@
  * [including the GNU Public Licence.]
  */
 
-#define NUM_NID 1009
-#define NUM_SN 1002
-#define NUM_LN 1002
+#define NUM_NID 1018
+#define NUM_SN 1011
+#define NUM_LN 1011
 #define NUM_OBJ 936
 
 static const unsigned char lvalues[6604]={
@@ -2658,6 +2658,15 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={
        &(lvalues[6593]),0},
 {"issuerSignTool","Signing Tool of Issuer",NID_issuerSignTool,5,
        &(lvalues[6598]),0},
+{"gost89-cbc","gost89-cbc",NID_gost89_cbc,0,NULL,0},
+{"gost89-ecb","gost89-ecb",NID_gost89_ecb,0,NULL,0},
+{"gost89-ctr","gost89-ctr",NID_gost89_ctr,0,NULL,0},
+{"grasshopper-ecb","grasshopper-ecb",NID_grasshopper_ecb,0,NULL,0},
+{"grasshopper-ctr","grasshopper-ctr",NID_grasshopper_ctr,0,NULL,0},
+{"grasshopper-ofb","grasshopper-ofb",NID_grasshopper_ofb,0,NULL,0},
+{"grasshopper-cbc","grasshopper-cbc",NID_grasshopper_cbc,0,NULL,0},
+{"grasshopper-cfb","grasshopper-cfb",NID_grasshopper_cfb,0,NULL,0},
+{"grasshopper-mac","grasshopper-mac",NID_grasshopper_mac,0,NULL,0},
 };
 
 static const unsigned int sn_objs[NUM_SN]={
@@ -3025,10 +3034,19 @@ static const unsigned int sn_objs[NUM_SN]={
 979,   /* "gost2012_256" */
 980,   /* "gost2012_512" */
 813,   /* "gost89" */
+1009,  /* "gost89-cbc" */
 814,   /* "gost89-cnt" */
 975,   /* "gost89-cnt-12" */
+1011,  /* "gost89-ctr" */
+1010,  /* "gost89-ecb" */
 812,   /* "gost94" */
 850,   /* "gost94cc" */
+1015,  /* "grasshopper-cbc" */
+1016,  /* "grasshopper-cfb" */
+1013,  /* "grasshopper-ctr" */
+1012,  /* "grasshopper-ecb" */
+1017,  /* "grasshopper-mac" */
+1014,  /* "grasshopper-ofb" */
 797,   /* "hmacWithMD5" */
 163,   /* "hmacWithSHA1" */
 798,   /* "hmacWithSHA224" */
@@ -4053,8 +4071,17 @@ static const unsigned int ln_objs[NUM_LN]={
 601,   /* "generic cryptogram" */
 99,    /* "givenName" */
 976,   /* "gost-mac-12" */
+1009,  /* "gost89-cbc" */
 814,   /* "gost89-cnt" */
 975,   /* "gost89-cnt-12" */
+1011,  /* "gost89-ctr" */
+1010,  /* "gost89-ecb" */
+1015,  /* "grasshopper-cbc" */
+1016,  /* "grasshopper-cfb" */
+1013,  /* "grasshopper-ctr" */
+1012,  /* "grasshopper-ecb" */
+1017,  /* "grasshopper-mac" */
+1014,  /* "grasshopper-ofb" */
 855,   /* "hmac" */
 780,   /* "hmac-md5" */
 781,   /* "hmac-sha1" */
index e813b62f1c509b2b0477fd252f3a12f189df7976..ac8a1a2a63d4cf433fbef9ef5dd1a80818155d68 100644 (file)
@@ -1006,3 +1006,12 @@ OGRN             1005
 SNILS          1006
 subjectSignTool                1007
 issuerSignTool         1008
+gost89_cbc             1009
+gost89_ecb             1010
+gost89_ctr             1011
+grasshopper_ecb                1012
+grasshopper_ctr                1013
+grasshopper_ofb                1014
+grasshopper_cbc                1015
+grasshopper_cfb                1016
+grasshopper_mac                1017
index 06928c6c6a37e8b80557154fa925708c50ee5ee0..9f5f6c4e507163f5946057616a5a4a756a4dfe41 100644 (file)
@@ -1171,6 +1171,9 @@ cryptopro 20              : gost94        : GOST R 34.10-94
 cryptopro 21           : gost89                : GOST 28147-89
                        : gost89-cnt
                        : gost89-cnt-12
+                       : gost89-cbc
+                       : gost89-ecb
+                       : gost89-ctr
 !Cname id-Gost28147-89-MAC
 cryptopro 22           : gost-mac      : GOST 28147-89 MAC
                        : gost-mac-12
@@ -1280,6 +1283,14 @@ member-body 643 100 3            : SNILS : SNILS
 member-body 643 100 111        : subjectSignTool       : Signing Tool of Subject
 member-body 643 100 112        : issuerSignTool        : Signing Tool of Issuer
 
+#GOST R34.13-2015 Grasshopper "Kuznechik"
+                       : grasshopper-ecb
+                       : grasshopper-ctr
+                       : grasshopper-ofb
+                       : grasshopper-cbc
+                       : grasshopper-cfb
+                       : grasshopper-mac
+
 # Definitions for Camellia cipher - CBC MODE
 
 1 2 392 200011 61 1 1 1 2 : CAMELLIA-128-CBC           : camellia-128-cbc
index fdf5b625c8b128ad3c8dfd1dd5374578e9b33320..4388f7093105e7486b08822c0d34cbb66803e1c9 100644 (file)
 #define SN_gost89_cnt_12                "gost89-cnt-12"
 #define NID_gost89_cnt_12               975
 
+#define SN_gost89_cbc           "gost89-cbc"
+#define NID_gost89_cbc          1009
+
+#define SN_gost89_ecb           "gost89-ecb"
+#define NID_gost89_ecb          1010
+
+#define SN_gost89_ctr           "gost89-ctr"
+#define NID_gost89_ctr          1011
+
 #define SN_id_Gost28147_89_MAC          "gost-mac"
 #define LN_id_Gost28147_89_MAC          "GOST 28147-89 MAC"
 #define NID_id_Gost28147_89_MAC         815
 #define NID_issuerSignTool              1008
 #define OBJ_issuerSignTool              OBJ_member_body,643L,100L,112L
 
+#define SN_grasshopper_ecb              "grasshopper-ecb"
+#define NID_grasshopper_ecb             1012
+
+#define SN_grasshopper_ctr              "grasshopper-ctr"
+#define NID_grasshopper_ctr             1013
+
+#define SN_grasshopper_ofb              "grasshopper-ofb"
+#define NID_grasshopper_ofb             1014
+
+#define SN_grasshopper_cbc              "grasshopper-cbc"
+#define NID_grasshopper_cbc             1015
+
+#define SN_grasshopper_cfb              "grasshopper-cfb"
+#define NID_grasshopper_cfb             1016
+
+#define SN_grasshopper_mac              "grasshopper-mac"
+#define NID_grasshopper_mac             1017
+
 #define SN_camellia_128_cbc             "CAMELLIA-128-CBC"
 #define LN_camellia_128_cbc             "camellia-128-cbc"
 #define NID_camellia_128_cbc            751