-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cc
680 lines (588 loc) · 21 KB
/
test.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
#include "graph_t.h"
#include "algorithm_define.h"
#include "al_base.h"
#include <iostream>
#include <fstream>
#include <set>
#include <map>
#include <deque>
#include <vector>
#include <algorithm>
#define NO_SINGLE 0 //0:包含单个 1:不包含单个
#define LEN 4 //最长的组合(2-5)
#define TYPE 0 //0:所有组合 1:去除特殊单元级联 2:只有抑或
using std::cout;
using std::endl;
using std::vector;
using std::deque;
using std::string;
using std::set;
using std::pair;
using std::map;
using std::multimap;
std::ofstream out("output");
std::ofstream out_round("data_in_round");
std::ofstream out_al("data_in_al");
std::map<string, set<int>> mix = std::map<string, set<int>>();
vector<deque<al_protocol::element>> key_path = vector<deque<al_protocol::element>>();
vector<string> al_str = {"AES","DES","IDEA","BLOWFISH","CAMELLIA","CAST128","GOST","RC5","SEED","TWOFISH",
"SM4","RC6","SERPENT","TEA","XTEA","SKIPJECT",
/*new added*/ "SPECK","SIMON","LUCIFER","CLEFIA","ARIA","C2","PRESENT","MACGUFFIN","SQUARE",
"M6","ICE","SHARK","CS_CIPHER","NUSH","GRAND_CRU","Q","E2","KHAZAD",
"HIEROCRYPT_L1","HIEROCRYPT_3"};
void print_element(int i){
switch(i){
case 300: out<<"X2A1"; break;
case 81: out<<"AESX2"; break;
case 70: out<<"BR"; break;
case 20: out<<"AND"; break;
case 21: out<<"OR"; break;
case 10: out<<"NOT"; break;
case 60: out<<"XOR"; break;
case 520: out<<"LUT"; break;
case 270: out<<"MAS"; break;
case 271: out<<"SH"; break;
case 900: out<<"MM"; break;
case 800: out<<"GFM"; break;
case 500: out<<"PER"; break;
case 61: out<<"PBOX"; break;
default: out<<"error element,the delay is:"<<i<<endl; break;
}
}
string element_to_string (al_protocol::element i){
switch(i){
case al_protocol::X2A1: return "X2A1";
case al_protocol::AESX2: return "AESX2";
case al_protocol::BR: return "BR";
case al_protocol::AND: return "AND";
case al_protocol::NOT: return "NOT";
case al_protocol::XOR: return "XOR";
case al_protocol::OR: return "OR";
case al_protocol::LUT: return "LUT";
case al_protocol::MAS: return "MAS";
case al_protocol::SH: return "SH";
case al_protocol::MM: return "MM";
case al_protocol::GFM: return "GFM";
case al_protocol::PER: return "PER";
case al_protocol::PBOX: return "PBOX";
default: out<<"error element,the delay is:"<<i<<endl; return string();
}
}
//***********************************
//算子组合
//***********************************
bool isspecial(al_protocol::element in){
switch(in){
case al_protocol::X2A1: return true;
case al_protocol::AESX2: return true;
case al_protocol::PBOX: return true;
case al_protocol::LUT: return true;
case al_protocol::MM: return true;
case al_protocol::GFM: return true;
default: return false;
}
}
void mix_temp(std::map<string, set<int>> &mix,deque<al_protocol::element> &de, int delay, int al, int type=0){
int i = de.size();
string s = string();
int c_delay = 0;
bool go = false;
bool sp = false;
while(i-- >0){
for(size_t j=0;j<de.size();j++){
c_delay += int(de[j]);
if(type==0) go = (j>=LEN)?false:c_delay <= delay;
else if(type==1){
if(isspecial(de[j])){
if(sp) go=false;
else{
sp=true;
go = (j>=LEN)?false:c_delay <= delay;
}
}
else
go = (j>=LEN)?false:c_delay <= delay;
}
else if(type==2){
if(de[j]!=al_protocol::XOR)
go=false;
else
go=c_delay <= delay;
}
else {
out<<"error:错误的type..."<<endl;
go = false;
}
if(go){
s = s + element_to_string(de[j]) + " ";
mix[s + "| the delay is: " + std::to_string(c_delay/1000.0) + " ns"].insert(al);
}
else
break;
}
sp=false;
s.clear();
c_delay = 0;
de.push_back(*(de.begin()));//头入尾
de.pop_front();//头出队,成环
}
}
void do_mix(std::map<string, set<int>> &mix, vector<deque<al_protocol::element>> &key_path, int delay){
for(unsigned i = 0; i<key_path.size(); i++){
mix_temp(mix,key_path[i], delay, i, TYPE);
}
}
void print_mix(std::map<string, set<int>> &mix){
for (std::map<string, set<int>>::iterator i = mix.begin(); i != mix.end(); i++){
#if NO_SINGLE
if(i->second.size()==1) continue;
#endif
out << "组合类型: " << i->first << endl;
out << "算法个数: " << i->second.size() << " 分别是:" << endl;
for (int j : i->second)
out << al_str[j] << " ";
out << endl;
}
}
void print_center(std::map<string, set<int>> &mix, string center){
std::multimap<int, std::map<string, set<int>>::iterator> sorted;
for (std::map<string, set<int>>::iterator i = mix.begin(); i != mix.end(); i++){
if((i->first).find(center)!=string::npos){
#if NO_SINGLE
if(i->second.size()==1) continue;
#endif
sorted.insert(std::make_pair(i->second.size(),i));
}
else continue;
}
std::multimap<int,std::map<string, set<int>>::iterator>::iterator beg=sorted.begin();
while(beg!=sorted.end()){
out << "组合类型: " << beg->second->first << endl;
out << "算法个数: " << beg->second->second.size() << " 分别是:" << endl;
for (int j : beg->second->second)
out << al_str[j] << " ";
out << endl;
++beg;
}
}
void print_center_pre(std::map<string, set<int>> &mix, string center) {
std::multimap<int, std::map<string, set<int>>::iterator> sorted;
int s_size = center.size();
for (std::map<string, set<int>>::iterator i = mix.begin(); i != mix.end(); i++) {
//if (i->first.substr(0,s_size)==center)
if(i->first.find(center)==0){
#if NO_SINGLE
if (i->second.size() == 1) continue;
#endif
sorted.insert(std::make_pair(i->second.size(), i));
}
else continue;
}
std::multimap<int, std::map<string, set<int>>::iterator>::iterator beg = sorted.begin();
while (beg != sorted.end()) {
out << "组合类型: " << beg->second->first << endl;
out << "算法个数: " << beg->second->second.size() << " 分别是:" << endl;
for (int j : beg->second->second)
out << al_str[j] << " ";
out << endl;
++beg;
}
}
void print_center_post(std::map<string, set<int>> &mix, string center) {
std::multimap<int, std::map<string, set<int>>::iterator> sorted;
int s_size = center.size();
for (std::map<string, set<int>>::iterator i = mix.begin(); i != mix.end(); i++) {
if(i->first.rfind(center)!=string::npos && i->first[i->first.rfind(center)+s_size+1]=='|'){
#if NO_SINGLE
if (i->second.size() == 1) continue;
#endif
sorted.insert(std::make_pair(i->second.size(), i));
}
else continue;
}
std::multimap<int, std::map<string, set<int>>::iterator>::iterator beg = sorted.begin();
while (beg != sorted.end()) {
out << "组合类型: " << beg->second->first << endl;
out << "算法个数: " << beg->second->second.size() << " 分别是:" << endl;
for (int j : beg->second->second)
out << al_str[j] << " ";
out << endl;
++beg;
}
}
void print_center(void(*ptr)(std::map<string, set<int>> &mix, string center)){
out << endl << endl << "***********SH*********" << endl;
ptr(mix, "SH");
out << endl << endl << "***********MAS*********" << endl;
ptr(mix, "MAS");
out << endl << endl << "***********MM*********" << endl;
ptr(mix, "MM");
out << endl << endl << "***********LUT*********" << endl;
ptr(mix, "LUT");
out << endl << endl << "***********GFM*********" << endl;
ptr(mix, "GFM");
out << endl << endl << "***********PER*********" << endl;
ptr(mix, "PER");
out << endl << endl << "***********BR*********" << endl;
ptr(mix, "BR");
}
//**********************************
//中心算子的合理前后缀
//特殊算子:1.找到第一个,往前后扩展(有效范围内:左(起点或者上一次的匹配点(不允许两个同时出现)),往后扩展(末尾,下一个匹配点);到末尾结束)
//sh\mas\等:跳过特殊算子:记录哪些是特殊算子
//**********************************
//**********************************
//逻辑组合的选择
//
//**********************************
al_base* build_al(string type){
al_base *re;
vector<al_protocol::element> ie;
if(type=="AES"){
ie = {al_protocol::LUT,al_protocol::BR,
al_protocol::GFM,al_protocol::XOR};
re = new al_base(type,10, 32, 5, ie);
}
else if(type=="DES"){
ie = {al_protocol::PER, al_protocol::XOR,
al_protocol::LUT};
re = new al_base(type,16,32,7,ie);
}
else if(type=="IDEA"){
ie = {al_protocol::MM, al_protocol::MAS,
al_protocol::XOR};
re = new al_base(type,8,16,23,ie);
}
else if(type=="BLOWFISH"){
ie = {al_protocol::LUT, al_protocol::XOR,
al_protocol::MAS};
re = new al_base(type,16,32,14,ie);
}
else if(type=="CAMELLIA"){
ie = {al_protocol::LUT, al_protocol::XOR,
al_protocol::PER};
re = new al_base(type,18,32,8,ie);
}
else if(type=="CAST128"){
ie = {al_protocol::XOR, al_protocol::SH,
al_protocol::LUT, al_protocol::MAS};
re = new al_base(type,16,32,14,ie);
}
else if(type=="GOST"){
ie = {al_protocol::XOR, al_protocol::SH,
al_protocol::LUT, al_protocol::MAS};
re = new al_base(type,32,32,5,ie);
}
// else if(type=="KASUMI"){
// ie =
// re = new al_base(type,32,32,5,ie);
// }
else if(type=="RC5"){
ie = {al_protocol::XOR, al_protocol::SH,
al_protocol::MAS};
re = new al_base(type,24,32,4,ie);
}
else if(type=="SEED"){
ie = {al_protocol::XOR, al_protocol::LUT,
al_protocol::MAS};
re = new al_base(type,16,32,24,ie);
}
else if(type=="TWOFISH"){
ie = {al_protocol::XOR, al_protocol::LUT,
al_protocol::GFM, al_protocol::MAS,
al_protocol::SH};
re = new al_base(type,16,32,20,ie);
}
else if(type=="SM4"){
ie = {al_protocol::XOR, al_protocol::LUT,
al_protocol::SH};
re = new al_base(type,32,32,9,ie);
}
else if(type=="RC6"){
ie = {al_protocol::MAS, al_protocol::LUT,al_protocol::X2A1,
al_protocol::SH, al_protocol::XOR};
re = new al_base(type,20,32,15,ie);
}
else if(type=="SERPENT"){
ie = {al_protocol::SH, al_protocol::XOR,
al_protocol::MAS, al_protocol::LUT};
re = new al_base(type,32,32,19,ie);
}
else if(type=="TEA"){
ie = {al_protocol::XOR, al_protocol::SH,
al_protocol::MAS};
re = new al_base(type,32,32,11,ie);
}
else if(type=="XTEA"){
ie = {al_protocol::XOR, al_protocol::SH,
al_protocol::MAS};
re = new al_base(type,32,32,10,ie);
}
else if(type=="SKIPJECT"){
ie = {al_protocol::XOR, al_protocol::LUT};
re = new al_base(type,32,32,15,ie);
}
//*********************new added***************************
else if(type=="SPECK"){
ie = {al_protocol::XOR, al_protocol::MAS, al_protocol::SH, al_protocol::BR};
re = new al_base(type,22,32,8,ie);
}
else if(type=="SIMON"){
ie = {al_protocol::XOR, al_protocol::AND, al_protocol::SH, al_protocol::BR};
re = new al_base(type,42,32,10,ie);
}
else if(type=="LUCIFER"){
ie = {al_protocol::XOR, al_protocol::MAS, al_protocol::LUT, al_protocol::PBOX};
re = new al_base(type,16,32,5,ie);
}
else if(type=="CLEFIA"){
ie = {al_protocol::XOR, al_protocol::GFM, al_protocol::LUT};
re = new al_base(type,18,32,5,ie);
}
else if(type=="ARIA"){
ie = {al_protocol::XOR, al_protocol::GFM, al_protocol::LUT};
re = new al_base(type,12,32,4,ie);
}
else if(type=="C2"){
ie = {al_protocol::XOR, al_protocol::MAS, al_protocol::LUT, al_protocol::SH};
re = new al_base(type,10,32,12,ie);
}
else if(type=="PRESENT"){
ie = {al_protocol::XOR, al_protocol::LUT, al_protocol::PER};
re = new al_base(type,31,4,4,ie);
}
else if(type=="MACGUFFIN"){
ie = {al_protocol::XOR, al_protocol::LUT, al_protocol::SH};
re = new al_base(type,32,8,5,ie);
}
else if(type=="SQUARE"){
ie = {al_protocol::XOR, al_protocol::LUT, al_protocol::GFM, al_protocol::PER};
re = new al_base(type,8,32,5,ie);
}
else if(type=="M6"){
ie = {al_protocol::XOR, al_protocol::SH, al_protocol::MAS};
re = new al_base(type,10,32,11,ie);
}
else if(type=="ICE"){
ie = {al_protocol::XOR, al_protocol::PER, al_protocol::LUT};
re = new al_base(type,16,32,7,ie);
}
else if(type=="SHARK"){
ie = {al_protocol::XOR, al_protocol::GFM, al_protocol::LUT};
re = new al_base(type,6,8,4,ie);
}
else if(type=="CS_CIPHER"){
ie = {al_protocol::XOR, al_protocol::AND, al_protocol::LUT, al_protocol::SH};
re = new al_base(type,24,8,12,ie);
}
else if(type=="NUSH"){
ie = {al_protocol::XOR, al_protocol::AND, al_protocol::OR, al_protocol::SH, al_protocol::MAS};
re = new al_base(type,17,32,13,ie);
}
else if(type=="GRAND_CRU"){
ie = {al_protocol::XOR, al_protocol::LUT, al_protocol::GFM, al_protocol::BR, al_protocol::PER};
re = new al_base(type,10,32,6,ie);
}
else if(type=="Q"){
ie = {al_protocol::XOR, al_protocol::LUT, al_protocol::BR, al_protocol::PER};
re = new al_base(type,8,32,12,ie);
}
else if(type=="E2"){
ie = {al_protocol::XOR, al_protocol::LUT};
re = new al_base(type,12,8,9,ie);
}
else if(type=="KHAZAD"){
ie = {al_protocol::XOR, al_protocol::LUT, al_protocol::GFM};
re = new al_base(type,8,8,4,ie);
}
else if(type=="HIEROCRYPT_L1"){
ie = {al_protocol::XOR, al_protocol::LUT, al_protocol::GFM};
re = new al_base(type,6.5,8,7,ie);
}
else if(type=="HIEROCRYPT_3"){
ie = {al_protocol::XOR, al_protocol::LUT, al_protocol::GFM};
re = new al_base(type,8.5,8,7,ie);
}
re->init_graph(init_al_graph,type);
return re;
}
void print_al_inf(std::ofstream &out, std::ofstream &out_round, std::ofstream &out_al,
vector<deque<al_protocol::element>> &key_path, al_base *al){
std::vector<al_protocol::element> al_r;
int delay;
al->key_path(al_r,delay);
key_path.push_back(deque<al_protocol::element>(al_r.begin(),al_r.end()));
out<<"the critical path of "<<al->getname()<<" is:"<<endl;
for(al_protocol::element i:al_r){
print_element(i);
out<<" -> "<<endl;
}
out<<"the total delay of a round is :"<<delay/1000.0<<"ns"<<endl;
al_protocol::element maxe;
al->max_delay_element(maxe);
out<<"the max_delay_element is :"<<maxe/1000.0<<"ns"<<endl;
//input for k-means
out_round.flags(std::ios::left);
out_round << setw(16) << al->getname() << " " << delay / 1000.0 << endl;
out_al << setiosflags(std::ios::left) << setw(16)<<al->getname()<<" "<<(delay/1000.0)*(al->getround())<<endl;
}
int main(){
al_base *al;
//*************AES******************
out <<"*************1.AES****************" << endl;
al = build_al("AES");
print_al_inf(out, out_round, out_al, key_path, al);
//*************DES*******************
out << endl<<"*************2.DES****************" << endl;
al = build_al("DES");
print_al_inf(out, out_round, out_al, key_path, al);
//**************IDEA******************
out << endl << "*************3.IDEA*************" << endl;
al = build_al("IDEA");
print_al_inf(out, out_round, out_al, key_path, al);
//**************BLOWFISH******************
out << endl << "*************4.BLOWFISH*************" << endl;
al = build_al("BLOWFISH");
print_al_inf(out, out_round, out_al, key_path, al);
//**************CAMELLIA******************
out << endl << "*************5.CAMELLIA*************" << endl;
al = build_al("CAMELLIA");
print_al_inf(out, out_round, out_al, key_path, al);
//**************CAST128******************
out << endl << "*************6.CAST128*************" << endl;
al = build_al("CAST128");
print_al_inf(out, out_round, out_al, key_path, al);
//**************GOST******************
out << endl << "*************7.GOST*************" << endl;
al = build_al("GOST");
print_al_inf(out, out_round, out_al, key_path, al);
//**************KASUMI******************
// out << endl << "*************KASUMI*************" << endl;
// al = build_al("KASUMI");
// print_al_inf(out, out_round, out_al, key_path, al);
//**************RC5******************
out << endl << "*************8.RC5*************" << endl;
al = build_al("RC5");
print_al_inf(out, out_round, out_al, key_path, al);
//**************SEED******************
out << endl << "*************9.SEED*************" << endl;
al = build_al("SEED");
print_al_inf(out, out_round, out_al, key_path, al);
//**************TWOFISH******************
out << endl << "*************10.TWOFISH*************" << endl;
al = build_al("TWOFISH");
print_al_inf(out, out_round, out_al, key_path, al);
//**************SM4******************
out << endl << "*************11.SM4*************" << endl;
al = build_al("SM4");
print_al_inf(out, out_round, out_al, key_path, al);
//**************RC6******************
out << endl << "*************12.RC6*************" << endl;
al = build_al("RC6");
print_al_inf(out, out_round, out_al, key_path, al);
//**************SERPENT******************
out << endl << "*************13.SERPENT*************" << endl;
al = build_al("SERPENT");
print_al_inf(out, out_round, out_al, key_path, al);
//**************TEA******************
out << endl << "*************14.TEA*************" << endl;
al = build_al("TEA");
print_al_inf(out, out_round, out_al, key_path, al);
//**************XTEA******************
out << endl << "*************15.XTEA*************" << endl;
al = build_al("XTEA");
print_al_inf(out, out_round, out_al, key_path, al);
//**************SKIPJECT******************
out << endl << "*************16.SKIPJECT*************" << endl;
al = build_al("SKIPJECT");
print_al_inf(out, out_round, out_al, key_path, al);
//***************************************************************
// new added
//***************************************************************
//**************SPECK******************
out << endl << "*************17.SPECK*************" << endl;
al = build_al("SPECK");
print_al_inf(out, out_round, out_al, key_path, al);
//**************SIMON******************
out << endl << "*************18.SIMON*************" << endl;
al = build_al("SIMON");
print_al_inf(out, out_round, out_al, key_path, al);
//**************LUCIFER******************
out << endl << "*************19.LUCIFER*************" << endl;
al = build_al("LUCIFER");
print_al_inf(out, out_round, out_al, key_path, al);
//**************CLEFIA******************
out << endl << "*************20.CLEFIA*************" << endl;
al = build_al("CLEFIA");
print_al_inf(out, out_round, out_al, key_path, al);
//**************ARIA******************
out << endl << "*************21.ARIA*************" << endl;
al = build_al("ARIA");
print_al_inf(out, out_round, out_al, key_path, al);
//**************C2******************
out << endl << "*************22.C2*************" << endl;
al = build_al("C2");
print_al_inf(out, out_round, out_al, key_path, al);
//**************PRESENT******************
out << endl << "*************23.PRESENT*************" << endl;
al = build_al("PRESENT");
print_al_inf(out, out_round, out_al, key_path, al);
//**************MACGUFFIN******************
out << endl << "*************24.MACGUFFIN*************" << endl;
al = build_al("MACGUFFIN");
print_al_inf(out, out_round, out_al, key_path, al);
//**************SQUARE******************
out << endl << "*************25.SQUARE*************" << endl;
al = build_al("SQUARE");
print_al_inf(out, out_round, out_al, key_path, al);
//**************M6******************
out << endl << "*************26.M6*************" << endl;
al = build_al("M6");
print_al_inf(out, out_round, out_al, key_path, al);
//**************ICE******************
out << endl << "*************27.ICE*************" << endl;
al = build_al("ICE");
print_al_inf(out, out_round, out_al, key_path, al);
//**************SHARK******************
out << endl << "*************28.SHARK*************" << endl;
al = build_al("SHARK");
print_al_inf(out, out_round, out_al, key_path, al);
//**************CS_CIPHER******************
out << endl << "*************29.CS_CIPHER*************" << endl;
al = build_al("CS_CIPHER");
print_al_inf(out, out_round, out_al, key_path, al);
//**************NUSH******************
out << endl << "*************30.NUSH*************" << endl;
al = build_al("NUSH");
print_al_inf(out, out_round, out_al, key_path, al);
//**************GRAND_CRU******************
out << endl << "*************31.GRAND_CRU*************" << endl;
al = build_al("GRAND_CRU");
print_al_inf(out, out_round, out_al, key_path, al);
//**************Q******************
out << endl << "*************32.Q*************" << endl;
al = build_al("Q");
print_al_inf(out, out_round, out_al, key_path, al);
//**************E2******************
out << endl << "*************33.E2*************" << endl;
al = build_al("E2");
print_al_inf(out, out_round, out_al, key_path, al);
//**************KHAZAD******************
out << endl << "*************34.KHAZAD*************" << endl;
al = build_al("KHAZAD");
print_al_inf(out, out_round, out_al, key_path, al);
//**************HIEROCRYPT_L1******************
out << endl << "*************35.HIEROCRYPT_L1*************" << endl;
al = build_al("HIEROCRYPT_L1");
print_al_inf(out, out_round, out_al, key_path, al);
//**************HIEROCRYPT_3******************
out << endl << "*************36.HIEROCRYPT_3*************" << endl;
al = build_al("HIEROCRYPT_3");
print_al_inf(out, out_round, out_al, key_path, al);
//***************print mix************
do_mix(mix,key_path,1800);
print_mix(mix);
// print_center(print_center_pre);
// print_center(print_center_post);
return 0;
}