Readme.htm 6.86 KB
<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]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal>To build and execute samples:</p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal>&gt;make clean</p>

<p class=MsoNormal>&gt;make all</p>

<p class=MsoNormal>&gt;test_enc</p>

<p class=MsoNormal>(takes default arguments inputfile outputfile num_of_bytes)</p>

<p class=MsoNormal>&gt;test_dec </p>

<p class=MsoNormal>(takes default arguments inputfile outputfile num_of_bytes)</p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![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]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal>&gt;test_enc.c</p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![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]>&nbsp;<![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]>&nbsp;<![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]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal>&gt;test_dec.c</p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![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]>&nbsp;<![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]>&nbsp;<![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]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal>and obtain the same result.</p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![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]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>

<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>

</div>

</body>

</html>