-
Notifications
You must be signed in to change notification settings - Fork 0
/
Report-Temp.tex
1694 lines (1477 loc) · 69.9 KB
/
Report-Temp.tex
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
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%% bare_jrnl_compsoc.tex
%% V1.3
%% 2007/01/11
%% by Michael Shell
%% See:
%% http://www.michaelshell.org/
%% for current contact information.
%%
%% This is a skeleton file demonstrating the use of IEEEtran.cls
%% (requires IEEEtran.cls version 1.7 or later) with an IEEE Computer
%% Society journal paper.
%%
%% Support sites:
%% http://www.michaelshell.org/tex/ieeetran/
%% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/
%% and
%% http://www.ieee.org/
%%*************************************************************************
%% Legal Notice:
%% This code is offered as-is without any warranty either expressed or
%% implied; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE!
%% User assumes all risk.
%% In no event shall IEEE or any contributor to this code be liable for
%% any damages or losses, including, but not limited to, incidental,
%% consequential, or any other damages, resulting from the use or misuse
%% of any information contained here.
%%
%% All comments are the opinions of their respective authors and are not
%% necessarily endorsed by the IEEE.
%%
%% This work is distributed under the LaTeX Project Public License (LPPL)
%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
%% distributed and modified. A copy of the LPPL, version 1.3, is included
%% in the base LaTeX documentation of all distributions of LaTeX released
%% 2003/12/01 or later.
%% Retain all contribution notices and credits.
%% ** Modified files should be clearly indicated as such, including **
%% ** renaming them and changing author support contact information. **
%%
%% File list of work: IEEEtran.cls, IEEEtran_HOWTO.pdf, bare_adv.tex,
%% bare_conf.tex, bare_jrnl.tex, bare_jrnl_compsoc.tex
%%*************************************************************************
% *** Authors should verify (and, if needed, correct) their LaTeX system ***
% *** with the testflow diagnostic prior to trusting their LaTeX platform ***
% *** with production work. IEEE's font choices can trigger bugs that do ***
% *** not appear when using other class files. ***
% The testflow support page is at:
% http://www.michaelshell.org/tex/testflow/
% Note that the a4paper option is mainly intended so that authors in
% countries using A4 can easily print to A4 and see how their papers will
% look in print - the typesetting of the document will not typically be
% affected with changes in paper size (but the bottom and side margins will).
% Use the testflow package mentioned above to verify correct handling of
% both paper sizes by the user's LaTeX system.
%
% Also note that the "draftcls" or "draftclsnofoot", not "draft", option
% should be used if it is desired that the figures are to be displayed in
% draft mode.
%
% The Computer Society usually requires 12pt for submissions.
%
\documentclass[12pt,journal,compsoc]{IEEEtran}
%
% If IEEEtran.cls has not been installed into the LaTeX system files,
% manually specify the path to it like:
% \documentclass[12pt,journal,compsoc]{../sty/IEEEtran}
% Some very useful LaTeX packages include:
% (uncomment the ones you want to load)
% *** MISC UTILITY PACKAGES ***
%
%\usepackage{ifpdf}
% Heiko Oberdiek's ifpdf.sty is very useful if you need conditional
% compilation based on whether the output is pdf or dvi.
% usage:
% \ifpdf
% % pdf code
% \else
% % dvi code
% \fi
% The latest version of ifpdf.sty can be obtained from:
% http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/
% Also, note that IEEEtran.cls V1.7 and later provides a builtin
% \ifCLASSINFOpdf conditional that works the same way.
% When switching from latex to pdflatex and vice-versa, the compiler may
% have to be run twice to clear warning/error messages.
% *** CITATION PACKAGES ***
%
\ifCLASSOPTIONcompsoc
% IEEE Computer Society needs nocompress option
% requires cite.sty v4.0 or later (November 2003)
\usepackage[nocompress]{cite}
\else
% normal IEEE
\usepackage{cite}
\fi
% cite.sty was written by Donald Arseneau
% V1.6 and later of IEEEtran pre-defines the format of the cite.sty package
% \cite{} output to follow that of IEEE. Loading the cite package will
% result in citation numbers being automatically sorted and properly
% "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using
% cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's
% \cite will automatically add leading space, if needed. Use cite.sty's
% noadjust option (cite.sty V3.8 and later) if you want to turn this off.
% cite.sty is already installed on most LaTeX systems. Be sure and use
% version 4.0 (2003-05-27) and later if using hyperref.sty. cite.sty does
% not currently provide for hyperlinked citations.
% The latest version can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/cite/
% The documentation is contained in the cite.sty file itself.
%
% Note that some packages require special options to format as the Computer
% Society requires. In particular, Computer Society papers do not use
% compressed citation ranges as is done in typical IEEE papers
% (e.g., [1]-[4]). Instead, they list every citation separately in order
% (e.g., [1], [2], [3], [4]). To get the latter we need to load the cite
% package with the nocompress option which is supported by cite.sty v4.0
% and later. Note also the use of a CLASSOPTION conditional provided by
% IEEEtran.cls V1.7 and later.
% *** GRAPHICS RELATED PACKAGES ***
%
\ifCLASSINFOpdf
\usepackage[pdftex]{graphicx}
% declare the path(s) where your graphic files are
\graphicspath{{./pdf/}{./jpeg/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
\DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
% or other class option (dvipsone, dvipdf, if not using dvips). graphicx
% will default to the driver specified in the system graphics.cfg if no
% driver is specified.
\usepackage[dvips]{graphicx}
% declare the path(s) where your graphic files are
\graphicspath{{./eps/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
\DeclareGraphicsExtensions{.eps}
\fi
% graphicx was written by David Carlisle and Sebastian Rahtz. It is
% required if you want graphics, photos, etc. graphicx.sty is already
% installed on most LaTeX systems. The latest version and documentation can
% be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/required/graphics/
% Another good source of documentation is "Using Imported Graphics in
% LaTeX2e" by Keith Reckdahl which can be found as epslatex.ps or
% epslatex.pdf at: http://www.ctan.org/tex-archive/info/
%
% latex, and pdflatex in dvi mode, support graphics in encapsulated
% postscript (.eps) format. pdflatex in pdf mode supports graphics
% in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure
% that all non-photo figures use a vector format (.eps, .pdf, .mps) and
% not a bitmapped formats (.jpeg, .png). IEEE frowns on bitmapped formats
% which can result in "jaggedy"/blurry rendering of lines and letters as
% well as large increases in file sizes.
%
% You can find documentation about the pdfTeX application at:
% http://www.tug.org/applications/pdftex
% *** MATH PACKAGES ***
%
\usepackage[cmex10]{amsmath}
% A popular package from the American Mathematical Society that provides
% many useful and powerful commands for dealing with mathematics. If using
% it, be sure to load this package with the cmex10 option to ensure that
% only type 1 fonts will utilized at all point sizes. Without this option,
% it is possible that some math symbols, particularly those within
% footnotes, will be rendered in bitmap form which will result in a
% document that can not be IEEE Xplore compliant!
%
% Also, note that the amsmath package sets \interdisplaylinepenalty to 10000
% thus preventing page breaks from occurring within multiline equations. Use:
\interdisplaylinepenalty=2500
% after loading amsmath to restore such page breaks as IEEEtran.cls normally
% does. amsmath.sty is already installed on most LaTeX systems. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/required/amslatex/math/
% *** SPECIALIZED LIST PACKAGES ***
%
\usepackage{algorithmic}
% algorithmic.sty was written by Peter Williams and Rogerio Brito.
% This package provides an algorithmic environment for describing algorithms.
% You can use the algorithmic environment in-text or within a figure
% environment to provide for a floating algorithm. Do NOT use the algorithm
% floating environment provided by algorithm.sty (by the same authors) or
% algorithm2e.sty (by Christophe Fiorio) as IEEE does not use dedicated
% algorithm float types and packages that provide these will not provide
% correct IEEE style captions. The latest version and documentation of
% algorithmic.sty can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/algorithms/
% There is also a support site at:
% http://algorithms.berlios.de/index.html
% Also of interest may be the (relatively newer and more customizable)
% algorithmicx.sty package by Szasz Janos:
% http://www.ctan.org/tex-archive/macros/latex/contrib/algorithmicx/
% *** ALIGNMENT PACKAGES ***
%
\usepackage{array}
% Frank Mittelbach's and David Carlisle's array.sty patches and improves
% the standard LaTeX2e array and tabular environments to provide better
% appearance and additional user controls. As the default LaTeX2e table
% generation code is lacking to the point of almost being broken with
% respect to the quality of the end results, all users are strongly
% advised to use an enhanced (at the very least that provided by array.sty)
% set of table tools. array.sty is already installed on most systems. The
% latest version and documentation can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/required/tools/
\usepackage{mdwmath}
\usepackage{mdwtab}
% Also highly recommended is Mark Wooding's extremely powerful MDW tools,
% especially mdwmath.sty and mdwtab.sty which are used to format equations
% and tables, respectively. The MDWtools set is already installed on most
% LaTeX systems. The lastest version and documentation is available at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/mdwtools/
% IEEEtran contains the IEEEeqnarray family of commands that can be used to
% generate multiline equations as well as matrices, tables, etc., of high
% quality.
\usepackage{eqparbox}
% Also of notable interest is Scott Pakin's eqparbox package for creating
% (automatically sized) equal width boxes - aka "natural width parboxes".
% Available at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/eqparbox/
% *** SUBFIGURE PACKAGES ***
%\ifCLASSOPTIONcompsoc
%\usepackage[tight,normalsize,sf,SF]{subfigure}
%\else
%\usepackage[tight,footnotesize]{subfigure}
%\fi
% subfigure.sty was written by Steven Douglas Cochran. This package makes it
% easy to put subfigures in your figures. e.g., "Figure 1a and 1b". For IEEE
% work, it is a good idea to load it with the tight package option to reduce
% the amount of white space around the subfigures. Computer Society papers
% use a larger font and \sffamily font for their captions, hence the
% additional options needed under compsoc mode. subfigure.sty is already
% installed on most LaTeX systems. The latest version and documentation can
% be obtained at:
% http://www.ctan.org/tex-archive/obsolete/macros/latex/contrib/subfigure/
% subfigure.sty has been superceeded by subfig.sty.
%\ifCLASSOPTIONcompsoc
% \usepackage[caption=false]{caption}
% \usepackage[font=normalsize,labelfont=sf,textfont=sf]{subfig}
%\else
% \usepackage[caption=false]{caption}
% \usepackage[font=footnotesize]{subfig}
%\fi
% subfig.sty, also written by Steven Douglas Cochran, is the modern
% replacement for subfigure.sty. However, subfig.sty requires and
% automatically loads Axel Sommerfeldt's caption.sty which will override
% IEEEtran.cls handling of captions and this will result in nonIEEE style
% figure/table captions. To prevent this problem, be sure and preload
% caption.sty with its "caption=false" package option. This is will preserve
% IEEEtran.cls handing of captions. Version 1.3 (2005/06/28) and later
% (recommended due to many improvements over 1.2) of subfig.sty supports
% the caption=false option directly:
\ifCLASSOPTIONcompsoc
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\else
\usepackage[caption=false,font=footnotesize]{subfig}
\fi
%
% The latest version and documentation can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/subfig/
% The latest version and documentation of caption.sty can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/caption/
% *** FLOAT PACKAGES ***
%
\usepackage{fixltx2e}
% fixltx2e, the successor to the earlier fix2col.sty, was written by
% Frank Mittelbach and David Carlisle. This package corrects a few problems
% in the LaTeX2e kernel, the most notable of which is that in current
% LaTeX2e releases, the ordering of single and double column floats is not
% guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a
% single column figure to be placed prior to an earlier double column
% figure. The latest version and documentation can be found at:
% http://www.ctan.org/tex-archive/macros/latex/base/
\usepackage{stfloats}
% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e
% the ability to do double column floats at the bottom of the page as well
% as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in
% LaTeX2e). It also provides a command:
\fnbelowfloat
% to enable the placement of footnotes below bottom floats (the standard
% LaTeX2e kernel puts them above bottom floats). This is an invasive package
% which rewrites many portions of the LaTeX2e float routines. It may not work
% with other packages that modify the LaTeX2e float routines. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/sttools/
% Documentation is contained in the stfloats.sty comments as well as in the
% presfull.pdf file. Do not use the stfloats baselinefloat ability as IEEE
% does not allow \baselineskip to stretch. Authors submitting work to the
% IEEE should note that IEEE rarely uses double column equations and
% that authors should try to avoid such use. Do not be tempted to use the
% cuted.sty or midfloat.sty packages (also by Sigitas Tolusis) as IEEE does
% not format its papers in such ways.
%\ifCLASSOPTIONcaptionsoff
% \usepackage[nomarkers]{endfloat}
% \let\MYoriglatexcaption\caption
% \renewcommand{\caption}[2][\relax]{\MYoriglatexcaption[#2]{#2}}
%\fi
% endfloat.sty was written by James Darrell McCauley and Jeff Goldberg.
% This package may be useful when used in conjunction with IEEEtran.cls'
% captionsoff option. Some IEEE journals/societies require that submissions
% have lists of figures/tables at the end of the paper and that
% figures/tables without any captions are placed on a page by themselves at
% the end of the document. If needed, the draftcls IEEEtran class option or
% \CLASSINPUTbaselinestretch interface can be used to increase the line
% spacing as well. Be sure and use the nomarkers option of endfloat to
% prevent endfloat from "marking" where the figures would have been placed
% in the text. The two hack lines of code above are a slight modification of
% that suggested by in the endfloat docs (section 8.3.1) to ensure that
% the full captions always appear in the list of figures/tables - even if
% the user used the short optional argument of \caption[]{}.
% IEEE papers do not typically make use of \caption[]'s optional argument,
% so this should not be an issue. A similar trick can be used to disable
% captions of packages such as subfig.sty that lack options to turn off
% the subcaptions:
% For subfig.sty:
% \let\MYorigsubfloat\subfloat
% \renewcommand{\subfloat}[2][\relax]{\MYorigsubfloat[]{#2}}
% For subfigure.sty:
% \let\MYorigsubfigure\subfigure
% \renewcommand{\subfigure}[2][\relax]{\MYorigsubfigure[]{#2}}
% However, the above trick will not work if both optional arguments of
% the \subfloat/subfig command are used. Furthermore, there needs to be a
% description of each subfigure *somewhere* and endfloat does not add
% subfigure captions to its list of figures. Thus, the best approach is to
% avoid the use of subfigure captions (many IEEE journals avoid them anyway)
% and instead reference/explain all the subfigures within the main caption.
% The latest version of endfloat.sty and its documentation can obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/endfloat/
%
% The IEEEtran \ifCLASSOPTIONcaptionsoff conditional can also be used
% later in the document, say, to conditionally put the References on a
% page by themselves.
% *** PDF, URL AND HYPERLINK PACKAGES ***
%
\usepackage{url}
% url.sty was written by Donald Arseneau. It provides better support for
% handling and breaking URLs. url.sty is already installed on most LaTeX
% systems. The latest version can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/misc/
% Read the url.sty source comments for usage information. Basically,
% \url{my_url_here}.
% \newtheorem sets are defined here
\newtheorem{definition}{Definition}
% *** Do not adjust lengths that control margins, column widths, etc. ***
% *** Do not use packages that alter fonts (such as pslatex). ***
% There should be no need to do such things with IEEEtran.cls V1.6 and later.
% (Unless specifically asked to do so by the journal or conference you plan
% to submit to, of course. )
% I still do not think hyperref is a bad package.
\usepackage{hyperref}
\hypersetup{unicode}
\hypersetup{colorlinks=true}
\hypersetup{linkcolor=black}
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
\begin{document}
%
% paper title
% can use linebreaks \\ within to get better formatting as desired
%\title{Bare Demo of IEEEtran.cls\\ for Computer Society Journals}
\title{RSA and El-Gamal Cryptosystems}
%
%
% author names and IEEE memberships
% note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break
% a structure at a ~ so this keeps an author's name from being broken across
% two lines.
% use \thanks{} to gain access to the first footnote area
% a separate \thanks must be used for each paragraph as LaTeX2e's \thanks
% was not built to handle multiple paragraphs
%
%
%\IEEEcompsocitemizethanks is a special \thanks that produces the bulleted
% lists the Computer Society journals use for "first footnote" author
% affiliations. Use \IEEEcompsocthanksitem which works much like \item
% for each affiliation group. When not in compsoc mode,
% \IEEEcompsocitemizethanks becomes like \thanks and
% \IEEEcompsocthanksitem becomes a line break with idention. This
% facilitates dual compilation, although admittedly the differences in the
% desired content of \author between the different types of papers makes a
% one-size-fits-all approach a daunting prospect. For instance, compsoc
% journal papers have the author affiliations above the "Manuscript
% received ..." text while in non-compsoc journals this is reversed. Sigh.
%\author{Michael~Shell,~\IEEEmembership{Member,~IEEE,}
% John~Doe,~\IEEEmembership{Fellow,~OSA,}
% and~Jane~Doe,~\IEEEmembership{Life~Fellow,~IEEE}% <-this % stops a space
%\IEEEcompsocitemizethanks{\IEEEcompsocthanksitem M. Shell is with the Department
%of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta,
%GA, 30332.\protect\\
% note need leading \protect in front of \\ to get a newline within \thanks as
% \\ is fragile and will error, could use \hfil\break instead.
%E-mail: see http://www.michaelshell.org/contact.html
%\IEEEcompsocthanksitem J. Doe and J. Doe are with Anonymous University.}% <-this % stops a space
%\thanks{Manuscript received April 19, 2005; revised January 11, 2007.}}
\author{Yanan~Xiao,~\IEEEmembership{Student~Member,~IEEE}
Maryam~Al~Mehrezi%
\IEEEcompsocitemizethanks{\IEEEcompsocthanksitem Yanan Xiao and Maryam
Al Mehrezi are with the Department of Electrical Engineering and
Computer Science, Masdar Institute of Science and Technology, Masdar City,
Abu Dhabi, UAE, 54224.\protect\\
E-mail: \{yxiao,malmehrezi\}@masdar.ac.ae}}
% note the % following the last \IEEEmembership and also \thanks -
% these prevent an unwanted space from occurring between the last author name
% and the end of the author line. i.e., if you had this:
%
% \author{....lastname \thanks{...} \thanks{...} }
% ^------------^------------^----Do not want these spaces!
%
% a space would be appended to the last name and could cause every name on that
% line to be shifted left slightly. This is one of those "LaTeX things". For
% instance, "\textbf{A} \textbf{B}" will typeset as "A B" not "AB". To get
% "AB" then you have to do: "\textbf{A}\textbf{B}"
% \thanks is no different in this regard, so shield the last } of each \thanks
% that ends a line with a % and do not let a space in before the next \thanks.
% Spaces after \IEEEmembership other than the last one are OK (and needed) as
% you are supposed to have spaces between the names. For what it is worth,
% this is a minor point as most people would not even notice if the said evil
% space somehow managed to creep in.
% The paper headers
\markboth{Journal of Masdar Institute,~Vol.~16, No.~1, October~2013}%
{RSA and El-Gamal Cryptosystems}
% The only time the second header will appear is for the odd numbered pages
% after the title page when using the twoside option.
%
% *** Note that you probably will NOT want to include the author's ***
% *** name in the headers of peer review papers. ***
% You can use \ifCLASSOPTIONpeerreview for conditional compilation here if
% you desire.
% The publisher's ID mark at the bottom of the page is less important with
% Computer Society journal papers as those publications place the marks
% outside of the main text columns and, therefore, unlike regular IEEE
% journals, the available text space is not reduced by their presence.
% If you want to put a publisher's ID mark on the page you can do it like
% this:
%\IEEEpubid{0000--0000/00\$00.00~\copyright~2007 IEEE}
% or like this to get the Computer Society new two part style.
%\IEEEpubid{\makebox[\columnwidth]{\hfill 0000--0000/00/\$00.00~\copyright~2007 IEEE}%
%\hspace{\columnsep}\makebox[\columnwidth]{Published by the IEEE Computer Society\hfill}}
% Remember, if you use this you must call \IEEEpubidadjcol in the second
% column for its text to clear the IEEEpubid mark (Computer Society jorunal
% papers don't need this extra clearance.)
% use for special paper notices
%\IEEEspecialpapernotice{(Invited Paper)}
% for Computer Society papers, we must declare the abstract and index terms
% PRIOR to the title within the \IEEEcompsoctitleabstractindextext IEEEtran
% command as these need to go into the title area created by \maketitle.
\IEEEcompsoctitleabstractindextext{%
\begin{abstract}
%\boldmath
We present our analysis of RSA and ElGamal cryptosystem with great
detail. We show that there are some attacks on RSA.\@ The mathematical
foundation of ElGamal cryptosystem, namely discrete logarithm problem
is discussed. Basic structure of our implementation codes is also mentioned.
\end{abstract}
% IEEEtran.cls defaults to using nonbold math in the Abstract.
% This preserves the distinction between vectors and scalars. However,
% if the journal you are submitting to favors bold math in the abstract,
% then you can use LaTeX's standard command \boldmath at the very start
% of the abstract to achieve this. Many IEEE journals frown on math
% in the abstract anyway. In particular, the Computer Society does
% not want either math or citations to appear in the abstract.
% Note that keywords are not normally used for peerreview papers.
\begin{IEEEkeywords}
RSA, El-Gamal, implementation, public key, cryptosystem
\end{IEEEkeywords}}
% make the title area
\maketitle
% To allow for easy dual compilation without having to reenter the
% abstract/keywords data, the \IEEEcompsoctitleabstractindextext text will
% not be used in maketitle, but will appear (i.e., to be "transported")
% here as \IEEEdisplaynotcompsoctitleabstractindextext when compsoc mode
% is not selected <OR> if conference mode is selected - because compsoc
% conference papers position the abstract like regular (non-compsoc)
% papers do!
\IEEEdisplaynotcompsoctitleabstractindextext%
% \IEEEdisplaynotcompsoctitleabstractindextext has no effect when using
% compsoc under a non-conference mode.
% For peer review papers, you can put extra information on the cover
% page as needed:
% \ifCLASSOPTIONpeerreview
% \begin{center} \bfseries EDICS Category: 3-BBND \end{center}
% \fi
%
% For peerreview papers, this IEEEtran command inserts a page break and
% creates the second title. It will be ignored for other modes.
\IEEEpeerreviewmaketitle%
\section{Introduction}
\label{sec:introduction}
% Computer Society journal papers do something a tad strange with the very
% first section heading (almost always called "Introduction"). They place it
% ABOVE the main text! IEEEtran.cls currently does not do this for you.
% However, You can achieve this effect by making LaTeX jump through some
% hoops via something like:
%
%\ifCLASSOPTIONcompsoc
% \noindent\raisebox{2\baselineskip}[0pt][0pt]%
% {\parbox{\columnwidth}{\section{Introduction}\label{sec:introduction}%
% \global\everypar=\everypar}}%
% \vspace{-1\baselineskip}\vspace{-\parskip}\par
%\else
% \section{Introduction}\label{sec:introduction}\par
%\fi
%
% Admittedly, this is a hack and may well be fragile, but seems to do the
% trick for me. Note the need to keep any \label that may be used right
% after \section in the above as the hack puts \section within a raised box.
% The very first letter is a 2 line initial drop letter followed
% by the rest of the first word in caps (small caps for compsoc).
%
% form to use if the first word consists of a single letter:
% \IEEEPARstart{A}{demo} file is ....
%
% form to use if you need the single drop letter followed by
% normal text (unknown if ever used by IEEE):
% \IEEEPARstart{A}{}demo file is ....
%
% Some journals put the first two words in caps:
% \IEEEPARstart{T}{his demo} file is ....
%
% Here we have the typical use of a "T" for an initial drop letter
% and "HIS" in caps to complete the first word.
% \IEEEPARstart{T}{his} demo file is intended to serve as a ``starter file''
% for IEEE Computer Society journal papers produced under \LaTeX\ using
% IEEEtran.cls version 1.7 and later.
% % You must have at least 2 lines in the paragraph with the drop letter
% % (should never be an issue)
% I wish you the best of success.
\IEEEPARstart{P}{ublic} key cryptosystem.
\par
The rest
% \hfill mds
% \hfill January 11, 2007
% \subsection{Subsection Heading Here}
% Subsection text here.
% needed in second column of first page if using \IEEEpubid
%\IEEEpubidadjcol
%\subsubsection{Subsubsection Heading Here}
%Subsubsection text here.
%\section{Related Work}
%Some related work will be discussed here.
\section{Public Key Cryptosystem}
\label{sec:publ-key-crypt}
\subsection{More Details}
Some problems with this template...I mean, the subsubsection part.
\section{RSA Cryptosystem}
\label{sec:rsa-cryptosystem}
This is just another testing case.
\section{El-Gamal Cryptosystem}
\label{sec:el-gamal-crypt}
As stated in the Section~\ref{sec:introduction}, after the
introduction of public key cryptosystems concept by Diffie and Hellman
in~\cite{ref:Diffie1976}, a lot of trials and errors have been made to
find feasible cryptosystems. The security of RSA system discussed
above has much to do with large integers factorization. The knapsack
public key encryption scheme relies on the complexity of subset sum
problem, which is NP-complete~\cite{ref:Odlyzko1990}. The first
example of \emph{provably secure} public key encryption scheme,
i.e.\ the Rabin scheme, is based on the problem of finding square
roots of a modulo a prime. In a more generic manner, the Rabin
encryption scheme is derived from the problem of finding $d^{th}$
roots in a finite field, which is intensively discussed
in~\cite{ref:Bach1996}. In this section, we discuss another cryptosystem that
is still being widely used, i.e. ElGamal cryptosystem.
\par
It is well recognized that the ElGamal cryptosystem could be regarded as
Diffie-Hellman key agreement~\cite{ref:Elgamal1985} in key transfer
mode. Thus, the security of ElGamal cryptosystem has much to do with
the intractability of discrete logarithm problem as well as the
Diffie-Hellman problem. We analyze them one by one thereafter. We
follow the definition style in~\cite{ref:menezes2010handbook}.
\subsection{Diffie-Hellman Problem}
% I suppose this subsection should deal with mainly Diffie-Hellman key exchange.
% Diffie-Hellman key exchange. It's never too easy to write something
% like this. You have to work hard, because you are not one Emirati.
The Diffie-Hellman key exchange agreement and its derivatives,
alongside with ElGamal public key encryption scheme are formed on the
basis of Diffie-Hellman problem.
\begin{definition}
For a group $G$, if there exists an element $\alpha\in G$ such that
for each $b\in G$ there is an integer $i$ satisfying $b=\alpha^{i}$,
we then call $G$ a cyclic group and element $\alpha$ a
generator\footnote{There could be more than one generator in a group,
or none at all.} of $G$.\label{sec:diff-hellm-probl}
\end{definition}
\begin{definition}
The Diffie-Hellman problem (DHP): find
$\alpha^{ab}\mod p$, provided that a prime
$p$, a generator $\alpha$ of $Z^{*}_{p}$, and elements
$\alpha^{a}\mod p$ and $\alpha^{b}\mod
p$\label{sec:diff-hellm-probl-1}
\end{definition}
\begin{definition}
The \emph{generalized Diffie-Hellman problem
(GDHP)}: find $\alpha^{ab}$, provided that a finite cyclic group
$G$, a generator $\alpha$ of $G$, and group elements $\alpha^{a}$ and
$\alpha^{b}$ are known. \label{sec:diff-hellm-probl-2}
\end{definition}
The link between Diffie-Hellman problem and discrete logarithm problem
(DLP) is established as follows. Under the assumption that it is easy
to solve discrete logarithm problem in $Z^{*}_{p}$, one is able to
compute $a$ from $\alpha$, $p$, $\alpha^{a}\mod p$ by way of solving a
discrete logarithm equation. And then he can compute
${(\alpha^{b})}^{a}=\alpha^{ab}\mod p$ with the knowledge of
$\alpha^{b}\mod p$ at the same time.
\par
The most recent findings still show that it remains unknown whether
generalized discrete logarithm problem (GDLP) and GDHP are
computationally equivalent. Nevertheless, we summarize some recent
progress with regard to this open problem below. The Euler phi
function is marked as $\phi$. $B$-smooth is defined under the fact
that all prime factors of an integer are $\leq B$. (B is a given
positive integer.)
% I suppose I could add some *newest* findings later on.
\begin{enumerate}
\item Assume that $p$ is a prime and the factorization of $p-1$ is
known. Under the circumstance that $\phi(p-1)$ is $B$-smooth, in
which $B=O((\ln p)^{c})$ for some constant $c$, the DHP and DLP in
$Z^{*}_{p}$ are computationally equivalent. Proof of this statement
can be found in~\cite{ref:Boer1990}.
\item A more general case is that when $G$ is an order $n$ finite
cyclic group where the factorization of $n$ is known. In this case
we can also conclude the GDHP and GDLP in $G$ are computationally
equivalent.
\item In this situation, group $G$ is assumed to have the same
property as above. When either $p-1$ or $p+1$ for $p$ as a prime
divisor of n is $B$-smooth ($B$ has the same property as above,
too), we then conclude that the GDHP and GDLP in $G$ are
computationally equivalent. Proof of this statement, and some
stronger ones can be found in~\cite{ref:Maurer1994}.
\end{enumerate}
\par
% Life is a bitch. Fuck it or leave it. You name it.
Diffie-Hellman key exchange scheme is based on the Diffie-Hellman
problem discussed above. It was proposed by Whitfield Diffie and
Martin Hellman in \emph{New Directions in
Cryptography}~\cite{ref:Diffie1976}. What's more important in
their invited paper is that they carefully examined two kinds of then
contemporary development in cryptography, and shed light on methods of
utilizing theories of communication and computation as tools to solve
future cryptography problems. The Diffie-Hellman key exchange scheme
has been widely used in Secure Shell (SSH), Transport Layer Security
(TLS), and Internet Protocol Security (IPSec) since its
proposal. Moreover, it is a key exchange protocol and \emph{not} used
for encryption. On the other hand, the ElGamal cryptosystem that is
discussed below can be employed in both encryption and digital
signature.
% Even if life itself is a bitch. You have to fuck it up till explode.
\par
Diffie-Hellman key exchange scheme serves as a fundamental technique
which provides unauthenticated key exchange. Herein we analyze the
basic Diffie-Hellman protocol and briefly introduce some related ones
which provide various authentication assurances.
\par
As the first practical key exchange scheme proposed to tackle key
distribution problem, which becomes with an urgent issue after the
discovery of public key cryptosystem, Diffie-Hellman key exchange
scheme (also called \emph{exponential key exchange}) makes it possible
that two parties of communication can establish a common secrete,
which is strongly against eavesdropping theoretically, by way of a
simple exponential calculation through an open channel. And this
seemingly unrealistic approach is done without the prerequisite of,
say Alice and Bob having met each other before or shared critical
component of the scheme in advance. However, the primitive
Diffie-Hellman technique has its defects. Even though this sort of
protection performs well when eavesdroppers (passive adversaries) are
cutting in the communication, it lacks key procedures to protect users
from active adversaries who possess the ability to intercept, modify
or inject messages. As reflected in Fig.
\ref{fig:diffie-key-agreement}, in real world communication scenarios,
neither party (of one specific communication) can 100\% tell that the
source identity of the incoming message is the one it makes the
request for. The identity of the other party may be the one that
``happened'' know the resulting key, i.e.\ entity
authentication or key authentication.
% \begin{figure*}[!htbp]
% \centering
% \begin{algorithmic}
% % \caption{\textbf{Protocol} Diffie-Hellman key exchange scheme (basic
% % version)}
% \STATE SUMMARY:\@ \emph{A} and \emph{B} communicates with each other
% through open channel. In this simplified case, they are sending
% the other one message.
% \STATE RESULT:\@ A common secrete known to both \emph{A} and
% \emph{B} is established.\\
% \STATE~\quad{}1. \emph{One-time Setup.} Select and publish an
% appropriate prime $p$ and generator $\alpha$ of $Z^{*}_{p}$.\\
% \STATE~\quad{}2. \emph{Protocol messages.}
% \begin{equation}
% \label{eq:diffie-1}
% A \rightarrow B: \alpha^{x}\mod p
% \end{equation}
% \begin{equation}
% \label{eq:diffie-2}
% A \leftarrow B: \alpha^{y}\mod p
% \end{equation}\\
% \STATE~\quad{}3. \emph{Protocol actions.} Each time a shared key
% is required, the following actions would be carried out.
% \begin{enumerate}
% \item \emph{A} selects some random secrete $x$, $1\leq x\leq
% p-2$. Then sends \emph{B} message~\eqref{eq:diffie-1}.
% \item \emph{B} selects some random secrete $y$, $1\leq y\leq
% p-2$. Then sends \emph{A} message~\eqref{eq:diffie-2}.
% \item \emph{B} computes $K={(\alpha^{x})}^{y}\mod p$ as the shared
% key after receiving $\alpha^{x}$.
% \item \emph{A} computes $K={(\alpha^{y})}^{x}\mod p$ as the shared
% key after receiving $\alpha^{y}$.
% \end{enumerate}
% \end{algorithmic}
% \caption{\textbf{Protocol} Diffie-Hellman key exchange scheme (basic
% version)}
% \label{fig:diffie-key-agreement}
% % \vspace{-6pt}
% \end{figure*}
\par
In order to deal with key authentication issue brought up by basic
Diffie-Hellman key exchange scheme, a simple method is to set
$\alpha^{x}$ and $\alpha^{y}\mod p$ constant public keys for the
corresponding parties. In this way, these public keys can be
distributed through signed certificates, and the problem of long-term
shared key is ``seemingly'' fixed. When such certificates are
available \emph{a prior}, key exchange process evolves into a
zero-pass key exchange scheme, which no cryptographic message is
required to finish the exchange. Nevertheless, an obvious drawback is
that as \emph{a prior}, once being hacked, all messages encrypted with
this key are under attack. One solution for this drawback is proposed
as MTI/A0 key exchange protocol in~\cite{ref:Matsumoto1986}. The
MTI/A0 variant of Diffie-Hellman key exchange scheme patches this
mentioned drawback by producing time-variant session keys and use them
in mutual authentication in both directions of key exchange. This
approach is done implicitly so it performs well against passive
attacks. Another roundabout solution that takes in key update
technique is used in ElGamal key exchange scheme, which we discuss in
later subsections.
\par
% Life is a bitch. \end{documen} pretty strange
% \end{document}
% \end{document}
% \end{document}
% Holy Shit!
% \end{document}
Generally speaking, the Diffie-Hellman protocol as well as other
similar ones based on it could be carried out in any group where both
the discrete logarithm problem is difficult to solve, and exponential
computation is easy. In practice, the following groups are more
commonly used.
\begin{itemize}
\item Multiplicative group $Z^{*}_{p}$ of $Z_{p}$.
\item Analogous multiplicative group $F_{2^{m}}$.
\item The group of points defined over a finite field by an elliptic curve.
\end{itemize}
\subsection{Discrete Logarithm Problem}
\label{sec:disctr-logar-probl}
% Well, it seems that I have to use \begin{figure*} environment.
The security issues associated with the intractability of discrete
logarithm problem have much to do with many cryptographic techniques
derived from this fascinating problem. Some well-known and widely used
schemes include Diffie-Hellman key exchange protocol, ElGamal
encryption, and the ElGamal signature scheme and its derivatives. This
subsection deals mainly with the mainstream knowledge with regard to
algorithms developed to solve discrete logarithm problem.
\par
% I suppose I should add the definition of generator some time later,
% when integrating Mrs. Maryam's writing.
The general mathematical setting implied to describe algorithms in
this subsection is a (multiplicatively written) finite cyclic group
$G$ of order $n$. And there is at least a generator (see definition in
\ref{sec:diff-hellm-probl}) named $\alpha$. Following a popular
approach, it would be convenient to think of $G$ as the
multiplicatively group $Z^{*}_{p}$ of order $p-1$, and what the group
does is merely multiplication modulo $p$.
\begin{definition}
Suppose that $G$ is a finite cyclic group of order
$n$, $\alpha$ a generator of $G$, and $\beta\in G$. We denote
$\log_{\alpha}\beta$ as the discrete logarithm of $\beta$ to the base
$\alpha$, and it is the unique integer $x$, $0\leq x\leq n-1$, such
that $\beta=\alpha^{x}$.
\end{definition}
In cryptography, there are some groups (of numbers) that are more
interesting for researchers than others. Cases of examples are
multiplicative group $F^{*}_{p}$ of the field $F_{p}$. More
specifically, multiplicative group $Z^{*}_{p}$ of the integers modulo
a prime $p$, multiplicative group $F^{*}_{2^{m}}$ of the finite field
with characteristic two. Another group that becomes popular after the
invention of elliptic curve cryptosystem is the group of units
$Z^{*}_{n}$ with $n$ being a composite integer. Specific examples are
the group of points which are defined within a finite field on an
elliptic curve, as well as the jacobian of a hyperelliptic curve that
is also defined over a finite field.
\begin{definition}
The \emph{discrete logarithm problem} (DLP) is
defined as follows: Compute the integer $x$, $0\leq x\leq p-2$ that
satisfies $\alpha^{x}\equiv \beta(\mod p)$, where $p$ is a prime,
$\alpha$ a generator of $Z^{*}_{p}$, and $\beta\in Z^{*}_{p}$.
\end{definition}
\begin{definition}
The \emph{generalized discrete logarithm problem}
(GDLP) is defined as follows: Compute the integer $x$, $0\leq x\leq
n-1$ that satisfies $\alpha^{x}=\beta$, where $\alpha$ is a generator
in a finite cyclic group $G$ of order $n$, and $\beta\in G$.\label{def:Generalized-DLP}
\end{definition}
Due to the fact that elliptic curve cryptography is yet another grand
topic, we do not discuss them intensively in this paper. It is
generally considered to be associated with discrete logarithm problem
through a method called \emph{composite
moduli}~\cite{ref:menezes2010handbook}.
\par
% Finish this paper within the day. Anyway, spare some 1 hour with
% your data mining slides.
When analyzing the generalized problem, it is not hard to derive that
the difficulty of GDLP is independent of generator. Assume that there
are two generator $\alpha$ and $\gamma$ for a cyclic group $G$ of
order $n$, and $\beta$ is an element in $G$. From the definition of
group generator we can thus have the following equations:
$x=\log_{\alpha}\beta$, $y=\log_{\gamma}\beta$, and
$z=\log_{\alpha}\gamma$. Combining those equations, we have
$\alpha^{x}=\beta=\gamma^{y}={(\alpha^{x})}^{y}$. Consequently
$x=zy\mod n$, and
\begin{equation}
\label{eq:discrete-1}
\log_{\gamma}\beta=(\log_{\alpha}\beta){(\log_{\alpha}\gamma)}^{-1}\mod
n
\end{equation}
From equation~\eqref{eq:discrete-1} we can see once an algorithm is developed to compute
logarithms to the base $\alpha$, can easily be utilized to compute any
other base $\gamma$ serving as a generator of group $G$.
\par
Before stepping into known algorithms for DLP, we talk about some more
general cases here. A even more generalized formulation of GDLP can be
defined as follows: provided that such an integer exists that
satisfies $\alpha^{x}=\beta$, find it in a finite group where
$\alpha,\beta\in G$. Generally speaking, this problem may be harder to
solve than GDLP.\@ Nevertheless, under the circumstance where $G$ is a
cyclic group, i.e. $G$ being the multiplicative group of a finite
field and the order of $\alpha$ already known, it would be much easier
to recognize the existence of integer $x$ satisfying
$\alpha^{x}=\beta$. For this requirement, the only condition that has
to be met is $\beta^{n}=1$, where $n$ is the order of element
$\alpha$.
\par
In chapter 3 of ``Handbook of Applied
Cryptography''~\cite{ref:menezes2010handbook}, the authors point out
that ``Solving the DLP in a cyclic group $G$ of order $n$ is in
essence computing an isomorphism between $G$ and
$Z_{n}$''. Isomorphism for cyclic groups refers to the fact that basic
structure of the two groups is the same while representation of their
elements differs. It is pointed out that some algorithm which is
pretty efficient with one group may not be adopted to handle problems
with another without any modifications. A self-obvious example is each
cyclic group of order $n$ is isomorphic to the additive cyclic group
$Z_{n}$. The latter is merely a group composed of integers
${0,1,2,\ldots,n-1}$ with addition modulo $n$ as the group operation.
\par
We classify known effective algorithms for DLP as follows:
\begin{enumerate}
\item algorithms working in arbitrary groups, e.g.\ exhaustive search,
the baby-step-giant-step algorithm, Pollard's rho algorithm;
\item algorithms working in arbitrary groups with on-purpose design to
tackle groups consisting of small prime factors, e.g.\
Pholig-Hellman algorithm; and
\item algorithms working only effectively in certain groups, e.g.\ the
index-calculus algorithm.
\end{enumerate}
% No more procrastination!
\subsubsection{\qquad Exhaustive search}
\label{sec:exhaustive-search}
As with all other cryptosystems, exhaustive search works well, at
least theoretically. For GDLP (see definition in
\ref{def:Generalized-DLP}), all we have to do is to compute
$\alpha^{0}$, $\alpha^{1}$, $\alpha^{2}$, \ldots until $\beta$ is