1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00
arduinolibs/classAESTiny256.html
Rhys Weatherley 6fadd58f39 Update docs
2018-04-27 12:01:49 +10:00

431 lines
27 KiB
HTML

<!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">
<head>
<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.6"/>
<title>Arduino Cryptography Library: AESTiny256 Class Reference</title>
<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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Arduino Cryptography Library
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classAESTiny256-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">AESTiny256 Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>AES block cipher with 256-bit keys and tiny memory usage.
<a href="classAESTiny256.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="AES_8h_source.html">AES.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for AESTiny256:</div>
<div class="dyncontent">
<div class="center">
<img src="classAESTiny256.png" usemap="#AESTiny256_map" alt=""/>
<map id="AESTiny256_map" name="AESTiny256_map">
<area href="classBlockCipher.html" title="Abstract base class for block ciphers. " alt="BlockCipher" shape="rect" coords="0,0,88,24"/>
<area href="classAESSmall256.html" title="AES block cipher with 256-bit keys and reduced memory usage. " alt="AESSmall256" shape="rect" coords="0,112,88,136"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7af85adfdbd0a3bb68ef5a8f76102043"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAESTiny256.html#a7af85adfdbd0a3bb68ef5a8f76102043">AESTiny256</a> ()</td></tr>
<tr class="memdesc:a7af85adfdbd0a3bb68ef5a8f76102043"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an AES 256-bit block cipher with no initial key. <a href="#a7af85adfdbd0a3bb68ef5a8f76102043">More...</a><br/></td></tr>
<tr class="separator:a7af85adfdbd0a3bb68ef5a8f76102043"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f48f55b7600dfc672acda899928de76"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAESTiny256.html#a3f48f55b7600dfc672acda899928de76">blockSize</a> () const </td></tr>
<tr class="memdesc:a3f48f55b7600dfc672acda899928de76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of an AES block in bytes. <a href="#a3f48f55b7600dfc672acda899928de76">More...</a><br/></td></tr>
<tr class="separator:a3f48f55b7600dfc672acda899928de76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b5a2ba4829e79283c53248d3d8a7a06"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAESTiny256.html#a7b5a2ba4829e79283c53248d3d8a7a06">keySize</a> () const </td></tr>
<tr class="memdesc:a7b5a2ba4829e79283c53248d3d8a7a06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of a 256-bit AES key in bytes. <a href="#a7b5a2ba4829e79283c53248d3d8a7a06">More...</a><br/></td></tr>
<tr class="separator:a7b5a2ba4829e79283c53248d3d8a7a06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc162075b181bfca34144f4eec6deec7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAESTiny256.html#abc162075b181bfca34144f4eec6deec7">setKey</a> (const uint8_t *key, size_t len)</td></tr>
<tr class="memdesc:abc162075b181bfca34144f4eec6deec7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the key to use for future encryption and decryption operations. <a href="#abc162075b181bfca34144f4eec6deec7">More...</a><br/></td></tr>
<tr class="separator:abc162075b181bfca34144f4eec6deec7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36e4ffc85f7d7604d01a5629c185d0ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAESTiny256.html#a36e4ffc85f7d7604d01a5629c185d0ef">encryptBlock</a> (uint8_t *output, const uint8_t *input)</td></tr>
<tr class="memdesc:a36e4ffc85f7d7604d01a5629c185d0ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypts a single block using this cipher. <a href="#a36e4ffc85f7d7604d01a5629c185d0ef">More...</a><br/></td></tr>
<tr class="separator:a36e4ffc85f7d7604d01a5629c185d0ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdf72a52c37c060a9089693c118585bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAESTiny256.html#abdf72a52c37c060a9089693c118585bc">decryptBlock</a> (uint8_t *output, const uint8_t *input)</td></tr>
<tr class="memdesc:abdf72a52c37c060a9089693c118585bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypts a single block using this cipher. <a href="#abdf72a52c37c060a9089693c118585bc">More...</a><br/></td></tr>
<tr class="separator:abdf72a52c37c060a9089693c118585bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4cac6af2e78cbf399b7f6d0e613a578"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAESTiny256.html#ae4cac6af2e78cbf399b7f6d0e613a578">clear</a> ()</td></tr>
<tr class="memdesc:ae4cac6af2e78cbf399b7f6d0e613a578"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears all security-sensitive state from this block cipher. <a href="#ae4cac6af2e78cbf399b7f6d0e613a578">More...</a><br/></td></tr>
<tr class="separator:ae4cac6af2e78cbf399b7f6d0e613a578"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classBlockCipher"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classBlockCipher')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classBlockCipher.html">BlockCipher</a></td></tr>
<tr class="memitem:adc3d7cba116cbea9ad017f4cded6fe2f inherit pub_methods_classBlockCipher"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc3d7cba116cbea9ad017f4cded6fe2f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBlockCipher.html#adc3d7cba116cbea9ad017f4cded6fe2f">BlockCipher</a> ()</td></tr>
<tr class="memdesc:adc3d7cba116cbea9ad017f4cded6fe2f inherit pub_methods_classBlockCipher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a block cipher. <br/></td></tr>
<tr class="separator:adc3d7cba116cbea9ad017f4cded6fe2f inherit pub_methods_classBlockCipher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acec1bc4faeaa6dda2d91bffd79a988f9 inherit pub_methods_classBlockCipher"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBlockCipher.html#acec1bc4faeaa6dda2d91bffd79a988f9">~BlockCipher</a> ()</td></tr>
<tr class="memdesc:acec1bc4faeaa6dda2d91bffd79a988f9 inherit pub_methods_classBlockCipher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this block cipher object. <a href="#acec1bc4faeaa6dda2d91bffd79a988f9">More...</a><br/></td></tr>
<tr class="separator:acec1bc4faeaa6dda2d91bffd79a988f9 inherit pub_methods_classBlockCipher"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>AES block cipher with 256-bit keys and tiny memory usage. </p>
<p>This class differs from the <a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a> class in the following ways:</p>
<ul>
<li>RAM requirements are vastly reduced. The key is stored directly and then expanded to the full key schedule round by round. The <a class="el" href="classAESTiny256.html#abc162075b181bfca34144f4eec6deec7" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a> method is very fast because of this. </li>
<li>Performance of <a class="el" href="classAESTiny256.html#a36e4ffc85f7d7604d01a5629c185d0ef" title="Encrypts a single block using this cipher. ">encryptBlock()</a> is slower than for <a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a> due to expanding the key on the fly rather than ahead of time. </li>
<li>The <a class="el" href="classAESTiny256.html#abdf72a52c37c060a9089693c118585bc" title="Decrypts a single block using this cipher. ">decryptBlock()</a> function is not supported, which means that <a class="el" href="classCBC.html" title="Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers. ...">CBC</a> mode cannot be used but the <a class="el" href="classCTR.html" title="Implementation of the Counter (CTR) mode for 128-bit block ciphers. ">CTR</a>, <a class="el" href="classCFB.html" title="Implementation of the Cipher Feedback (CFB) mode for 128-bit block ciphers. ">CFB</a>, <a class="el" href="classOFB.html" title="Implementation of the Output Feedback (OFB) mode for 128-bit block ciphers. ">OFB</a>, <a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a>, and <a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a> modes can be used.</li>
</ul>
<p>This class is useful when RAM is at a premium, <a class="el" href="classCBC.html" title="Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers. ...">CBC</a> mode is not required, and reduced encryption performance is not a hindrance to the application.</p>
<p>The companion <a class="el" href="classAESSmall256.html" title="AES block cipher with 256-bit keys and reduced memory usage. ">AESSmall256</a> class supports <a class="el" href="classAESTiny256.html#abdf72a52c37c060a9089693c118585bc" title="Decrypts a single block using this cipher. ">decryptBlock()</a> at the cost of some additional memory and slower <a class="el" href="classAESTiny256.html#abc162075b181bfca34144f4eec6deec7" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a> times.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classAESSmall256.html" title="AES block cipher with 256-bit keys and reduced memory usage. ">AESSmall256</a>, <a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a> </dd></dl>
<p>Definition at line <a class="el" href="AES_8h_source.html#l00117">117</a> of file <a class="el" href="AES_8h_source.html">AES.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7af85adfdbd0a3bb68ef5a8f76102043"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">AESTiny256::AESTiny256 </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs an AES 256-bit block cipher with no initial key. </p>
<p>This constructor must be followed by a call to <a class="el" href="classAESTiny256.html#abc162075b181bfca34144f4eec6deec7" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a> before the block cipher can be used for encryption or decryption. </p>
<p>Definition at line <a class="el" href="AES256_8cpp_source.html#l00189">189</a> of file <a class="el" href="AES256_8cpp_source.html">AES256.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3f48f55b7600dfc672acda899928de76"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t AESTiny256::blockSize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Size of an AES block in bytes. </p>
<dl class="section return"><dt>Returns</dt><dd>Always returns 16. </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#a7059a310487c128db034b0ce0ad425a0">BlockCipher</a>.</p>
<p>Definition at line <a class="el" href="AES256_8cpp_source.html#l00202">202</a> of file <a class="el" href="AES256_8cpp_source.html">AES256.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae4cac6af2e78cbf399b7f6d0e613a578"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void AESTiny256::clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears all security-sensitive state from this block cipher. </p>
<p>Security-sensitive information includes key schedules and any temporary state that is used by <a class="el" href="classAESTiny256.html#a36e4ffc85f7d7604d01a5629c185d0ef" title="Encrypts a single block using this cipher. ">encryptBlock()</a> or <a class="el" href="classAESTiny256.html#abdf72a52c37c060a9089693c118585bc" title="Decrypts a single block using this cipher. ">decryptBlock()</a> which is stored in the object itself.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classAESTiny256.html#abc162075b181bfca34144f4eec6deec7" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a>, <a class="el" href="classAESTiny256.html#a36e4ffc85f7d7604d01a5629c185d0ef" title="Encrypts a single block using this cipher. ">encryptBlock()</a>, <a class="el" href="classAESTiny256.html#abdf72a52c37c060a9089693c118585bc" title="Decrypts a single block using this cipher. ">decryptBlock()</a> </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#a6f27d46e9dfa7761d014d828ad5f955b">BlockCipher</a>.</p>
<p>Reimplemented in <a class="el" href="classAESSmall256.html#ac63bf2dff7de8a73ba57f4bb0f1df444">AESSmall256</a>.</p>
<p>Definition at line <a class="el" href="AES256_8cpp_source.html#l00277">277</a> of file <a class="el" href="AES256_8cpp_source.html">AES256.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="abdf72a52c37c060a9089693c118585bc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void AESTiny256::decryptBlock </td>
<td>(</td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>output</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>input</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Decrypts a single block using this cipher. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">output</td><td>The output buffer to put the plaintext into. Must be at least <a class="el" href="classAESTiny256.html#a3f48f55b7600dfc672acda899928de76" title="Size of an AES block in bytes. ">blockSize()</a> bytes in length. </td></tr>
<tr><td class="paramname">input</td><td>The input buffer to read the ciphertext from which is allowed to overlap with <em>output</em>. Must be at least <a class="el" href="classAESTiny256.html#a3f48f55b7600dfc672acda899928de76" title="Size of an AES block in bytes. ">blockSize()</a> bytes in length.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classAESTiny256.html#a36e4ffc85f7d7604d01a5629c185d0ef" title="Encrypts a single block using this cipher. ">encryptBlock()</a>, <a class="el" href="classAESTiny256.html#a3f48f55b7600dfc672acda899928de76" title="Size of an AES block in bytes. ">blockSize()</a> </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#ac3ba2450222aa1ea804ae4881ab6440c">BlockCipher</a>.</p>
<p>Reimplemented in <a class="el" href="classAESSmall256.html#aaba6d59d07d2f40efa8c962375c15888">AESSmall256</a>.</p>
<p>Definition at line <a class="el" href="AES256_8cpp_source.html#l00272">272</a> of file <a class="el" href="AES256_8cpp_source.html">AES256.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a36e4ffc85f7d7604d01a5629c185d0ef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void AESTiny256::encryptBlock </td>
<td>(</td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>output</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>input</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Encrypts a single block using this cipher. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">output</td><td>The output buffer to put the ciphertext into. Must be at least <a class="el" href="classAESTiny256.html#a3f48f55b7600dfc672acda899928de76" title="Size of an AES block in bytes. ">blockSize()</a> bytes in length. </td></tr>
<tr><td class="paramname">input</td><td>The input buffer to read the plaintext from which is allowed to overlap with <em>output</em>. Must be at least <a class="el" href="classAESTiny256.html#a3f48f55b7600dfc672acda899928de76" title="Size of an AES block in bytes. ">blockSize()</a> bytes in length.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classAESTiny256.html#abdf72a52c37c060a9089693c118585bc" title="Decrypts a single block using this cipher. ">decryptBlock()</a>, <a class="el" href="classAESTiny256.html#a3f48f55b7600dfc672acda899928de76" title="Size of an AES block in bytes. ">blockSize()</a> </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#aed0788b25f6bb2f1bd47d5a5f0c5db33">BlockCipher</a>.</p>
<p>Definition at line <a class="el" href="AES256_8cpp_source.html#l00226">226</a> of file <a class="el" href="AES256_8cpp_source.html">AES256.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a7b5a2ba4829e79283c53248d3d8a7a06"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t AESTiny256::keySize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Size of a 256-bit AES key in bytes. </p>
<dl class="section return"><dt>Returns</dt><dd>Always returns 32. </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#afde6004a859e015d877eab3c37042a0f">BlockCipher</a>.</p>
<p>Definition at line <a class="el" href="AES256_8cpp_source.html#l00211">211</a> of file <a class="el" href="AES256_8cpp_source.html">AES256.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="abc162075b181bfca34144f4eec6deec7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool AESTiny256::setKey </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>len</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the key to use for future encryption and decryption operations. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>The key to use. </td></tr>
<tr><td class="paramname">len</td><td>The length of the key. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns false if the key length is not supported, or the key is somehow "weak" and unusable by this cipher.</dd></dl>
<p>Use <a class="el" href="classAESTiny256.html#ae4cac6af2e78cbf399b7f6d0e613a578" title="Clears all security-sensitive state from this block cipher. ">clear()</a> or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classAESTiny256.html#a7b5a2ba4829e79283c53248d3d8a7a06" title="Size of a 256-bit AES key in bytes. ">keySize()</a>, <a class="el" href="classAESTiny256.html#ae4cac6af2e78cbf399b7f6d0e613a578" title="Clears all security-sensitive state from this block cipher. ">clear()</a> </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#a9a05307664469777592799c8f77397c4">BlockCipher</a>.</p>
<p>Reimplemented in <a class="el" href="classAESSmall256.html#ae7e05119a6183d5f7fc520206f97c0e0">AESSmall256</a>.</p>
<p>Definition at line <a class="el" href="AES256_8cpp_source.html#l00216">216</a> of file <a class="el" href="AES256_8cpp_source.html">AES256.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="AES_8h_source.html">AES.h</a></li>
<li><a class="el" href="AES256_8cpp_source.html">AES256.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 27 2018 12:01:32 for Arduino Cryptography Library by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>