Line 1... |
Line 1... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<head>
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.4"/>
|
<title>AES Avalon Slave (avs_aes): avs_aes.h File Reference</title>
|
<title>AES Avalon Slave (avs_aes): avs_aes.h File Reference</title>
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(initResizable);
|
|
$(window).load(resizeHeight);
|
|
</script>
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
</head>
|
</head>
|
<body>
|
<body>
|
<!-- Generated by Doxygen 1.6.1 -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<script type="text/javascript">
|
<div id="titlearea">
|
<!--
|
<table cellspacing="0" cellpadding="0">
|
function changeDisplayState (e){
|
<tbody>
|
var num=this.id.replace(/[^[0-9]/g,'');
|
<tr style="height: 56px;">
|
var button=this.firstChild;
|
<td style="padding-left: 0.5em;">
|
var sectionDiv=document.getElementById('dynsection'+num);
|
<div id="projectname">AES Avalon Slave (avs_aes)
|
if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
|
</div>
|
sectionDiv.style.display='block';
|
</td>
|
button.src='open.gif';
|
</tr>
|
}else{
|
</tbody>
|
sectionDiv.style.display='none';
|
</table>
|
button.src='closed.gif';
|
</div>
|
}
|
<!-- end header part -->
|
}
|
<!-- Generated by Doxygen 1.8.4 -->
|
function initDynSections(){
|
<div id="navrow1" class="tabs">
|
var divs=document.getElementsByTagName('div');
|
<ul class="tablist">
|
var sectionCounter=1;
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
for(var i=0;i<divs.length-1;i++){
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
var header=divs[i];
|
|
var section=divs[i+1];
|
|
var button=header.firstChild;
|
|
if (button!='IMG'){
|
|
divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
|
|
button=document.createElement('img');
|
|
divs[i].insertBefore(button,divs[i].firstChild);
|
|
}
|
|
header.style.cursor='pointer';
|
|
header.onclick=changeDisplayState;
|
|
header.id='dynheader'+sectionCounter;
|
|
button.src='closed.gif';
|
|
section.id='dynsection'+sectionCounter;
|
|
section.style.display='none';
|
|
section.style.marginLeft='14px';
|
|
sectionCounter++;
|
|
}
|
|
}
|
|
}
|
|
window.onload = initDynSections;
|
|
-->
|
|
</script>
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="main.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
</ul>
|
</ul>
|
</div>
|
</div>
|
<div class="tabs">
|
<div id="navrow2" class="tabs2">
|
<ul>
|
<ul class="tablist">
|
<li><a href="files.html"><span>File List</span></a></li>
|
<li><a href="files.html"><span>File List</span></a></li>
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
</ul>
|
</ul>
|
</div>
|
</div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
</div>
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){initNavTree('avs__aes_8h.html','');});
|
|
</script>
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Data Structures</a> |
|
|
<a href="#define-members">Macros</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">avs_aes.h File Reference</div> </div>
|
|
</div><!--header-->
|
<div class="contents">
|
<div class="contents">
|
<h1>avs_aes.h File Reference</h1>
|
|
<p>header file for AES Avalon IP Core software driver offers interfaces to convinient access to the core
|
<p>header file for AES Avalon IP Core software driver offers interfaces to convinient access to the core
|
<a href="#_details">More...</a></p>
|
<a href="#details">More...</a></p>
|
<div class="dynheader">
|
<div class="textblock"><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
|
This graph shows which files directly or indirectly include this file:</div>
|
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> This graph shows which files directly or indirectly include this file:</div>
|
<div class="dynsection">
|
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
|
<div class="center"><img src="avs__aes_8h__dep__incl.png" border="0" usemap="#avs__aes_8hdep_map" alt=""/></div>
|
</div>
|
<map name="avs__aes_8hdep_map" id="avs__aes_8hdep">
|
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
|
<area shape="rect" href="AEStester_8c.html" title="test program and example of how to use the software" alt="" coords="5,83,96,112"/><area shape="rect" href="avs__aes_8c.html" title="AES Avalon IP Core software driver." alt="" coords="120,83,200,112"/></map>
|
<div class="center"><img src="avs__aes_8h__dep__incl.png" border="0" usemap="#avs__aes_8hdep" alt=""/></div>
|
|
<map name="avs__aes_8hdep" id="avs__aes_8hdep">
|
|
<area shape="rect" id="node3" href="AEStester_8c.html" title="test program and example of how to use the software " alt="" coords="5,83,96,111"/><area shape="rect" id="node5" href="avs__aes_8c.html" title="AES Avalon IP Core software driver. " alt="" coords="120,83,197,111"/></map>
|
|
</div>
|
</div>
|
</div>
|
|
|
<p><a href="avs__aes_8h_source.html">Go to the source code of this file.</a></p>
|
<p><a href="avs__aes_8h_source.html">Go to the source code of this file.</a></p>
|
<table border="0" cellpadding="0" cellspacing="0">
|
<table class="memberdecls">
|
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a></td></tr>
|
Data Structures</h2></td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">object storing addresses for this Avalon AES slave might be useful in case there are more attached, also for convinience <a href="structavs__aes__handle.html#_details">More...</a><br/></td></tr>
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a></td></tr>
|
<tr><td colspan="2"><h2>Defines</h2></td></tr>
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">object storing addresses for this Avalon AES slave might be useful in case there are more attached, also for convinience <a href="structavs__aes__handle.html#details">More...</a><br/></td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a40ac9fbe108b0ea74f57215528f13196">KEYWORDS</a> 8</td></tr>
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Keylength 256 Bit AES. <a href="#a40ac9fbe108b0ea74f57215528f13196"></a><br/></td></tr>
|
</table><table class="memberdecls">
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#aa93e16f5419a2515d4ebbd5368e9a8c5">AES_BASEADDR</a> 0x40000</td></tr>
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">base address of the Avalon Slave component in memory map <a href="#aa93e16f5419a2515d4ebbd5368e9a8c5"></a><br/></td></tr>
|
Macros</h2></td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#ac237029d30090de9c406fd8cf6f9df37">KEY_ADDR</a> AES_BASEADDR+0x00</td></tr>
|
<tr class="memitem:a40ac9fbe108b0ea74f57215528f13196"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a40ac9fbe108b0ea74f57215528f13196">KEYWORDS</a>   8</td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">memory offset for key DON'T CHANGE! <a href="#ac237029d30090de9c406fd8cf6f9df37"></a><br/></td></tr>
|
<tr class="memdesc:a40ac9fbe108b0ea74f57215528f13196"><td class="mdescLeft"> </td><td class="mdescRight">Keylength 256 Bit AES. <a href="#a40ac9fbe108b0ea74f57215528f13196">More...</a><br/></td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a622ef33a8b85e8a7558ce42e9fc73870">DATA_ADDR</a> AES_BASEADDR+0x08</td></tr>
|
<tr class="separator:a40ac9fbe108b0ea74f57215528f13196"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">memory offset of payload DON'T CHANGE! <a href="#a622ef33a8b85e8a7558ce42e9fc73870"></a><br/></td></tr>
|
<tr class="memitem:aa93e16f5419a2515d4ebbd5368e9a8c5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#aa93e16f5419a2515d4ebbd5368e9a8c5">AES_BASEADDR</a>   0x40000</td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#add31e6954a8ef1d40c63409f686135b9">RESULT_ADDR</a> AES_BASEADDR+0x10</td></tr>
|
<tr class="memdesc:aa93e16f5419a2515d4ebbd5368e9a8c5"><td class="mdescLeft"> </td><td class="mdescRight">base address of the Avalon Slave component in memory map <a href="#aa93e16f5419a2515d4ebbd5368e9a8c5">More...</a><br/></td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">memory offset of result DON'T CHANGE! <a href="#add31e6954a8ef1d40c63409f686135b9"></a><br/></td></tr>
|
<tr class="separator:aa93e16f5419a2515d4ebbd5368e9a8c5"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a939a4e25c6ce6c1224b8d923038f6639">AESCTRLWD</a> AES_BASEADDR+0x18</td></tr>
|
<tr class="memitem:gaf27449032ce353aa329edd80cd2759a5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__control-register.html#gaf27449032ce353aa329edd80cd2759a5">KEY_VALID</a>   (1 << 7)</td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">memory offset for control word DON'T CHANGE! <a href="#a939a4e25c6ce6c1224b8d923038f6639"></a><br/></td></tr>
|
<tr class="memdesc:gaf27449032ce353aa329edd80cd2759a5"><td class="mdescLeft"> </td><td class="mdescRight">Signal load of new key valid. <a href="group__control-register.html#gaf27449032ce353aa329edd80cd2759a5">More...</a><br/></td></tr>
|
<tr><td colspan="2"><h2>Functions</h2></td></tr>
|
<tr class="separator:gaf27449032ce353aa329edd80cd2759a5"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a962dd946798faab0e83d401c7d43c33c">avs_aes_init</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
<tr class="memitem:gab062bac21e942042e0e9a0b5c8bc6c04"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__control-register.html#gab062bac21e942042e0e9a0b5c8bc6c04">IRQ_ENA</a>   (1 << 6)</td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">setup the context to be used later. <a href="#a962dd946798faab0e83d401c7d43c33c"></a><br/></td></tr>
|
<tr class="memdesc:gab062bac21e942042e0e9a0b5c8bc6c04"><td class="mdescLeft"> </td><td class="mdescRight">Enable interrupt bit. <a href="group__control-register.html#gab062bac21e942042e0e9a0b5c8bc6c04">More...</a><br/></td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#af18edc2beecc3842a131423f55c7636a">avs_aes_setKey</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context, unsigned int *key)</td></tr>
|
<tr class="separator:gab062bac21e942042e0e9a0b5c8bc6c04"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">setup the context to be used later. <a href="#af18edc2beecc3842a131423f55c7636a"></a><br/></td></tr>
|
<tr class="memitem:ga36fab47015485191712a579a059a7c20"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__control-register.html#ga36fab47015485191712a579a059a7c20">DECRYPT</a>   (1 << 1)</td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a22f9afae76f645e31b514b5aa4df2cc1">avs_aes_setPayload</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context, unsigned int *payload)</td></tr>
|
<tr class="memdesc:ga36fab47015485191712a579a059a7c20"><td class="mdescLeft"> </td><td class="mdescRight">Start decryption bit. <a href="group__control-register.html#ga36fab47015485191712a579a059a7c20">More...</a><br/></td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">loads payload for processing to the core basically memcopy. <a href="#a22f9afae76f645e31b514b5aa4df2cc1"></a><br/></td></tr>
|
<tr class="separator:ga36fab47015485191712a579a059a7c20"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a55f078baaf019797ab6de7ea1a02475f">avs_aes_setKeyvalid</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
<tr class="memitem:ga1cb0c60ca582db30ae87362ca43e8c19"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__control-register.html#ga1cb0c60ca582db30ae87362ca43e8c19">ENCRYPT</a>   (1 << 0)</td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">set the KEY_VALID flag in the control word used to signal the completion of writing the key ( <a class="el" href="avs__aes_8h.html#af18edc2beecc3842a131423f55c7636a">avs_aes_setKey</a> ) <a href="#a55f078baaf019797ab6de7ea1a02475f"></a><br/></td></tr>
|
<tr class="memdesc:ga1cb0c60ca582db30ae87362ca43e8c19"><td class="mdescLeft"> </td><td class="mdescRight">start encryption bit <a href="group__control-register.html#ga1cb0c60ca582db30ae87362ca43e8c19">More...</a><br/></td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#acea23b2ab998f18b9aca810765632cac">avs_aes_encrypt</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
<tr class="separator:ga1cb0c60ca582db30ae87362ca43e8c19"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">set the ENCRYPT flag in the control word start encryption of (hopefully) previously loaded payload <a href="#acea23b2ab998f18b9aca810765632cac"></a><br/></td></tr>
|
</table><table class="memberdecls">
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#aef16b7ecbb1b091934a9c670ce3b2fcf">avs_aes_decrypt</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">set the DECRYPT flag in the control word start encryption of (hopefully) previously loaded payload <a href="#aef16b7ecbb1b091934a9c670ce3b2fcf"></a><br/></td></tr>
|
Functions</h2></td></tr>
|
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a827a78f73dd8fef9d2c9e72ad9bb4ea9">avs_aes_isBusy</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
<tr class="memitem:a962dd946798faab0e83d401c7d43c33c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a962dd946798faab0e83d401c7d43c33c">avs_aes_init</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">checks the COMPLETED flag can be used for ugly polling the slave if IRQs are not used <a href="#a827a78f73dd8fef9d2c9e72ad9bb4ea9"></a><br/></td></tr>
|
<tr class="memdesc:a962dd946798faab0e83d401c7d43c33c"><td class="mdescLeft"> </td><td class="mdescRight">setup the context to be used later. <a href="#a962dd946798faab0e83d401c7d43c33c">More...</a><br/></td></tr>
|
|
<tr class="separator:a962dd946798faab0e83d401c7d43c33c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af18edc2beecc3842a131423f55c7636a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#af18edc2beecc3842a131423f55c7636a">avs_aes_setKey</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context, unsigned int *key)</td></tr>
|
|
<tr class="memdesc:af18edc2beecc3842a131423f55c7636a"><td class="mdescLeft"> </td><td class="mdescRight">Set a new key This call asserts the KEY_VALID flag and triggers the key-expansion in the core. <a href="#af18edc2beecc3842a131423f55c7636a">More...</a><br/></td></tr>
|
|
<tr class="separator:af18edc2beecc3842a131423f55c7636a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a22f9afae76f645e31b514b5aa4df2cc1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a22f9afae76f645e31b514b5aa4df2cc1">avs_aes_setPayload</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context, unsigned int *payload)</td></tr>
|
|
<tr class="memdesc:a22f9afae76f645e31b514b5aa4df2cc1"><td class="mdescLeft"> </td><td class="mdescRight">loads payload for processing to the core basically memcopy... <a href="#a22f9afae76f645e31b514b5aa4df2cc1">More...</a><br/></td></tr>
|
|
<tr class="separator:a22f9afae76f645e31b514b5aa4df2cc1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a55f078baaf019797ab6de7ea1a02475f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a55f078baaf019797ab6de7ea1a02475f">avs_aes_setKeyvalid</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
|
<tr class="memdesc:a55f078baaf019797ab6de7ea1a02475f"><td class="mdescLeft"> </td><td class="mdescRight">set the KEY_VALID flag in the control word used to signal the completion of writing the key ( <a class="el" href="avs__aes_8h.html#af18edc2beecc3842a131423f55c7636a">avs_aes_setKey</a> ) <a href="#a55f078baaf019797ab6de7ea1a02475f">More...</a><br/></td></tr>
|
|
<tr class="separator:a55f078baaf019797ab6de7ea1a02475f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:acea23b2ab998f18b9aca810765632cac"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#acea23b2ab998f18b9aca810765632cac">avs_aes_encrypt</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
|
<tr class="memdesc:acea23b2ab998f18b9aca810765632cac"><td class="mdescLeft"> </td><td class="mdescRight">set the ENCRYPT flag in the control word start encryption of (hopefully) previously loaded payload <a href="#acea23b2ab998f18b9aca810765632cac">More...</a><br/></td></tr>
|
|
<tr class="separator:acea23b2ab998f18b9aca810765632cac"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aef16b7ecbb1b091934a9c670ce3b2fcf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#aef16b7ecbb1b091934a9c670ce3b2fcf">avs_aes_decrypt</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
|
<tr class="memdesc:aef16b7ecbb1b091934a9c670ce3b2fcf"><td class="mdescLeft"> </td><td class="mdescRight">set the DECRYPT flag in the control word start encryption of (hopefully) previously loaded payload <a href="#aef16b7ecbb1b091934a9c670ce3b2fcf">More...</a><br/></td></tr>
|
|
<tr class="separator:aef16b7ecbb1b091934a9c670ce3b2fcf"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a827a78f73dd8fef9d2c9e72ad9bb4ea9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="avs__aes_8h.html#a827a78f73dd8fef9d2c9e72ad9bb4ea9">avs_aes_isBusy</a> (<a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> *context)</td></tr>
|
|
<tr class="memdesc:a827a78f73dd8fef9d2c9e72ad9bb4ea9"><td class="mdescLeft"> </td><td class="mdescRight">checks the COMPLETED flag can be used for ugly polling the slave if IRQs are not used <a href="#a827a78f73dd8fef9d2c9e72ad9bb4ea9">More...</a><br/></td></tr>
|
|
<tr class="separator:a827a78f73dd8fef9d2c9e72ad9bb4ea9"><td class="memSeparator" colspan="2"> </td></tr>
|
</table>
|
</table>
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
<p>header file for AES Avalon IP Core software driver offers interfaces to convinient access to the core </p>
|
<div class="textblock"><p>header file for AES Avalon IP Core software driver offers interfaces to convinient access to the core </p>
|
<p>This file is part of the project avs_aes see: <a href="http://opencores.org/project,avs_aes">http://opencores.org/project,avs_aes</a></p>
|
<p>This file is part of the project avs_aes see: <a href="http://opencores.org/project,avs_aes">http://opencores.org/project,avs_aes</a></p>
|
<h2><a class="anchor" id="AUTHORS">
|
<h1><a class="anchor" id="AUTHORS"></a>
|
AUTHORS</a></h2>
|
AUTHORS</h1>
|
<p>Thomas Ruschival -- <a href="mailto:ruschi@opencores.org">ruschi@opencores.org</a> (www.ruschival.de)</p>
|
<p>Thomas Ruschival – <a href="#" onclick="location.href='mai'+'lto:'+'rus'+'ch'+'i@o'+'pe'+'nco'+'re'+'s.o'+'rg'; return false;">rusch<span style="display: none;">.nosp@m.</span>i@op<span style="display: none;">.nosp@m.</span>encor<span style="display: none;">.nosp@m.</span>es.o<span style="display: none;">.nosp@m.</span>rg</a> (www.ruschival.de)</p>
|
<h2><a class="anchor" id="LICENSE">
|
<h1><a class="anchor" id="LICENSE"></a>
|
LICENSE</a></h2>
|
LICENSE</h1>
|
<p>Copyright (c) 2009, Authors and opencores.org All rights reserved.</p>
|
<p>Copyright (c) 2009, Authors and opencores.org All rights reserved.</p>
|
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE </p>
|
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>
|
|
<ul>
|
|
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
|
|
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
|
|
<li>Neither the name of the organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE </li>
|
|
</ul>
|
|
|
<p>Definition in file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
<p>Definition in file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
<hr/><h2>Define Documentation</h2>
|
</div><h2 class="groupheader">Macro Definition Documentation</h2>
|
<a class="anchor" id="aa93e16f5419a2515d4ebbd5368e9a8c5"></a><!-- doxytag: member="avs_aes.h::AES_BASEADDR" ref="aa93e16f5419a2515d4ebbd5368e9a8c5" args="" -->
|
<a class="anchor" id="aa93e16f5419a2515d4ebbd5368e9a8c5"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">#define AES_BASEADDR 0x40000</td>
|
<td class="memname">#define AES_BASEADDR   0x40000</td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>base address of the Avalon Slave component in memory map </p>
|
<p>base address of the Avalon Slave component in memory map </p>
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8h_source.html#l00060">60</a> of file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
<p>Definition at line <a class="el" href="avs__aes_8h_source.html#l00059">59</a> of file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<a class="anchor" id="a939a4e25c6ce6c1224b8d923038f6639"></a><!-- doxytag: member="avs_aes.h::AESCTRLWD" ref="a939a4e25c6ce6c1224b8d923038f6639" args="" -->
|
<a class="anchor" id="a40ac9fbe108b0ea74f57215528f13196"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">#define AESCTRLWD AES_BASEADDR+0x18</td>
|
<td class="memname">#define KEYWORDS   8</td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>memory offset for control word DON'T CHANGE! </p>
|
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8h_source.html#l00075">75</a> of file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a622ef33a8b85e8a7558ce42e9fc73870"></a><!-- doxytag: member="avs_aes.h::DATA_ADDR" ref="a622ef33a8b85e8a7558ce42e9fc73870" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define DATA_ADDR AES_BASEADDR+0x08</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>memory offset of payload DON'T CHANGE! </p>
|
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8h_source.html#l00071">71</a> of file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac237029d30090de9c406fd8cf6f9df37"></a><!-- doxytag: member="avs_aes.h::KEY_ADDR" ref="ac237029d30090de9c406fd8cf6f9df37" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define KEY_ADDR AES_BASEADDR+0x00</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>memory offset for key DON'T CHANGE! </p>
|
|
<h2><a class="anchor" id="Constants">
|
|
Constants</a></h2>
|
|
<p>Constants no need to change them! </p>
|
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8h_source.html#l00069">69</a> of file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a40ac9fbe108b0ea74f57215528f13196"></a><!-- doxytag: member="avs_aes.h::KEYWORDS" ref="a40ac9fbe108b0ea74f57215528f13196" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define KEYWORDS 8</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Keylength 256 Bit AES. </p>
|
<p>Keylength 256 Bit AES. </p>
|
<h2><a class="anchor" id="Configuration">
|
<h1><a class="anchor" id="Configuration"></a>
|
Configuration</a></h2>
|
Configuration</h1>
|
<p>Configuration items for the Avalon Slave component change them or define them elsewhere </p>
|
<p>Configuration items for the Avalon Slave component change them or define them elsewhere </p>
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8h_source.html#l00053">53</a> of file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
<p>Definition at line <a class="el" href="avs__aes_8h_source.html#l00052">52</a> of file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="add31e6954a8ef1d40c63409f686135b9"></a><!-- doxytag: member="avs_aes.h::RESULT_ADDR" ref="add31e6954a8ef1d40c63409f686135b9" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define RESULT_ADDR AES_BASEADDR+0x10</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>memory offset of result DON'T CHANGE! </p>
|
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8h_source.html#l00073">73</a> of file <a class="el" href="avs__aes_8h_source.html">avs_aes.h</a>.</p>
|
|
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<hr/><h2>Function Documentation</h2>
|
<h2 class="groupheader">Function Documentation</h2>
|
<a class="anchor" id="aef16b7ecbb1b091934a9c670ce3b2fcf"></a><!-- doxytag: member="avs_aes.h::avs_aes_decrypt" ref="aef16b7ecbb1b091934a9c670ce3b2fcf" args="(avs_aes_handle *context)" -->
|
<a class="anchor" id="aef16b7ecbb1b091934a9c670ce3b2fcf"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">void avs_aes_decrypt </td>
|
<td class="memname">void avs_aes_decrypt </td>
|
<td>(</td>
|
<td>(</td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramname"> <em>context</em></td>
|
<td class="paramname"><em>context</em>)</td><td></td>
|
<td> ) </td>
|
|
<td></td>
|
<td></td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>set the DECRYPT flag in the control word start encryption of (hopefully) previously loaded payload </p>
|
<p>set the DECRYPT flag in the control word start encryption of (hopefully) previously loaded payload </p>
|
<dl><dt><b>Parameters:</b></dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
<table border="0" cellspacing="2" cellpadding="0">
|
<table class="params">
|
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>struct grouping address information </td></tr>
|
<tr><td class="paramname">context</td><td>struct grouping address information </td></tr>
|
</table>
|
</table>
|
</dd>
|
</dd>
|
</dl>
|
</dl>
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00115">115</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00098">98</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  {</div>
|
<p><div class="fragment"><pre class="fragment"><a name="l00115"></a>00115 {
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word ">control</a>) |= <a class="code" href="group__control-register.html#ga36fab47015485191712a579a059a7c20" title="Start decryption bit. ">DECRYPT</a>;</div>
|
<a name="l00116"></a>00116 *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word">control</a>) |= 0x00000002;
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keyword">asm</span> __volatile(<span class="stringliteral">"sync"</span> :::);</div>
|
<a name="l00117"></a>00117 }
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> }</div>
|
</pre></div></p>
|
</div><!-- fragment -->
|
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<a class="anchor" id="acea23b2ab998f18b9aca810765632cac"></a><!-- doxytag: member="avs_aes.h::avs_aes_encrypt" ref="acea23b2ab998f18b9aca810765632cac" args="(avs_aes_handle *context)" -->
|
<a class="anchor" id="acea23b2ab998f18b9aca810765632cac"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">void avs_aes_encrypt </td>
|
<td class="memname">void avs_aes_encrypt </td>
|
<td>(</td>
|
<td>(</td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramname"> <em>context</em></td>
|
<td class="paramname"><em>context</em>)</td><td></td>
|
<td> ) </td>
|
|
<td></td>
|
<td></td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>set the ENCRYPT flag in the control word start encryption of (hopefully) previously loaded payload </p>
|
<p>set the ENCRYPT flag in the control word start encryption of (hopefully) previously loaded payload </p>
|
<dl><dt><b>Parameters:</b></dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
<table border="0" cellspacing="2" cellpadding="0">
|
<table class="params">
|
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>struct grouping address information </td></tr>
|
<tr><td class="paramname">context</td><td>struct grouping address information </td></tr>
|
</table>
|
</table>
|
</dd>
|
</dd>
|
</dl>
|
</dl>
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00106">106</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00092">92</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  {</div>
|
<p><div class="fragment"><pre class="fragment"><a name="l00106"></a>00106 {
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word ">control</a>) |= <a class="code" href="group__control-register.html#ga1cb0c60ca582db30ae87362ca43e8c19" title="start encryption bit ">ENCRYPT</a>;</div>
|
<a name="l00107"></a>00107 *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word">control</a>) |= 0x00000001;
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keyword">asm</span> __volatile(<span class="stringliteral">"sync"</span> :::);</div>
|
<a name="l00108"></a>00108 }
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> }</div>
|
</pre></div></p>
|
</div><!-- fragment -->
|
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<a class="anchor" id="a962dd946798faab0e83d401c7d43c33c"></a><!-- doxytag: member="avs_aes.h::avs_aes_init" ref="a962dd946798faab0e83d401c7d43c33c" args="(avs_aes_handle *context)" -->
|
<a class="anchor" id="a962dd946798faab0e83d401c7d43c33c"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">void avs_aes_init </td>
|
<td class="memname">void avs_aes_init </td>
|
<td>(</td>
|
<td>(</td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramname"> <em>context</em></td>
|
<td class="paramname"><em>context</em>)</td><td></td>
|
<td> ) </td>
|
|
<td></td>
|
<td></td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>setup the context to be used later. </p>
|
<p>setup the context to be used later. </p>
|
<h2><a class="anchor" id="functions">
|
<h1><a class="anchor" id="functions"></a>
|
functions</a></h2>
|
functions</h1>
|
<p>initializes the pointers to the correct memory locations </p>
|
<p>initializes the pointers to the correct memory locations </p>
|
<dl><dt><b>Parameters:</b></dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
<table border="0" cellspacing="2" cellpadding="0">
|
<table class="params">
|
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>: struct grouping address information</td></tr>
|
<tr><td class="paramname">context</td><td>: struct grouping address information </td></tr>
|
</table>
|
</table>
|
</dd>
|
</dd>
|
</dl>
|
</dl>
|
<p>initializes the pointers to the correct memory locations </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>: struct grouping address information </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00047">47</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
|
|
<p><div class="fragment"><pre class="fragment"><a name="l00047"></a>00047 {
|
|
<a name="l00048"></a>00048 context-><a class="code" href="structavs__aes__handle.html#acb9eb474c8310afe4b082b79914f274c" title="pointer &quot;KEY&quot; field in memory mapping">key</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*) <a class="code" href="avs__aes_8h.html#ac237029d30090de9c406fd8cf6f9df37" title="memory offset for key DON&#39;T CHANGE!">KEY_ADDR</a>;
|
|
<a name="l00049"></a>00049 context-><a class="code" href="structavs__aes__handle.html#adae23dc33b7dec54b9da34f347256214" title="pointer &quot;data&quot; field in memory mapping used for both decryption and encryption...">payload</a>= (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*) <a class="code" href="avs__aes_8h.html#a622ef33a8b85e8a7558ce42e9fc73870" title="memory offset of payload DON&#39;T CHANGE!">DATA_ADDR</a>;
|
|
<a name="l00050"></a>00050 context-><a class="code" href="structavs__aes__handle.html#ae0ad9e7bde68d07c018a299a0cda66af" title="pointer &quot;RESULT&quot; field in memory mapping">result</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*) <a class="code" href="avs__aes_8h.html#add31e6954a8ef1d40c63409f686135b9" title="memory offset of result DON&#39;T CHANGE!">RESULT_ADDR</a>;
|
|
<a name="l00051"></a>00051 context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word">control</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*) <a class="code" href="avs__aes_8h.html#a939a4e25c6ce6c1224b8d923038f6639" title="memory offset for control word DON&#39;T CHANGE!">AESCTRLWD</a>;
|
|
<a name="l00052"></a>00052 *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word">control</a>) = 0x00000000;
|
|
<a name="l00053"></a>00053 }
|
|
</pre></div></p>
|
|
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00053">53</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  {</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  context-><a class="code" href="structavs__aes__handle.html#acb9eb474c8310afe4b082b79914f274c" title="pointer to key field in memory mapping ">key</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*) <a class="code" href="avs__aes_8c.html#aac9313626ecf492e39b0f4add66e370d" title="memory offset for key DON'T CHANGE! ">KEY_ADDR</a>;</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  context-><a class="code" href="structavs__aes__handle.html#adae23dc33b7dec54b9da34f347256214" title="pointer to data field in memory mapping used for both decryption and encryption ">payload</a>= (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*) <a class="code" href="avs__aes_8c.html#a994843be3758f70aa91454a9ddfacb19" title="memory offset of payload ">DATA_ADDR</a>;</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  context-><a class="code" href="structavs__aes__handle.html#ae0ad9e7bde68d07c018a299a0cda66af" title="pointer to result field in memory mapping ">result</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*) <a class="code" href="avs__aes_8c.html#a192250a419c33c4ff96948f692a44254" title="memory offset of result ">RESULT_ADDR</a>;</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word ">control</a> = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*) <a class="code" href="avs__aes_8c.html#a30e81662ebaec8c1b8a283c42e88df36" title="memory offset for control word ">AESCTRLWD</a>;</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word ">control</a>) = 0x00000000;</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> }</div>
|
|
</div><!-- fragment -->
|
</div>
|
</div>
|
</div>
|
</div>
|
<a class="anchor" id="a827a78f73dd8fef9d2c9e72ad9bb4ea9"></a><!-- doxytag: member="avs_aes.h::avs_aes_isBusy" ref="a827a78f73dd8fef9d2c9e72ad9bb4ea9" args="(avs_aes_handle *context)" -->
|
<a class="anchor" id="a827a78f73dd8fef9d2c9e72ad9bb4ea9"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">int avs_aes_isBusy </td>
|
<td class="memname">int avs_aes_isBusy </td>
|
<td>(</td>
|
<td>(</td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramname"> <em>context</em></td>
|
<td class="paramname"><em>context</em>)</td><td></td>
|
<td> ) </td>
|
|
<td></td>
|
<td></td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>checks the COMPLETED flag can be used for ugly polling the slave if IRQs are not used </p>
|
<p>checks the COMPLETED flag can be used for ugly polling the slave if IRQs are not used </p>
|
<dl><dt><b>Parameters:</b></dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
<table border="0" cellspacing="2" cellpadding="0">
|
<table class="params">
|
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>struct grouping address information </td></tr>
|
<tr><td class="paramname">context</td><td>struct grouping address information </td></tr>
|
</table>
|
</table>
|
</dd>
|
</dd>
|
</dl>
|
</dl>
|
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if still computing 0 if done. </dd></dl>
|
<dl class="section return"><dt>Returns</dt><dd>1 if still computing 0 if done. </dd></dl>
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00125">125</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
|
|
<p><div class="fragment"><pre class="fragment"><a name="l00125"></a>00125 {
|
|
<a name="l00126"></a>00126 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mycontrol = *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word">control</a>);
|
|
<a name="l00127"></a>00127 <span class="keywordflow">return</span> mycontrol & 0x03;
|
|
<a name="l00128"></a>00128 }
|
|
</pre></div></p>
|
|
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00104">104</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  {</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mycontrol = *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word ">control</a>); </div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordflow">return</span> mycontrol & (<a class="code" href="group__control-register.html#ga36fab47015485191712a579a059a7c20" title="Start decryption bit. ">DECRYPT</a> | <a class="code" href="group__control-register.html#ga1cb0c60ca582db30ae87362ca43e8c19" title="start encryption bit ">ENCRYPT</a>);</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> }</div>
|
|
</div><!-- fragment -->
|
</div>
|
</div>
|
</div>
|
</div>
|
<a class="anchor" id="af18edc2beecc3842a131423f55c7636a"></a><!-- doxytag: member="avs_aes.h::avs_aes_setKey" ref="af18edc2beecc3842a131423f55c7636a" args="(avs_aes_handle *context, unsigned int *key)" -->
|
<a class="anchor" id="af18edc2beecc3842a131423f55c7636a"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">void avs_aes_setKey </td>
|
<td class="memname">void avs_aes_setKey </td>
|
<td>(</td>
|
<td>(</td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramname"> <em>context</em>, </td>
|
<td class="paramname"> <em>context</em>, </td>
|
</tr>
|
</tr>
|
<tr>
|
<tr>
|
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
<td></td>
|
<td></td>
|
<td class="paramtype">unsigned int * </td>
|
<td class="paramtype">unsigned int * </td>
|
<td class="paramname"> <em>key</em></td><td> </td>
|
<td class="paramname"><em>key</em> </td>
|
</tr>
|
</tr>
|
<tr>
|
<tr>
|
<td></td>
|
<td></td>
|
<td>)</td>
|
<td>)</td>
|
<td></td><td></td><td></td>
|
<td></td><td></td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>setup the context to be used later. </p>
|
<p>Set a new key This call asserts the KEY_VALID flag and triggers the key-expansion in the core. </p>
|
<p>initializes the pointers to the correct memory locations </p>
|
<dl class="params"><dt>Parameters</dt><dd>
|
<dl><dt><b>Parameters:</b></dt><dd>
|
<table class="params">
|
<table border="0" cellspacing="2" cellpadding="0">
|
<tr><td class="paramname">context</td><td>struct grouping address information </td></tr>
|
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>struct grouping address information </td></tr>
|
<tr><td class="paramname">key</td><td>user key to load </td></tr>
|
<tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>user key to load </td></tr>
|
|
</table>
|
</table>
|
</dd>
|
</dd>
|
</dl>
|
</dl>
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00062">62</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00062">62</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  {</div>
|
<p><div class="fragment"><pre class="fragment"><a name="l00062"></a>00062 {
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordtype">int</span> i=0;</div>
|
<a name="l00063"></a>00063 <span class="keywordtype">int</span> i=0;
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* target_ptr = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* )context-><a class="code" href="structavs__aes__handle.html#acb9eb474c8310afe4b082b79914f274c" title="pointer to key field in memory mapping ">key</a>;</div>
|
<a name="l00064"></a>00064 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* target_ptr = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* )context-><a class="code" href="structavs__aes__handle.html#acb9eb474c8310afe4b082b79914f274c" title="pointer &quot;KEY&quot; field in memory mapping">key</a>;
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="comment">/* Invalidate old key; */</span></div>
|
<a name="l00065"></a>00065 <span class="comment">// Invalidate old key;</span>
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word ">control</a>) &= (~<a class="code" href="group__control-register.html#gaf27449032ce353aa329edd80cd2759a5" title="Signal load of new key valid. ">KEY_VALID</a>);</div>
|
<a name="l00066"></a>00066 *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word">control</a>) &= (~0x00000080);
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keyword">asm</span> __volatile(<span class="stringliteral">"sync"</span> :::);</div>
|
<a name="l00067"></a>00067 <span class="keywordflow">for</span>(i=0; i<<a class="code" href="avs__aes_8h.html#a40ac9fbe108b0ea74f57215528f13196" title="Keylength 256 Bit AES.">KEYWORDS</a>; i++){
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">for</span>(i=0; i<<a class="code" href="avs__aes_8h.html#a40ac9fbe108b0ea74f57215528f13196" title="Keylength 256 Bit AES. ">KEYWORDS</a>; i++){</div>
|
<a name="l00068"></a>00068 *(target_ptr++) = *(key++);
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  *(target_ptr++) = *(key++);</div>
|
<a name="l00069"></a>00069 }
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  }</div>
|
<a name="l00070"></a>00070 <span class="comment">// validate key;</span>
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keyword">asm</span> __volatile(<span class="stringliteral">"sync"</span> :::);</div>
|
<a name="l00071"></a>00071 *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word">control</a>) |= 0x00000080;
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="comment">/* validate key */</span></div>
|
<a name="l00072"></a>00072 }
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word ">control</a>) |= <a class="code" href="group__control-register.html#gaf27449032ce353aa329edd80cd2759a5" title="Signal load of new key valid. ">KEY_VALID</a>;</div>
|
</pre></div></p>
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> }</div>
|
|
</div><!-- fragment -->
|
</div>
|
</div>
|
</div>
|
</div>
|
<a class="anchor" id="a55f078baaf019797ab6de7ea1a02475f"></a><!-- doxytag: member="avs_aes.h::avs_aes_setKeyvalid" ref="a55f078baaf019797ab6de7ea1a02475f" args="(avs_aes_handle *context)" -->
|
<a class="anchor" id="a55f078baaf019797ab6de7ea1a02475f"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">void avs_aes_setKeyvalid </td>
|
<td class="memname">void avs_aes_setKeyvalid </td>
|
<td>(</td>
|
<td>(</td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramname"> <em>context</em></td>
|
<td class="paramname"><em>context</em>)</td><td></td>
|
<td> ) </td>
|
|
<td></td>
|
<td></td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>set the KEY_VALID flag in the control word used to signal the completion of writing the key ( <a class="el" href="avs__aes_8h.html#af18edc2beecc3842a131423f55c7636a">avs_aes_setKey</a> ) </p>
|
<p>set the KEY_VALID flag in the control word used to signal the completion of writing the key ( <a class="el" href="avs__aes_8h.html#af18edc2beecc3842a131423f55c7636a">avs_aes_setKey</a> ) </p>
|
<dl><dt><b>Parameters:</b></dt><dd>
|
<dl class="params"><dt>Parameters</dt><dd>
|
<table border="0" cellspacing="2" cellpadding="0">
|
<table class="params">
|
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>struct grouping address information </td></tr>
|
<tr><td class="paramname">context</td><td>struct grouping address information </td></tr>
|
</table>
|
</table>
|
</dd>
|
</dd>
|
</dl>
|
</dl>
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00096">96</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00086">86</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  {</div>
|
<p><div class="fragment"><pre class="fragment"><a name="l00096"></a>00096 {
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word ">control</a>) |= <a class="code" href="group__control-register.html#gaf27449032ce353aa329edd80cd2759a5" title="Signal load of new key valid. ">KEY_VALID</a>;</div>
|
<a name="l00097"></a>00097 *(context-><a class="code" href="structavs__aes__handle.html#a15143869a0c8bfcacc8e1839e4e789c9" title="pointer to control word">control</a>) |= 0x00000080;
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keyword">asm</span> __volatile(<span class="stringliteral">"sync"</span> :::);</div>
|
<a name="l00098"></a>00098 }
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> }</div>
|
</pre></div></p>
|
</div><!-- fragment -->
|
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<a class="anchor" id="a22f9afae76f645e31b514b5aa4df2cc1"></a><!-- doxytag: member="avs_aes.h::avs_aes_setPayload" ref="a22f9afae76f645e31b514b5aa4df2cc1" args="(avs_aes_handle *context, unsigned int *payload)" -->
|
<a class="anchor" id="a22f9afae76f645e31b514b5aa4df2cc1"></a>
|
<div class="memitem">
|
<div class="memitem">
|
<div class="memproto">
|
<div class="memproto">
|
<table class="memname">
|
<table class="memname">
|
<tr>
|
<tr>
|
<td class="memname">void avs_aes_setPayload </td>
|
<td class="memname">void avs_aes_setPayload </td>
|
<td>(</td>
|
<td>(</td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramtype"><a class="el" href="structavs__aes__handle.html">avs_aes_handle</a> * </td>
|
<td class="paramname"> <em>context</em>, </td>
|
<td class="paramname"> <em>context</em>, </td>
|
</tr>
|
</tr>
|
<tr>
|
<tr>
|
<td class="paramkey"></td>
|
<td class="paramkey"></td>
|
<td></td>
|
<td></td>
|
<td class="paramtype">unsigned int * </td>
|
<td class="paramtype">unsigned int * </td>
|
<td class="paramname"> <em>payload</em></td><td> </td>
|
<td class="paramname"><em>payload</em> </td>
|
</tr>
|
</tr>
|
<tr>
|
<tr>
|
<td></td>
|
<td></td>
|
<td>)</td>
|
<td>)</td>
|
<td></td><td></td><td></td>
|
<td></td><td></td>
|
</tr>
|
</tr>
|
</table>
|
</table>
|
</div>
|
</div><div class="memdoc">
|
<div class="memdoc">
|
|
|
|
<p>loads payload for processing to the core basically memcopy. </p>
|
<p>loads payload for processing to the core basically memcopy... </p>
|
<p>.. </p>
|
<dl class="params"><dt>Parameters</dt><dd>
|
<dl><dt><b>Parameters:</b></dt><dd>
|
<table class="params">
|
<table border="0" cellspacing="2" cellpadding="0">
|
<tr><td class="paramname">context</td><td>struct grouping address information </td></tr>
|
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>struct grouping address information </td></tr>
|
<tr><td class="paramname">payload</td><td>user data to be processed </td></tr>
|
<tr><td valign="top"></td><td valign="top"><em>payload</em> </td><td>user data to be processed </td></tr>
|
|
</table>
|
</table>
|
</dd>
|
</dd>
|
</dl>
|
</dl>
|
|
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00081">81</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
<p>Definition at line <a class="el" href="avs__aes_8c_source.html#l00077">77</a> of file <a class="el" href="avs__aes_8c_source.html">avs_aes.c</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  {</div>
|
<p><div class="fragment"><pre class="fragment"><a name="l00081"></a>00081 {
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordtype">int</span> i=0;</div>
|
<a name="l00082"></a>00082 <span class="keywordtype">int</span> i=0;
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* target_ptr = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* )context-><a class="code" href="structavs__aes__handle.html#adae23dc33b7dec54b9da34f347256214" title="pointer to data field in memory mapping used for both decryption and encryption ">payload</a>;</div>
|
<a name="l00083"></a>00083 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* target_ptr = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>* )context-><a class="code" href="structavs__aes__handle.html#adae23dc33b7dec54b9da34f347256214" title="pointer &quot;data&quot; field in memory mapping used for both decryption and encryption...">payload</a>;
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">for</span>(i=0; i<4; i++){</div>
|
<a name="l00084"></a>00084 <span class="keywordflow">for</span>(i=0; i<4; i++){
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  *(target_ptr++) = *(payload++);</div>
|
<a name="l00085"></a>00085 *(target_ptr++) = *(payload++);
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  } </div>
|
<a name="l00086"></a>00086 }
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> }</div>
|
<a name="l00087"></a>00087 }
|
</div><!-- fragment -->
|
</pre></div></p>
|
|
|
|
</div>
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<hr size="1"/><address style="text-align: right;"><small>Generated on Fri Apr 2 23:22:36 2010 for AES Avalon Slave (avs_aes) by
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="avs__aes_8h.html">avs_aes.h</a></li>
|
|
<li class="footer">Generated on Sat Apr 19 2014 17:55:55 for AES Avalon Slave (avs_aes) by
|
<a href="http://www.doxygen.org/index.html">
|
<a href="http://www.doxygen.org/index.html">
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.4 </li>
|
|
</ul>
|
|
</div>
|
</body>
|
</body>
|
</html>
|
</html>
|
|
|
No newline at end of file
|
No newline at end of file
|