1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00
arduinolibs/classSpeck.html
Rhys Weatherley c74770a343 Update docs
2016-02-14 07:48:23 +10:00

424 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>ArduinoLibs: Speck 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>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><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="classSpeck-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Speck 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.
<a href="classSpeck.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="Speck_8h_source.html">Speck.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Speck:</div>
<div class="dyncontent">
<div class="center">
<img src="classSpeck.png" usemap="#Speck_map" alt=""/>
<map id="Speck_map" name="Speck_map">
<area href="classBlockCipher.html" title="Abstract base class for block ciphers. " alt="BlockCipher" shape="rect" coords="0,0,81,24"/>
</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:a1f0ea433652d791317863de8a50a0580"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeck.html#a1f0ea433652d791317863de8a50a0580">Speck</a> ()</td></tr>
<tr class="memdesc:a1f0ea433652d791317863de8a50a0580"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <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="#a1f0ea433652d791317863de8a50a0580">More...</a><br/></td></tr>
<tr class="separator:a1f0ea433652d791317863de8a50a0580"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18a3b982a2cbc48befc8d498de08f188"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeck.html#a18a3b982a2cbc48befc8d498de08f188">blockSize</a> () const </td></tr>
<tr class="memdesc:a18a3b982a2cbc48befc8d498de08f188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of a single block processed by this cipher, in bytes. <a href="#a18a3b982a2cbc48befc8d498de08f188">More...</a><br/></td></tr>
<tr class="separator:a18a3b982a2cbc48befc8d498de08f188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a061e43c1363178cda088c3f46e07d87b"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeck.html#a061e43c1363178cda088c3f46e07d87b">keySize</a> () const </td></tr>
<tr class="memdesc:a061e43c1363178cda088c3f46e07d87b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default size of the key for this block cipher, in bytes. <a href="#a061e43c1363178cda088c3f46e07d87b">More...</a><br/></td></tr>
<tr class="separator:a061e43c1363178cda088c3f46e07d87b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a07fc025bd25d832e9899333b5dabef"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeck.html#a7a07fc025bd25d832e9899333b5dabef">setKey</a> (const uint8_t *key, size_t len)</td></tr>
<tr class="memdesc:a7a07fc025bd25d832e9899333b5dabef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the key to use for future encryption and decryption operations. <a href="#a7a07fc025bd25d832e9899333b5dabef">More...</a><br/></td></tr>
<tr class="separator:a7a07fc025bd25d832e9899333b5dabef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6b8b91929e4b5b2023400688c9437f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeck.html#af6b8b91929e4b5b2023400688c9437f9">encryptBlock</a> (uint8_t *output, const uint8_t *input)</td></tr>
<tr class="memdesc:af6b8b91929e4b5b2023400688c9437f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypts a single block using this cipher. <a href="#af6b8b91929e4b5b2023400688c9437f9">More...</a><br/></td></tr>
<tr class="separator:af6b8b91929e4b5b2023400688c9437f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8c040df1c52d2559da8fdb3963d28b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeck.html#ad8c040df1c52d2559da8fdb3963d28b4">decryptBlock</a> (uint8_t *output, const uint8_t *input)</td></tr>
<tr class="memdesc:ad8c040df1c52d2559da8fdb3963d28b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypts a single block using this cipher. <a href="#ad8c040df1c52d2559da8fdb3963d28b4">More...</a><br/></td></tr>
<tr class="separator:ad8c040df1c52d2559da8fdb3963d28b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3866273282addabb9d3703c41fdc95f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSpeck.html#aa3866273282addabb9d3703c41fdc95f">clear</a> ()</td></tr>
<tr class="memdesc:aa3866273282addabb9d3703c41fdc95f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears all security-sensitive state from this block cipher. <a href="#aa3866273282addabb9d3703c41fdc95f">More...</a><br/></td></tr>
<tr class="separator:aa3866273282addabb9d3703c41fdc95f"><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><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. </p>
<p><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> is a family of lightweight block ciphers designed by the National Security Agency (NSA). The ciphers are highly optimized for software implementation on microcontrollers.</p>
<p>This class implements the <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> family that uses 128-bit block sizes with 128-bit, 192-bit, or 256-bit key sizes. Other <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> families support smaller block sizes of 32, 48, 64, or 96 bits but such block sizes are too small for use in modern cryptosystems.</p>
<dl class="section note"><dt>Note</dt><dd>Current crytoanalysis (up until 2015) has not revealed any obvious weaknesses in the full-round version of <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a>. But if you are wary of ciphers designed by the NSA, then use <a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> or AES instead.</dd></dl>
<p>The <a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a> and <a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> classes provide alternative implementations that have reduced RAM and flash size requirements at the cost of some features and performance.</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="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</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="Speck_8h_source.html#l00028">28</a> of file <a class="el" href="Speck_8h_source.html">Speck.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1f0ea433652d791317863de8a50a0580"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Speck::Speck </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <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="classSpeck.html#a7a07fc025bd25d832e9899333b5dabef" 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="Speck_8cpp_source.html#l00072">72</a> of file <a class="el" href="Speck_8cpp_source.html">Speck.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a18a3b982a2cbc48befc8d498de08f188"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t Speck::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="classSpeck.html#a061e43c1363178cda088c3f46e07d87b" title="Default size of the key for this block cipher, in bytes. ">keySize()</a>, <a class="el" href="classSpeck.html#af6b8b91929e4b5b2023400688c9437f9" 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="Speck_8cpp_source.html#l00082">82</a> of file <a class="el" href="Speck_8cpp_source.html">Speck.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aa3866273282addabb9d3703c41fdc95f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void Speck::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="classSpeck.html#af6b8b91929e4b5b2023400688c9437f9" title="Encrypts a single block using this cipher. ">encryptBlock()</a> or <a class="el" href="classSpeck.html#ad8c040df1c52d2559da8fdb3963d28b4" 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="classSpeck.html#a7a07fc025bd25d832e9899333b5dabef" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a>, <a class="el" href="classSpeck.html#af6b8b91929e4b5b2023400688c9437f9" title="Encrypts a single block using this cipher. ">encryptBlock()</a>, <a class="el" href="classSpeck.html#ad8c040df1c52d2559da8fdb3963d28b4" 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="Speck_8cpp_source.html#l00611">611</a> of file <a class="el" href="Speck_8cpp_source.html">Speck.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ad8c040df1c52d2559da8fdb3963d28b4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void Speck::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="classSpeck.html#a18a3b982a2cbc48befc8d498de08f188" 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="classSpeck.html#a18a3b982a2cbc48befc8d498de08f188" 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="classSpeck.html#af6b8b91929e4b5b2023400688c9437f9" title="Encrypts a single block using this cipher. ">encryptBlock()</a>, <a class="el" href="classSpeck.html#a18a3b982a2cbc48befc8d498de08f188" 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="Speck_8cpp_source.html#l00457">457</a> of file <a class="el" href="Speck_8cpp_source.html">Speck.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="af6b8b91929e4b5b2023400688c9437f9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void Speck::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="classSpeck.html#a18a3b982a2cbc48befc8d498de08f188" 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="classSpeck.html#a18a3b982a2cbc48befc8d498de08f188" 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="classSpeck.html#ad8c040df1c52d2559da8fdb3963d28b4" title="Decrypts a single block using this cipher. ">decryptBlock()</a>, <a class="el" href="classSpeck.html#a18a3b982a2cbc48befc8d498de08f188" 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="Speck_8cpp_source.html#l00306">306</a> of file <a class="el" href="Speck_8cpp_source.html">Speck.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a061e43c1363178cda088c3f46e07d87b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t Speck::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="classSpeck.html#a7a07fc025bd25d832e9899333b5dabef" title="Sets the key to use for future encryption and decryption operations. ">setKey()</a>, <a class="el" href="classSpeck.html#a18a3b982a2cbc48befc8d498de08f188" 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="Speck_8cpp_source.html#l00087">87</a> of file <a class="el" href="Speck_8cpp_source.html">Speck.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a7a07fc025bd25d832e9899333b5dabef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool Speck::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="classSpeck.html#aa3866273282addabb9d3703c41fdc95f" 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="classSpeck.html#a061e43c1363178cda088c3f46e07d87b" title="Default size of the key for this block cipher, in bytes. ">keySize()</a>, <a class="el" href="classSpeck.html#aa3866273282addabb9d3703c41fdc95f" 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="Speck_8cpp_source.html#l00105">105</a> of file <a class="el" href="Speck_8cpp_source.html">Speck.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Speck_8h_source.html">Speck.h</a></li>
<li><a class="el" href="Speck_8cpp_source.html">Speck.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Feb 14 2016 07:48:08 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>