1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00
arduinolibs/classSpeckTiny.html
Rhys Weatherley 9d2e774894 Update docs
2016-08-27 14:32:42 +10:00

437 lines
30 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>ArduinoLibs: SpeckTiny 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">ArduinoLibs
</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><a href="modules.html"><span>Modules</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>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><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="#friends">Friends</a> &#124;
<a href="classSpeckTiny-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">SpeckTiny Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> block cipher with a 128-bit block size (tiny-memory version).
<a href="classSpeckTiny.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="SpeckTiny_8h_source.html">SpeckTiny.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for SpeckTiny:</div>
<div class="dyncontent">
<div class="center">
<img src="classSpeckTiny.png" usemap="#SpeckTiny_map" alt=""/>
<map id="SpeckTiny_map" name="SpeckTiny_map">
<area href="classBlockCipher.html" title="Abstract base class for block ciphers. " alt="BlockCipher" shape="rect" coords="0,0,81,24"/>
<area href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). " alt="SpeckSmall" shape="rect" coords="0,112,81,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:a2ac351443979ea9da3521e79313cc580"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeckTiny.html#a2ac351443979ea9da3521e79313cc580">SpeckTiny</a> ()</td></tr>
<tr class="memdesc:a2ac351443979ea9da3521e79313cc580"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a tiny-memory <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> block cipher with no initial key. <a href="#a2ac351443979ea9da3521e79313cc580">More...</a><br/></td></tr>
<tr class="separator:a2ac351443979ea9da3521e79313cc580"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8bbd1d1124fd1c4ef1aa167625376a9"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeckTiny.html#af8bbd1d1124fd1c4ef1aa167625376a9">blockSize</a> () const </td></tr>
<tr class="memdesc:af8bbd1d1124fd1c4ef1aa167625376a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of a single block processed by this cipher, in bytes. <a href="#af8bbd1d1124fd1c4ef1aa167625376a9">More...</a><br/></td></tr>
<tr class="separator:af8bbd1d1124fd1c4ef1aa167625376a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5587909ba48776b01bbd40b339b1262e"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeckTiny.html#a5587909ba48776b01bbd40b339b1262e">keySize</a> () const </td></tr>
<tr class="memdesc:a5587909ba48776b01bbd40b339b1262e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default size of the key for this block cipher, in bytes. <a href="#a5587909ba48776b01bbd40b339b1262e">More...</a><br/></td></tr>
<tr class="separator:a5587909ba48776b01bbd40b339b1262e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05180c773b9d26d3b67ff569dc86fc2d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeckTiny.html#a05180c773b9d26d3b67ff569dc86fc2d">setKey</a> (const uint8_t *key, size_t len)</td></tr>
<tr class="memdesc:a05180c773b9d26d3b67ff569dc86fc2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the key to use for future encryption and decryption operations. <a href="#a05180c773b9d26d3b67ff569dc86fc2d">More...</a><br/></td></tr>
<tr class="separator:a05180c773b9d26d3b67ff569dc86fc2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dd2cf40dc48addb6a393e78a58a07c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeckTiny.html#a5dd2cf40dc48addb6a393e78a58a07c0">encryptBlock</a> (uint8_t *output, const uint8_t *input)</td></tr>
<tr class="memdesc:a5dd2cf40dc48addb6a393e78a58a07c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypts a single block using this cipher. <a href="#a5dd2cf40dc48addb6a393e78a58a07c0">More...</a><br/></td></tr>
<tr class="separator:a5dd2cf40dc48addb6a393e78a58a07c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19e54aef7d1b3ef92e8140dd9c308c3c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeckTiny.html#a19e54aef7d1b3ef92e8140dd9c308c3c">decryptBlock</a> (uint8_t *output, const uint8_t *input)</td></tr>
<tr class="memdesc:a19e54aef7d1b3ef92e8140dd9c308c3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypts a single block using this cipher. <a href="#a19e54aef7d1b3ef92e8140dd9c308c3c">More...</a><br/></td></tr>
<tr class="separator:a19e54aef7d1b3ef92e8140dd9c308c3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a303ecc2639459e47c6eeb21991d52ccf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeckTiny.html#a303ecc2639459e47c6eeb21991d52ccf">clear</a> ()</td></tr>
<tr class="memdesc:a303ecc2639459e47c6eeb21991d52ccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears all security-sensitive state from this block cipher. <a href="#a303ecc2639459e47c6eeb21991d52ccf">More...</a><br/></td></tr>
<tr class="separator:a303ecc2639459e47c6eeb21991d52ccf"><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><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a9935b49e2a646cf6ba106190c69d819c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9935b49e2a646cf6ba106190c69d819c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>SpeckSmall</b></td></tr>
<tr class="separator:a9935b49e2a646cf6ba106190c69d819c"><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><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> block cipher with a 128-bit block size (tiny-memory version). </p>
<p>This class differs from the <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> class in the following ways:</p>
<ul>
<li>RAM requirements are vastly reduced. The key (up to 256 bits) is stored directly and then expanded to the full key schedule round by round. The <a class="el" href="classSpeckTiny.html#a05180c773b9d26d3b67ff569dc86fc2d" 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="classSpeckTiny.html#a5dd2cf40dc48addb6a393e78a58a07c0" title="Encrypts a single block using this cipher. ">encryptBlock()</a> is slower than for <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> due to expanding the key on the fly rather than ahead of time. </li>
<li>The <a class="el" href="classSpeckTiny.html#a19e54aef7d1b3ef92e8140dd9c308c3c" 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. Even though the performance of <a class="el" href="classSpeckTiny.html#a5dd2cf40dc48addb6a393e78a58a07c0" title="Encrypts a single block using this cipher. ">encryptBlock()</a> is reduced, this class is still faster than AES with equivalent key sizes.</p>
<p>The companion <a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> class supports <a class="el" href="classSpeckTiny.html#a19e54aef7d1b3ef92e8140dd9c308c3c" title="Decrypts a single block using this cipher. ">decryptBlock()</a> at the cost of some additional memory and slower <a class="el" href="classSpeckTiny.html#a05180c773b9d26d3b67ff569dc86fc2d" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a> times.</p>
<p>See the documentation for the <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> class for more information on the <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> family of block ciphers.</p>
<p>References: <a href="https://en.wikipedia.org/wiki/Speck_%28cipher%29,">https://en.wikipedia.org/wiki/Speck_%28cipher%29,</a> <a href="http://eprint.iacr.org/2013/404">http://eprint.iacr.org/2013/404</a></p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a>, <a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> </dd></dl>
<p>Definition at line <a class="el" href="SpeckTiny_8h_source.html#l00030">30</a> of file <a class="el" href="SpeckTiny_8h_source.html">SpeckTiny.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2ac351443979ea9da3521e79313cc580"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SpeckTiny::SpeckTiny </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a tiny-memory <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> block cipher with no initial key. </p>
<p>This constructor must be followed by a call to <a class="el" href="classSpeckTiny.html#a05180c773b9d26d3b67ff569dc86fc2d" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a> before the block cipher can be used for encryption. </p>
<p>Definition at line <a class="el" href="SpeckTiny_8cpp_source.html#l00076">76</a> of file <a class="el" href="SpeckTiny_8cpp_source.html">SpeckTiny.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="af8bbd1d1124fd1c4ef1aa167625376a9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t SpeckTiny::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 a single block processed by this cipher, in bytes. </p>
<dl class="section return"><dt>Returns</dt><dd>Returns the size of a block in bytes.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classSpeckTiny.html#a5587909ba48776b01bbd40b339b1262e" title="Default size of the key for this block cipher, in bytes. ">keySize()</a>, <a class="el" href="classSpeckTiny.html#a5dd2cf40dc48addb6a393e78a58a07c0" title="Encrypts a single block using this cipher. ">encryptBlock()</a> </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#a7059a310487c128db034b0ce0ad425a0">BlockCipher</a>.</p>
<p>Definition at line <a class="el" href="SpeckTiny_8cpp_source.html#l00086">86</a> of file <a class="el" href="SpeckTiny_8cpp_source.html">SpeckTiny.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a303ecc2639459e47c6eeb21991d52ccf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SpeckTiny::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="classSpeckTiny.html#a5dd2cf40dc48addb6a393e78a58a07c0" title="Encrypts a single block using this cipher. ">encryptBlock()</a> or <a class="el" href="classSpeckTiny.html#a19e54aef7d1b3ef92e8140dd9c308c3c" 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="classSpeckTiny.html#a05180c773b9d26d3b67ff569dc86fc2d" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a>, <a class="el" href="classSpeckTiny.html#a5dd2cf40dc48addb6a393e78a58a07c0" title="Encrypts a single block using this cipher. ">encryptBlock()</a>, <a class="el" href="classSpeckTiny.html#a19e54aef7d1b3ef92e8140dd9c308c3c" 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>Definition at line <a class="el" href="SpeckTiny_8cpp_source.html#l00532">532</a> of file <a class="el" href="SpeckTiny_8cpp_source.html">SpeckTiny.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a19e54aef7d1b3ef92e8140dd9c308c3c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SpeckTiny::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="classSpeckTiny.html#af8bbd1d1124fd1c4ef1aa167625376a9" title="Size of a single block processed by this cipher, 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="classSpeckTiny.html#af8bbd1d1124fd1c4ef1aa167625376a9" title="Size of a single block processed by this cipher, 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="classSpeckTiny.html#a5dd2cf40dc48addb6a393e78a58a07c0" title="Encrypts a single block using this cipher. ">encryptBlock()</a>, <a class="el" href="classSpeckTiny.html#af8bbd1d1124fd1c4ef1aa167625376a9" title="Size of a single block processed by this cipher, in bytes. ">blockSize()</a> </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#ac3ba2450222aa1ea804ae4881ab6440c">BlockCipher</a>.</p>
<p>Definition at line <a class="el" href="SpeckTiny_8cpp_source.html#l00527">527</a> of file <a class="el" href="SpeckTiny_8cpp_source.html">SpeckTiny.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a5dd2cf40dc48addb6a393e78a58a07c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SpeckTiny::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="classSpeckTiny.html#af8bbd1d1124fd1c4ef1aa167625376a9" title="Size of a single block processed by this cipher, 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="classSpeckTiny.html#af8bbd1d1124fd1c4ef1aa167625376a9" title="Size of a single block processed by this cipher, 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="classSpeckTiny.html#a19e54aef7d1b3ef92e8140dd9c308c3c" title="Decrypts a single block using this cipher. ">decryptBlock()</a>, <a class="el" href="classSpeckTiny.html#af8bbd1d1124fd1c4ef1aa167625376a9" title="Size of a single block processed by this cipher, 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="SpeckTiny_8cpp_source.html#l00156">156</a> of file <a class="el" href="SpeckTiny_8cpp_source.html">SpeckTiny.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a5587909ba48776b01bbd40b339b1262e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t SpeckTiny::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>Default size of the key for this block cipher, in bytes. </p>
<p>This value indicates the default, or recommended, size for the key.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classSpeckTiny.html#a05180c773b9d26d3b67ff569dc86fc2d" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a>, <a class="el" href="classSpeckTiny.html#af8bbd1d1124fd1c4ef1aa167625376a9" title="Size of a single block processed by this cipher, in bytes. ">blockSize()</a> </dd></dl>
<p>Implements <a class="el" href="classBlockCipher.html#afde6004a859e015d877eab3c37042a0f">BlockCipher</a>.</p>
<p>Definition at line <a class="el" href="SpeckTiny_8cpp_source.html#l00091">91</a> of file <a class="el" href="SpeckTiny_8cpp_source.html">SpeckTiny.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a05180c773b9d26d3b67ff569dc86fc2d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool SpeckTiny::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="classSpeckTiny.html#a303ecc2639459e47c6eeb21991d52ccf" 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="classSpeckTiny.html#a5587909ba48776b01bbd40b339b1262e" title="Default size of the key for this block cipher, in bytes. ">keySize()</a>, <a class="el" href="classSpeckTiny.html#a303ecc2639459e47c6eeb21991d52ccf" 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>Definition at line <a class="el" href="SpeckTiny_8cpp_source.html#l00109">109</a> of file <a class="el" href="SpeckTiny_8cpp_source.html">SpeckTiny.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="SpeckTiny_8h_source.html">SpeckTiny.h</a></li>
<li><a class="el" href="SpeckTiny_8cpp_source.html">SpeckTiny.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Aug 27 2016 14:32:21 for ArduinoLibs 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>