Readme.htm
6.86 KB
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
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./Readme_files/filelist.xml">
<title>AES </title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>pramila</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>pramila</o:LastAuthor>
<o:Revision>5</o:Revision>
<o:TotalTime>15</o:TotalTime>
<o:Created>2002-08-28T18:33:00Z</o:Created>
<o:LastSaved>2002-08-28T18:46:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Company>RouteFree</o:Company>
<o:Lines>1</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:Version>9.2720</o:Version>
</o:DocumentProperties>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:592779683;
mso-list-type:hybrid;
mso-list-template-ids:1634911404 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1
{mso-list-id:1502740863;
mso-list-type:hybrid;
mso-list-template-ids:910198656 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US style='tab-interval:.5in'>
<div class=Section1>
<p class=MsoNormal>AES Source</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>To build and execute samples:</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>>make clean</p>
<p class=MsoNormal>>make all</p>
<p class=MsoNormal>>test_enc</p>
<p class=MsoNormal>(takes default arguments inputfile outputfile num_of_bytes)</p>
<p class=MsoNormal>>test_dec </p>
<p class=MsoNormal>(takes default arguments inputfile outputfile num_of_bytes)</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>If it works fine, the default input input.bin and output
deciphered.bin should match. (Its the copyright material of AES reference
code, so it can be read).</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>>test_enc.c</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>is the main program for encryption. It contains in it
hardcoded the 32 char string for 128 bit key in ascii, and the initialization
vector. These two should be the same in encryption and decryption. It only
takes multiple of 128 bit file sizes. The example is 512 bytes. Its malloced
at once so please dont try huge files yet.</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>It calls main functions </p>
<ul style='margin-top:0in' type=disc>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'>initCipher()
to initialize parameters, modes etc</li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'>makeKey()
to do encryption key expansion</li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'>blockEncrypt()
to do encryption.</li>
</ul>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>These are functions from <span style="mso-spacerun:
yes"></span>rijndael-api-ref.h</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>>test_dec.c</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>is the main program for decryption. It contains in it
hardcoded the 32 char string for 128 bit key in ascii, and the initialization
vector. </p>
<p class=MsoNormal>It calls main functions </p>
<ul style='margin-top:0in' type=disc>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'>initCipher()
to initialize parameters, modes etc</li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'>makeKeyEqvtInv()
to do encryption key expansion</li>
<li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list .5in'>blockDecryptEqvtInv()
to do encryption.</li>
</ul>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>These are functions from <span style="mso-spacerun:
yes"></span>rijndael-api-ref.h</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>Alternatively one could call</p>
<ul style='margin-top:0in' type=disc>
<li class=MsoNormal style='mso-list:l1 level1 lfo2;tab-stops:list .5in'>makeKey()</li>
<li class=MsoNormal style='mso-list:l1 level1 lfo2;tab-stops:list .5in'>blockDecrypt()</li>
</ul>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>and obtain the same result.</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal>The EqvtInv versions are there because our hardware
implements those. The hardware does not do key expansion, so the output of
makeKeyEqvtInv should be fed to blockDecryptEqvtInv (in reverse order of 32
byte quantities).</p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
</div>
</body>
</html>