]> wagner.pp.ru Git - openssl-gost/engine.git/blob - patches/1.0.2/cipher_modes.diff
Merge pull request #27 from levitte/separate-lib-and-eng
[openssl-gost/engine.git] / patches / 1.0.2 / cipher_modes.diff
1 diff -uNr crypto/objects_orig/obj_dat.h crypto/objects/obj_dat.h
2 --- crypto/objects_orig/obj_dat.h       2015-10-06 20:43:14.000000000 +0300
3 +++ crypto/objects/obj_dat.h    2015-10-06 20:45:53.000000000 +0300
4 @@ -62,9 +62,9 @@
5   * [including the GNU Public Licence.]
6   */
7  
8 -#define NUM_NID 991
9 -#define NUM_SN 984
10 -#define NUM_LN 984
11 +#define NUM_NID 1000
12 +#define NUM_SN 993
13 +#define NUM_LN 993
14  #define NUM_OBJ 921
15  
16  static const unsigned char lvalues[6485]={
17 @@ -2611,6 +2611,15 @@
18  {"INN","INN",NID_INN,8,&(lvalues[6466]),0},
19  {"OGRN","OGRN",NID_OGRN,5,&(lvalues[6474]),0},
20  {"SNILS","SNILS",NID_SNILS,5,&(lvalues[6479]),0},
21 +{"gost89-cbc","gost89-cbc",NID_gost89_cbc,0,NULL,0},
22 +{"gost89-ecb","gost89-ecb",NID_gost89_ecb,0,NULL,0},
23 +{"gost89-ctr","gost89-ctr",NID_gost89_ctr,0,NULL,0},
24 +{"grasshopper-ecb","grasshopper-ecb",NID_grasshopper_ecb,0,NULL,0},
25 +{"grasshopper-ctr","grasshopper-ctr",NID_grasshopper_ctr,0,NULL,0},
26 +{"grasshopper-ofb","grasshopper-ofb",NID_grasshopper_ofb,0,NULL,0},
27 +{"grasshopper-cbc","grasshopper-cbc",NID_grasshopper_cbc,0,NULL,0},
28 +{"grasshopper-cfb","grasshopper-cfb",NID_grasshopper_cfb,0,NULL,0},
29 +{"grasshopper-mac","grasshopper-mac",NID_grasshopper_mac,0,NULL,0},
30  };
31  
32  static const unsigned int sn_objs[NUM_SN]={
33 @@ -2964,10 +2973,19 @@
34  963,   /* "gost2012_256" */
35  964,   /* "gost2012_512" */
36  813,   /* "gost89" */
37 +991,   /* "gost89-cbc" */
38  814,   /* "gost89-cnt" */
39  959,   /* "gost89-cnt-12" */
40 +993,   /* "gost89-ctr" */
41 +992,   /* "gost89-ecb" */
42  812,   /* "gost94" */
43  850,   /* "gost94cc" */
44 +997,   /* "grasshopper-cbc" */
45 +998,   /* "grasshopper-cfb" */
46 +995,   /* "grasshopper-ctr" */
47 +994,   /* "grasshopper-ecb" */
48 +999,   /* "grasshopper-mac" */
49 +996,   /* "grasshopper-ofb" */
50  797,   /* "hmacWithMD5" */
51  163,   /* "hmacWithSHA1" */
52  798,   /* "hmacWithSHA224" */
53 @@ -3971,8 +3989,17 @@
54  601,   /* "generic cryptogram" */
55  99,    /* "givenName" */
56  960,   /* "gost-mac-12" */
57 +991,   /* "gost89-cbc" */
58  814,   /* "gost89-cnt" */
59  959,   /* "gost89-cnt-12" */
60 +993,   /* "gost89-ctr" */
61 +992,   /* "gost89-ecb" */
62 +997,   /* "grasshopper-cbc" */
63 +998,   /* "grasshopper-cfb" */
64 +995,   /* "grasshopper-ctr" */
65 +994,   /* "grasshopper-ecb" */
66 +999,   /* "grasshopper-mac" */
67 +996,   /* "grasshopper-ofb" */
68  855,   /* "hmac" */
69  780,   /* "hmac-md5" */
70  781,   /* "hmac-sha1" */
71 diff -uNr crypto/objects_orig/objects.txt crypto/objects/objects.txt
72 --- crypto/objects_orig/objects.txt     2015-10-06 20:43:14.000000000 +0300
73 +++ crypto/objects/objects.txt  2015-10-06 20:45:45.000000000 +0300
74 @@ -1171,6 +1171,9 @@
75  cryptopro 21           : gost89                : GOST 28147-89
76                         : gost89-cnt
77                         : gost89-cnt-12
78 +                       : gost89-cbc
79 +                       : gost89-ecb
80 +                       : gost89-ctr
81  !Cname id-Gost28147-89-MAC
82  cryptopro 22           : gost-mac      : GOST 28147-89 MAC
83                         : gost-mac-12
84 @@ -1278,6 +1281,14 @@
85  member-body 643 100 1          : OGRN  : OGRN
86  member-body 643 100 3          : SNILS : SNILS
87  
88 +#GOST R34.13-2015 Grasshopper "Kuznechik"
89 +                       : grasshopper-ecb
90 +                       : grasshopper-ctr
91 +                       : grasshopper-ofb
92 +                       : grasshopper-cbc
93 +                       : grasshopper-cfb
94 +                       : grasshopper-mac
95 +
96  # Definitions for Camellia cipher - CBC MODE
97  
98  1 2 392 200011 61 1 1 1 2 : CAMELLIA-128-CBC           : camellia-128-cbc
99 diff -uNr crypto/objects_orig/obj_mac.h crypto/objects/obj_mac.h
100 --- crypto/objects_orig/obj_mac.h       2015-10-06 20:43:14.000000000 +0300
101 +++ crypto/objects/obj_mac.h    2015-10-06 20:45:52.000000000 +0300
102 @@ -3723,6 +3723,15 @@
103  #define SN_gost89_cnt_12                "gost89-cnt-12"
104  #define NID_gost89_cnt_12               959
105  
106 +#define SN_gost89_cbc           "gost89-cbc"
107 +#define NID_gost89_cbc          991
108 +
109 +#define SN_gost89_ecb           "gost89-ecb"
110 +#define NID_gost89_ecb          992
111 +
112 +#define SN_gost89_ctr           "gost89-ctr"
113 +#define NID_gost89_ctr          993
114 +
115  #define SN_id_Gost28147_89_MAC          "gost-mac"
116  #define LN_id_Gost28147_89_MAC          "GOST 28147-89 MAC"
117  #define NID_id_Gost28147_89_MAC         815
118 @@ -4031,6 +4040,24 @@
119  #define NID_SNILS               990
120  #define OBJ_SNILS               OBJ_member_body,643L,100L,3L
121  
122 +#define SN_grasshopper_ecb              "grasshopper-ecb"
123 +#define NID_grasshopper_ecb             994
124 +
125 +#define SN_grasshopper_ctr              "grasshopper-ctr"
126 +#define NID_grasshopper_ctr             995
127 +
128 +#define SN_grasshopper_ofb              "grasshopper-ofb"
129 +#define NID_grasshopper_ofb             996
130 +
131 +#define SN_grasshopper_cbc              "grasshopper-cbc"
132 +#define NID_grasshopper_cbc             997
133 +
134 +#define SN_grasshopper_cfb              "grasshopper-cfb"
135 +#define NID_grasshopper_cfb             998
136 +
137 +#define SN_grasshopper_mac              "grasshopper-mac"
138 +#define NID_grasshopper_mac             999
139 +
140  #define SN_camellia_128_cbc             "CAMELLIA-128-CBC"
141  #define LN_camellia_128_cbc             "camellia-128-cbc"
142  #define NID_camellia_128_cbc            751
143 diff -uNr crypto/objects_orig/obj_mac.num crypto/objects/obj_mac.num
144 --- crypto/objects_orig/obj_mac.num     2015-10-06 20:43:14.000000000 +0300
145 +++ crypto/objects/obj_mac.num  2015-10-06 20:45:51.000000000 +0300
146 @@ -988,3 +988,12 @@
147  INN            988
148  OGRN           989
149  SNILS          990
150 +gost89_cbc             991
151 +gost89_ecb             992
152 +gost89_ctr             993
153 +grasshopper_ecb                994
154 +grasshopper_ctr                995
155 +grasshopper_ofb                996
156 +grasshopper_cbc                997
157 +grasshopper_cfb                998
158 +grasshopper_mac                999