mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
457 lines
53 KiB
HTML
457 lines
53 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: Arduino Cryptography Library</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 Page</span></a></li>
|
|
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><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>
|
|
<!-- 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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </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="headertitle">
|
|
<div class="title">Arduino Cryptography Library </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><h1><a class="anchor" id="crypto_algorithms"></a>
|
|
Supported algorithms</h1>
|
|
<p>The library is split into four main sections: core, light-weight, legacy, and other.</p>
|
|
<h2><a class="anchor" id="crypto_core_algorithms"></a>
|
|
Core algorithms</h2>
|
|
<p>Core algorithms are found within the "libraries/Crypto" directory in the repository:</p>
|
|
<ul>
|
|
<li>Authenticated encryption with associated data (AEAD): <a class="el" href="classChaChaPoly.html" title="Authenticated cipher based on ChaCha and Poly1305. ">ChaChaPoly</a>, <a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a>, <a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a> </li>
|
|
<li>Block ciphers: <a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a>, <a class="el" href="classAES192.html" title="AES block cipher with 192-bit keys. ">AES192</a>, <a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a> </li>
|
|
<li>Block cipher modes: <a class="el" href="classCTR.html" title="Implementation of the Counter (CTR) mode for 128-bit block ciphers. ">CTR</a>, <a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a>, <a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a>, <a class="el" href="classXTS.html" title="Implementation of the XTS mode for 128-bit block ciphers. ">XTS</a> </li>
|
|
<li>Stream ciphers: <a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> </li>
|
|
<li><a class="el" href="classHash.html" title="Abstract base class for cryptographic hash algorithms. ">Hash</a> algorithms: <a class="el" href="classSHA256.html" title="SHA-256 hash algorithm. ">SHA256</a>, <a class="el" href="classSHA512.html" title="SHA-512 hash algorithm. ">SHA512</a>, <a class="el" href="classSHA3__256.html" title="SHA3-256 hash algorithm. ">SHA3_256</a>, <a class="el" href="classSHA3__512.html" title="SHA3-512 hash algorithm. ">SHA3_512</a>, <a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a>, <a class="el" href="classBLAKE2b.html" title="BLAKE2b hash algorithm. ">BLAKE2b</a> (regular and HMAC modes) </li>
|
|
<li>Extendable output functions (<a class="el" href="classXOF.html" title="Abstract base class for Extendable-Output Functions (XOFs). ">XOF</a>'s): <a class="el" href="classSHAKE128.html" title="SHAKE Extendable-Output Function (XOF) with 128-bit security. ">SHAKE128</a>, <a class="el" href="classSHAKE256.html" title="SHAKE Extendable-Output Function (XOF) with 256-bit security. ">SHAKE256</a> </li>
|
|
<li>Message authenticators: <a class="el" href="classPoly1305.html" title="Poly1305 message authenticator. ">Poly1305</a>, <a class="el" href="classGHASH.html" title="Implementation of the GHASH message authenticator. ">GHASH</a>, <a class="el" href="classOMAC.html" title="Implementation of the OMAC message authenticator. ">OMAC</a> </li>
|
|
<li>Public key algorithms: <a class="el" href="classCurve25519.html" title="Diffie-Hellman key agreement based on the elliptic curve modulo 2^255 - 19. ">Curve25519</a>, <a class="el" href="classEd25519.html" title="Digital signatures based on the elliptic curve modulo 2^255 - 19. ">Ed25519</a>, <a class="el" href="classP521.html" title="Elliptic curve operations with the NIST P-521 curve. ">P521</a> </li>
|
|
<li>Random number generation: <a class="el" href="classRNGClass.html">RNG</a></li>
|
|
</ul>
|
|
<p>Reduced memory versions of some algorithms (encryption is slower, but the RAM required for the key schedule is less):</p>
|
|
<ul>
|
|
<li><a class="el" href="classAESTiny128.html" title="AES block cipher with 128-bit keys and tiny memory usage. ">AESTiny128</a>, <a class="el" href="classAESSmall128.html" title="AES block cipher with 128-bit keys and reduced memory usage. ">AESSmall128</a>, <a class="el" href="classAESTiny256.html" title="AES block cipher with 256-bit keys and tiny memory usage. ">AESTiny256</a>, <a class="el" href="classAESSmall256.html" title="AES block cipher with 256-bit keys and reduced memory usage. ">AESSmall256</a></li>
|
|
</ul>
|
|
<p>The "tiny" versions only support encryption which makes them suitable for 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> block cipher modes but not <a class="el" href="classCBC.html" title="Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers. ...">CBC</a>. The "small" versions use a little more memory but support both encryption and decryption.</p>
|
|
<h2><a class="anchor" id="crpto_lw_algorithms"></a>
|
|
Light-weight algorithms</h2>
|
|
<p>The algorithms in the "libraries/CryptoLW" directory are new algorithms that have been designed for "light-weight" environments where memory and CPU resources are constrained:</p>
|
|
<ul>
|
|
<li>Authenticated encryption with associated data (AEAD): <a class="el" href="classAcorn128.html" title="ACORN-128 authenticated cipher. ">Acorn128</a>, <a class="el" href="classAscon128.html" title="ASCON-128 authenticated cipher. ">Ascon128</a> </li>
|
|
<li>Block ciphers: <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>, <a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a></li>
|
|
</ul>
|
|
<p>These algorithms are fairly new, but they are ideal for Arduino devices. They don't yet appear in any internationally adopted standards yet but any algorithms that are adopted into standards later will be moved to the core library. Maybe you'll be the one to create that new standard!</p>
|
|
<h2><a class="anchor" id="crypto_legacy_algorithms"></a>
|
|
Legacy algorithms</h2>
|
|
<p>Legacy algorithms in the "libraries/CryptoLegacy" are those that should probably not be used in new protocol designs, but may be required for backwards-compatibility with older protocols:</p>
|
|
<ul>
|
|
<li>Block cipher modes: <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="classCBC.html" title="Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers. ...">CBC</a>, <a class="el" href="classOFB.html" title="Implementation of the Output Feedback (OFB) mode for 128-bit block ciphers. ">OFB</a></li>
|
|
</ul>
|
|
<p><a class="el" href="classCBC.html" title="Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers. ...">CBC</a> is included in the legacy list because cryptography experts no longer recommend it for use in newer designs. It was an important mode in the past but newer designs should be using authenticated encryption with associated data (AEAD) instead. If you were looking to use <a class="el" href="classCBC.html" title="Implementation of the Cipher Block Chaining (CBC) mode for 128-bit block ciphers. ...">CBC</a> in your project, then please consider transitioning to one of the AEAD schemes listed above.</p>
|
|
<p>Over time, other algorithms may be moved from the core library to legacy.</p>
|
|
<h2><a class="anchor" id="crypto_other_algorithms"></a>
|
|
Other algorithms</h2>
|
|
<p>Other algorithms are provided in the remaining directories under "libraries", and consist of algorithms that are either too big for the main library, or are dedicated to a special purpose that only some applications will need:</p>
|
|
<ul>
|
|
<li>Post-quantum algorithms: <a class="el" href="classNewHope.html" title="NewHope post-quantum key exchange algorithm. ">NewHope</a> </li>
|
|
<li>Random number generation: <a class="el" href="classTransistorNoiseSource.html" title="Processes the signal from a transistor-based noise source. ">TransistorNoiseSource</a>, <a class="el" href="classRingOscillatorNoiseSource.html" title="Processes the signal from a ring oscillator based noise source. ">RingOscillatorNoiseSource</a></li>
|
|
</ul>
|
|
<h1><a class="anchor" id="crypto_optimizations"></a>
|
|
Optimizations</h1>
|
|
<p>All cryptographic algorithms have been optimized for 8-bit Arduino platforms like the Uno. Memory usage is also reduced, particularly for <a class="el" href="classSHA256.html" title="SHA-256 hash algorithm. ">SHA256</a> and <a class="el" href="classSHA512.html" title="SHA-512 hash algorithm. ">SHA512</a> which save 192 and 512 bytes respectively over traditional implementations. For all algorithms, static sbox tables and the like are placed into program memory to further reduce data memory usage.</p>
|
|
<p><a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> with 20 rounds and 256-bit keys is the recommended symmetric encryption algorithm because it is twice as fast as <a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a>, constant-time, and much more secure. <a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a>, <a class="el" href="classAES192.html" title="AES block cipher with 192-bit keys. ">AES192</a>, and <a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a> are provided for use in applications where compatibility with other systems is desirable.</p>
|
|
<p>If code size is an issue for your application (for example on very low end Arduino variants), then <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> on AVR is less than half the code size of <a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a>, at the cost of more data memory for the state and longer key setup times. 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 are even smaller at the cost of some performance when encrypting.</p>
|
|
<p><a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a> and <a class="el" href="classBLAKE2b.html" title="BLAKE2b hash algorithm. ">BLAKE2b</a> are variations on the <a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> stream cipher, designed for hashing, with 256-bit and 512-bit hash outputs respectively. They are intended as high performance replacements for <a class="el" href="classSHA256.html" title="SHA-256 hash algorithm. ">SHA256</a> and <a class="el" href="classSHA512.html" title="SHA-512 hash algorithm. ">SHA512</a> for when speed is critical but exact bit-compatibility of hash values is not. <a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a> and <a class="el" href="classBLAKE2b.html" title="BLAKE2b hash algorithm. ">BLAKE2b</a> support regular hashing, BLAKE2 keyed hashing, and HMAC modes.</p>
|
|
<h1><a class="anchor" id="crypto_other"></a>
|
|
Examples and other topics</h1>
|
|
<ul>
|
|
<li><a class="el" href="crypto_rng.html">Generating random numbers</a> </li>
|
|
<li><a class="el" href="crypto_esp.html">Using the cryptography library with ESP8266</a></li>
|
|
</ul>
|
|
<h1><a class="anchor" id="crypto_performance"></a>
|
|
Performance</h1>
|
|
<h2><a class="anchor" id="crypto_performance_avr"></a>
|
|
Performance on AVR</h2>
|
|
<p>All figures are for the Arduino Uno running at 16 MHz. Figures for the Ardunino Mega 2560 running at 16 MHz are similar:</p>
|
|
<table class="doxtable">
|
|
<tr>
|
|
<td>Encryption Algorithm</td><td align="right">Encryption (per byte)</td><td align="right">Decryption (per byte)</td><td align="right">Key Setup</td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a> (ECB mode)</td><td align="right">33.28us</td><td align="right">63.18us</td><td align="right">158.68us</td><td align="right">181 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAES192.html" title="AES block cipher with 192-bit keys. ">AES192</a> (ECB mode)</td><td align="right">39.94us</td><td align="right">76.48us</td><td align="right">165.34us</td><td align="right">213 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a> (ECB mode)</td><td align="right">46.61us</td><td align="right">89.78us</td><td align="right">217.79us</td><td align="right">245 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAESTiny128.html" title="AES block cipher with 128-bit keys and tiny memory usage. ">AESTiny128</a> (ECB mode)</td><td align="right">40.37us</td><td align="right"></td><td align="right">10.16us</td><td align="right">18 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAESTiny256.html" title="AES block cipher with 256-bit keys and tiny memory usage. ">AESTiny256</a> (ECB mode)</td><td align="right">56.84us</td><td align="right"></td><td align="right">17.20us</td><td align="right">34 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAESSmall128.html" title="AES block cipher with 128-bit keys and reduced memory usage. ">AESSmall128</a> (ECB mode)</td><td align="right">40.37us</td><td align="right">71.36us</td><td align="right">134.22us</td><td align="right">34 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAESSmall256.html" title="AES block cipher with 256-bit keys and reduced memory usage. ">AESSmall256</a> (ECB mode)</td><td align="right">56.84us</td><td align="right">100.55us</td><td align="right">177.73us</td><td align="right">66 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> (20 rounds)</td><td align="right">14.87us</td><td align="right">14.88us</td><td align="right">43.74us</td><td align="right">132 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> (12 rounds)</td><td align="right">10.38us</td><td align="right">10.38us</td><td align="right">43.74us</td><td align="right">132 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> (8 rounds)</td><td align="right">8.13us</td><td align="right">8.14us</td><td align="right">43.74us</td><td align="right">132 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> (128-bit key, ECB mode)</td><td align="right">9.74us</td><td align="right">10.12us</td><td align="right">253.94us</td><td align="right">275 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> (192-bit key, ECB mode)</td><td align="right">10.03us</td><td align="right">10.41us</td><td align="right">264.63us</td><td align="right">275 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> (256-bit key, ECB mode)</td><td align="right">10.31us</td><td align="right">10.71us</td><td align="right">275.26us</td><td align="right">275 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> (128-bit key, ECB mode)</td><td align="right">33.93us</td><td align="right">34.82us</td><td align="right">207.66us</td><td align="right">67 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> (192-bit key, ECB mode)</td><td align="right">35.20us</td><td align="right">35.88us</td><td align="right">220.55us</td><td align="right">67 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> (256-bit key, ECB mode)</td><td align="right">36.46us</td><td align="right">36.93us</td><td align="right">233.32us</td><td align="right">67 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a> (128-bit key, ECB mode)</td><td align="right">33.93us</td><td align="right"></td><td align="right">10.22us</td><td align="right">35 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a> (192-bit key, ECB mode)</td><td align="right">35.20us</td><td align="right"></td><td align="right">13.62us</td><td align="right">35 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a> (256-bit key, ECB mode)</td><td align="right">36.46us</td><td align="right"></td><td align="right">16.89us</td><td align="right">35 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td>AEAD Algorithm</td><td align="right">Encryption (per byte)</td><td align="right">Decryption (per byte)</td><td align="right">Key Setup</td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classChaChaPoly.html" title="Authenticated cipher based on ChaCha and Poly1305. ">ChaChaPoly</a></td><td align="right">41.20us</td><td align="right">41.19us</td><td align="right">902.36us</td><td align="right">221 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a>></td><td align="right">109.71us</td><td align="right">109.26us</td><td align="right">1265.69us</td><td align="right">284 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classAES192.html" title="AES block cipher with 192-bit keys. ">AES192</a>></td><td align="right">116.38us</td><td align="right">115.92us</td><td align="right">1485.56us</td><td align="right">316 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a>></td><td align="right">123.04us</td><td align="right">122.59us</td><td align="right">1760.28us</td><td align="right">348 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a>> (256-bit key)</td><td align="right">86.74us</td><td align="right">86.29us</td><td align="right">646.88us</td><td align="right">378 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a>> (256-bit key)</td><td align="right">112.90us</td><td align="right">112.44us</td><td align="right">1225.48us</td><td align="right">138 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a><<a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a>></td><td align="right">71.14us</td><td align="right">71.14us</td><td align="right">1311.97us</td><td align="right">268 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a><<a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a>></td><td align="right">97.80us</td><td align="right">97.80us</td><td align="right">1806.57us</td><td align="right">332 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a><<a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a>> (256-bit key)</td><td align="right">25.89us</td><td align="right">25.88us</td><td align="right">690.63us</td><td align="right">362 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a><<a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a>> (256-bit key)</td><td align="right">78.20us</td><td align="right">78.20us</td><td align="right">1269.19us</td><td align="right">122 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAcorn128.html" title="ACORN-128 authenticated cipher. ">Acorn128</a></td><td align="right">20.39us</td><td align="right">20.06us</td><td align="right">4817.82us</td><td align="right">60 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAscon128.html" title="ASCON-128 authenticated cipher. ">Ascon128</a></td><td align="right">42.71us</td><td align="right">43.07us</td><td align="right">738.68us</td><td align="right">60 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classHash.html" title="Abstract base class for cryptographic hash algorithms. ">Hash</a> Algorithm</td><td align="right">Hashing (per byte)</td><td align="right">Finalization</td><td></td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA256.html" title="SHA-256 hash algorithm. ">SHA256</a></td><td align="right">43.85us</td><td align="right">2841.04us</td><td align="right"></td><td align="right">107 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA512.html" title="SHA-512 hash algorithm. ">SHA512</a></td><td align="right">122.82us</td><td align="right">15953.42us</td><td align="right"></td><td align="right">211 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA3__256.html" title="SHA3-256 hash algorithm. ">SHA3_256</a></td><td align="right">60.69us</td><td align="right">8180.24us</td><td align="right"></td><td align="right">205 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA3__512.html" title="SHA3-512 hash algorithm. ">SHA3_512</a></td><td align="right">113.88us</td><td align="right">8196.34us</td><td align="right"></td><td align="right">205 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a></td><td align="right">20.65us</td><td align="right">1335.25us</td><td align="right"></td><td align="right">107 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2b.html" title="BLAKE2b hash algorithm. ">BLAKE2b</a></td><td align="right">65.22us</td><td align="right">8375.34us</td><td align="right"></td><td align="right">211 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td>Authentication Algorithm</td><td align="right">Hashing (per byte)</td><td align="right">Finalization</td><td align="right">Key Setup</td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA256.html" title="SHA-256 hash algorithm. ">SHA256</a> (HMAC mode)</td><td align="right">43.85us</td><td align="right">8552.61us</td><td align="right">2836.49us</td><td align="right">107 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a> (Keyed mode)</td><td align="right">20.65us</td><td align="right">1335.25us</td><td align="right">1339.51us</td><td align="right">107 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a> (HMAC mode)</td><td align="right">20.65us</td><td align="right">4055.56us</td><td align="right">1350.00us</td><td align="right">107 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2b.html" title="BLAKE2b hash algorithm. ">BLAKE2b</a> (Keyed mode)</td><td align="right">65.22us</td><td align="right">8375.34us</td><td align="right">8357.25us</td><td align="right">211 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classPoly1305.html" title="Poly1305 message authenticator. ">Poly1305</a></td><td align="right">26.26us</td><td align="right">489.11us</td><td align="right">17.06us</td><td align="right">53 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGHASH.html" title="Implementation of the GHASH message authenticator. ">GHASH</a></td><td align="right">74.59us</td><td align="right">15.91us</td><td align="right">14.79us</td><td align="right">33 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classXOF.html" title="Abstract base class for Extendable-Output Functions (XOFs). ">XOF</a> Algorithm</td><td align="right">Hashing (per byte)</td><td align="right">Extending (per byte)</td><td>Encryption (per byte)</td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHAKE128.html" title="SHAKE Extendable-Output Function (XOF) with 128-bit security. ">SHAKE128</a></td><td align="right">49.43us</td><td align="right">49.02us</td><td align="right">49.59us</td><td align="right">206 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHAKE256.html" title="SHAKE Extendable-Output Function (XOF) with 256-bit security. ">SHAKE256</a></td><td align="right">60.77us</td><td align="right">60.37us</td><td align="right">60.93us</td><td align="right">206 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td>Public Key Operation</td><td align="right">Time (per operation)</td><td colspan="3">Comment </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classCurve25519.html#a2e4b7dd83a019b32c76584c99bfda21a" title="Evaluates the raw Curve25519 function. ">Curve25519::eval()</a></td><td align="right">2716ms</td><td colspan="3">Raw curve evaluation </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classCurve25519.html#a2b6911583d17ea9a36bbbb40d58b3d89" title="Performs phase 1 of a Diffie-Hellman key exchange using Curve25519. ">Curve25519::dh1()</a></td><td align="right">2718ms</td><td colspan="3">First half of Diffie-Hellman key agreement </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classCurve25519.html#a14022d6ac68ec691ffb0247275078ab9" title="Performs phase 2 of a Diffie-Hellman key exchange using Curve25519. ">Curve25519::dh2()</a></td><td align="right">2717ms</td><td colspan="3">Second half of Diffie-Hellman key agreement </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEd25519.html#a36ecf67b4c5d2d39a31888f56af1f8a5" title="Signs a message using a specific Ed25519 private key. ">Ed25519::sign()</a></td><td align="right">5148ms</td><td colspan="3">Digital signature generation </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEd25519.html#ae3e2fc405c9cd8cb1d3ab9b8b452d3e4" title="Verifies a signature using a specific Ed25519 public key. ">Ed25519::verify()</a></td><td align="right">8196ms</td><td colspan="3">Digital signature verification </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEd25519.html#ab62bac52ed07f77f76f3ff0fccd71cb2" title="Derives the public key from a private key. ">Ed25519::derivePublicKey()</a></td><td align="right">5102ms</td><td colspan="3">Derive a public key from a private key </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#ac2e07ce7e846ba180938b41b4a2ae563" title="Evaluates the curve function. ">P521::eval()</a></td><td align="right">46290ms</td><td colspan="3">Raw curve evaluation </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#ae04c439804f445535295bf44ae56afbf" title="Performs phase 1 of an ECDH key exchange using P-521. ">P521::dh1()</a></td><td align="right">46293ms</td><td colspan="3">First half of Diffie-Hellman key agreement </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#a7b9d4f74cc2d71a488a33ab165537491" title="Performs phase 2 of an ECDH key exchange using P-521. ">P521::dh2()</a></td><td align="right">46304ms</td><td colspan="3">Second half of Diffie-Hellman key agreement </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#ab050ceff65e49b646b8157fe1474288a" title="Signs a message using a specific P-521 private key. ">P521::sign()</a></td><td align="right">60514ms</td><td colspan="3">Digital signature generation </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#ab075909f5cecbb801c6b7c41f20de223" title="Verifies a signature using a specific P-521 public key. ">P521::verify()</a></td><td align="right">109078ms</td><td colspan="3">Digital signature verification </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#a15ca802e298c7ff3be06924b0edb7daa" title="Derives the public key from a private key for P-521 signing operations. ">P521::derivePublicKey()</a></td><td align="right">46290ms</td><td colspan="3">Derive a public key from a private key </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#a335b17b40949f66aa579d1035384662c" title="Generates the key pair for Alice in a New Hope key exchange. ">NewHope::keygen()</a>, Ref</td><td align="right">639ms</td><td colspan="3">Generate key pair for Alice, Ref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#a2f09529f5f73cf9763c28b58b13bbd14" title="Generates the public key and shared secret for Bob. ">NewHope::sharedb()</a>, Ref</td><td align="right">1237ms</td><td colspan="3">Generate shared secret and public key for Bob, Ref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#ac8128e0799fe74a6c69c541e0d6bd66e" title="Generates the shared secret for Alice. ">NewHope::shareda()</a>, Ref</td><td align="right">496ms</td><td colspan="3">Generate shared secret for Alice, Ref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#a335b17b40949f66aa579d1035384662c" title="Generates the key pair for Alice in a New Hope key exchange. ">NewHope::keygen()</a>, Torref</td><td align="right">777ms</td><td colspan="3">Generate key pair for Alice, Torref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#a2f09529f5f73cf9763c28b58b13bbd14" title="Generates the public key and shared secret for Bob. ">NewHope::sharedb()</a>, Torref</td><td align="right">1376ms</td><td colspan="3">Generate shared secret and public key for Bob, Torref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#ac8128e0799fe74a6c69c541e0d6bd66e" title="Generates the shared secret for Alice. ">NewHope::shareda()</a>, Torref</td><td align="right">496ms</td><td colspan="3">Generate shared secret for Alice, Torref version </td></tr>
|
|
</table>
|
|
<p>Where a cipher supports more than one key size (such as <a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a>), the values are typically almost identical for 128-bit and 256-bit keys so only the maximum is shown above.</p>
|
|
<p>Due to the memory requirements, <a class="el" href="classP521.html" title="Elliptic curve operations with the NIST P-521 curve. ">P521</a> and <a class="el" href="classNewHope.html" title="NewHope post-quantum key exchange algorithm. ">NewHope</a> performance was measured on an Arduino Mega 2560 running at 16 MHz. They are too big to fit in the RAM size of the Uno.</p>
|
|
<h2><a class="anchor" id="crypto_performance_arm"></a>
|
|
Performance on ARM</h2>
|
|
<p>All figures are for the Arduino Due running at 84 MHz:</p>
|
|
<table class="doxtable">
|
|
<tr>
|
|
<td>Encryption Algorithm</td><td align="right">Encryption (per byte)</td><td align="right">Decryption (per byte)</td><td align="right">Key Setup</td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a> (ECB mode)</td><td align="right">6.58us</td><td align="right">11.40us</td><td align="right">38.15us</td><td align="right">188 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAES192.html" title="AES block cipher with 192-bit keys. ">AES192</a> (ECB mode)</td><td align="right">7.94us</td><td align="right">13.83us</td><td align="right">39.79us</td><td align="right">220 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a> (ECB mode)</td><td align="right">9.30us</td><td align="right">16.25us</td><td align="right">49.68us</td><td align="right">252 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAESTiny128.html" title="AES block cipher with 128-bit keys and tiny memory usage. ">AESTiny128</a> (ECB mode)</td><td align="right">7.23us</td><td align="right"></td><td align="right">1.25us</td><td align="right">20 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAESTiny256.html" title="AES block cipher with 256-bit keys and tiny memory usage. ">AESTiny256</a> (ECB mode)</td><td align="right">10.62us</td><td align="right"></td><td align="right">1.43us</td><td align="right">36 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAESSmall128.html" title="AES block cipher with 128-bit keys and reduced memory usage. ">AESSmall128</a> (ECB mode)</td><td align="right">7.23us</td><td align="right">12.33us</td><td align="right">23.44us</td><td align="right">36 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAESSmall256.html" title="AES block cipher with 256-bit keys and reduced memory usage. ">AESSmall256</a> (ECB mode)</td><td align="right">10.62us</td><td align="right">16.92us</td><td align="right">31.88us</td><td align="right">68 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> (20 rounds)</td><td align="right">0.87us</td><td align="right">0.88us</td><td align="right">4.96us</td><td align="right">136 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> (12 rounds)</td><td align="right">0.70us</td><td align="right">0.71us</td><td align="right">4.96us</td><td align="right">136 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classChaCha.html" title="ChaCha stream cipher. ">ChaCha</a> (8 rounds)</td><td align="right">0.62us</td><td align="right">0.62us</td><td align="right">4.96us</td><td align="right">136 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> (128-bit key, ECB mode)</td><td align="right">0.97us</td><td align="right">0.96us</td><td align="right">36.80us</td><td align="right">288 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> (192-bit key, ECB mode)</td><td align="right">1.00us</td><td align="right">0.98us</td><td align="right">38.14us</td><td align="right">288 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a> (256-bit key, ECB mode)</td><td align="right">1.03us</td><td align="right">1.01us</td><td align="right">39.31us</td><td align="right">288 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> (128-bit key, ECB mode)</td><td align="right">2.72us</td><td align="right">2.30us</td><td align="right">26.89us</td><td align="right">80 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> (192-bit key, ECB mode)</td><td align="right">2.80us</td><td align="right">2.39us</td><td align="right">27.80us</td><td align="right">80 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckSmall.html" title="Speck block cipher with a 128-bit block size (small-memory version). ">SpeckSmall</a> (256-bit key, ECB mode)</td><td align="right">2.90us</td><td align="right">2.48us</td><td align="right">29.08us</td><td align="right">80 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a> (128-bit key, ECB mode)</td><td align="right">2.72us</td><td align="right"></td><td align="right">1.47us</td><td align="right">48 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a> (192-bit key, ECB mode)</td><td align="right">2.81us</td><td align="right"></td><td align="right">1.54us</td><td align="right">48 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a> (256-bit key, ECB mode)</td><td align="right">2.90us</td><td align="right"></td><td align="right">1.83us</td><td align="right">48 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td>AEAD Algorithm</td><td align="right">Encryption (per byte)</td><td align="right">Decryption (per byte)</td><td align="right">Key Setup</td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classChaChaPoly.html" title="Authenticated cipher based on ChaCha and Poly1305. ">ChaChaPoly</a></td><td align="right">1.71us</td><td align="right">1.71us</td><td align="right">45.08us</td><td align="right">240 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a>></td><td align="right">10.90us</td><td align="right">10.90us</td><td align="right">248.83us</td><td align="right">312 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classAES192.html" title="AES block cipher with 192-bit keys. ">AES192</a>></td><td align="right">12.30us</td><td align="right">12.31us</td><td align="right">296.83us</td><td align="right">344 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a>></td><td align="right">13.66us</td><td align="right">13.67us</td><td align="right">350.25us</td><td align="right">376 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a>> (256-bit key)</td><td align="right">5.27us</td><td align="right">5.28us</td><td align="right">75.31us</td><td align="right">408 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGCM.html" title="Implementation of the Galois Counter Mode (GCM). ">GCM</a><<a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a>> (256-bit key)</td><td align="right">7.06us</td><td align="right">7.07us</td><td align="right">94.20us</td><td align="right">168 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a><<a class="el" href="classAES128.html" title="AES block cipher with 128-bit keys. ">AES128</a>></td><td align="right">12.33us</td><td align="right">12.33us</td><td align="right">234.91us</td><td align="right">280 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a><<a class="el" href="classAES256.html" title="AES block cipher with 256-bit keys. ">AES256</a>></td><td align="right">16.99us</td><td align="right">16.99us</td><td align="right">322.92us</td><td align="right">344 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a><<a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</a>> (256-bit key)</td><td align="right">2.80us</td><td align="right">2.80us</td><td align="right">81.63us</td><td align="right">384 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEAX.html" title="Implementation of the EAX authenticated cipher. ">EAX</a><<a class="el" href="classSpeckTiny.html" title="Speck block cipher with a 128-bit block size (tiny-memory version). ">SpeckTiny</a>> (256-bit key)</td><td align="right">6.69us</td><td align="right">6.69us</td><td align="right">110.91us</td><td align="right">144 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAcorn128.html" title="ACORN-128 authenticated cipher. ">Acorn128</a></td><td align="right">0.75us</td><td align="right">0.75us</td><td align="right">175.70us</td><td align="right">64 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classAscon128.html" title="ASCON-128 authenticated cipher. ">Ascon128</a></td><td align="right">3.52us</td><td align="right">3.50us</td><td align="right">51.67us</td><td align="right">72 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classHash.html" title="Abstract base class for cryptographic hash algorithms. ">Hash</a> Algorithm</td><td align="right">Hashing (per byte)</td><td align="right">Finalization</td><td></td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA256.html" title="SHA-256 hash algorithm. ">SHA256</a></td><td align="right">1.15us</td><td align="right">76.60us</td><td align="right"></td><td align="right">120 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA512.html" title="SHA-512 hash algorithm. ">SHA512</a></td><td align="right">2.87us</td><td align="right">370.37us</td><td align="right"></td><td align="right">224 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA3__256.html" title="SHA3-256 hash algorithm. ">SHA3_256</a></td><td align="right">5.64us</td><td align="right">735.29us</td><td align="right"></td><td align="right">224 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA3__512.html" title="SHA3-512 hash algorithm. ">SHA3_512</a></td><td align="right">10.42us</td><td align="right">735.49us</td><td align="right"></td><td align="right">224 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a></td><td align="right">0.80us</td><td align="right">53.39us</td><td align="right"></td><td align="right">120 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2b.html" title="BLAKE2b hash algorithm. ">BLAKE2b</a></td><td align="right">1.28us</td><td align="right">164.66us</td><td align="right"></td><td align="right">224 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td>Authentication Algorithm</td><td align="right">Hashing (per byte)</td><td align="right">Finalization</td><td align="right">Key Setup</td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHA256.html" title="SHA-256 hash algorithm. ">SHA256</a> (HMAC mode)</td><td align="right">1.15us</td><td align="right">238.98us</td><td align="right">80.44us</td><td align="right">120 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a> (Keyed mode)</td><td align="right">0.80us</td><td align="right">53.39us</td><td align="right">55.10us</td><td align="right">120 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2s.html" title="BLAKE2s hash algorithm. ">BLAKE2s</a> (HMAC mode)</td><td align="right">0.80us</td><td align="right">168.20us</td><td align="right">57.60us</td><td align="right">120 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classBLAKE2b.html" title="BLAKE2b hash algorithm. ">BLAKE2b</a> (Keyed mode)</td><td align="right">1.28us</td><td align="right">164.66us</td><td align="right">166.68us</td><td align="right">224 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classPoly1305.html" title="Poly1305 message authenticator. ">Poly1305</a></td><td align="right">0.81us</td><td align="right">19.01us</td><td align="right">2.57us</td><td align="right">60 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classGHASH.html" title="Implementation of the GHASH message authenticator. ">GHASH</a></td><td align="right">4.47us</td><td align="right">1.52us</td><td align="right">2.60us</td><td align="right">36 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classXOF.html" title="Abstract base class for Extendable-Output Functions (XOFs). ">XOF</a> Algorithm</td><td align="right">Hashing (per byte)</td><td align="right">Extending (per byte)</td><td>Encryption (per byte)</td><td>State Size (bytes) </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHAKE128.html" title="SHAKE Extendable-Output Function (XOF) with 128-bit security. ">SHAKE128</a></td><td align="right">4.60us</td><td align="right">4.45us</td><td align="right">4.59us</td><td align="right">232 </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classSHAKE256.html" title="SHAKE Extendable-Output Function (XOF) with 256-bit security. ">SHAKE256</a></td><td align="right">5.64us</td><td align="right">5.49us</td><td align="right">5.63us</td><td align="right">232 </td></tr>
|
|
<tr>
|
|
<td colspan="5"></td></tr>
|
|
<tr>
|
|
<td>Public Key Operation</td><td align="right">Time (per operation)</td><td colspan="3">Comment </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classCurve25519.html#a2e4b7dd83a019b32c76584c99bfda21a" title="Evaluates the raw Curve25519 function. ">Curve25519::eval()</a></td><td align="right">103ms</td><td colspan="3">Raw curve evaluation </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classCurve25519.html#a2b6911583d17ea9a36bbbb40d58b3d89" title="Performs phase 1 of a Diffie-Hellman key exchange using Curve25519. ">Curve25519::dh1()</a></td><td align="right">103ms</td><td colspan="3">First half of Diffie-Hellman key agreement </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classCurve25519.html#a14022d6ac68ec691ffb0247275078ab9" title="Performs phase 2 of a Diffie-Hellman key exchange using Curve25519. ">Curve25519::dh2()</a></td><td align="right">104ms</td><td colspan="3">Second half of Diffie-Hellman key agreement </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEd25519.html#a36ecf67b4c5d2d39a31888f56af1f8a5" title="Signs a message using a specific Ed25519 private key. ">Ed25519::sign()</a></td><td align="right">195ms</td><td colspan="3">Digital signature generation </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEd25519.html#ae3e2fc405c9cd8cb1d3ab9b8b452d3e4" title="Verifies a signature using a specific Ed25519 public key. ">Ed25519::verify()</a></td><td align="right">306ms</td><td colspan="3">Digital signature verification </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classEd25519.html#ab62bac52ed07f77f76f3ff0fccd71cb2" title="Derives the public key from a private key. ">Ed25519::derivePublicKey()</a></td><td align="right">194ms</td><td colspan="3">Derive a public key from a private key </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#ac2e07ce7e846ba180938b41b4a2ae563" title="Evaluates the curve function. ">P521::eval()</a></td><td align="right">1503ms</td><td colspan="3">Raw curve evaluation </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#ae04c439804f445535295bf44ae56afbf" title="Performs phase 1 of an ECDH key exchange using P-521. ">P521::dh1()</a></td><td align="right">1503ms</td><td colspan="3">First half of Diffie-Hellman key agreement </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#a7b9d4f74cc2d71a488a33ab165537491" title="Performs phase 2 of an ECDH key exchange using P-521. ">P521::dh2()</a></td><td align="right">1503ms</td><td colspan="3">Second half of Diffie-Hellman key agreement </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#ab050ceff65e49b646b8157fe1474288a" title="Signs a message using a specific P-521 private key. ">P521::sign()</a></td><td align="right">1860ms</td><td colspan="3">Digital signature generation </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#ab075909f5cecbb801c6b7c41f20de223" title="Verifies a signature using a specific P-521 public key. ">P521::verify()</a></td><td align="right">3423ms</td><td colspan="3">Digital signature verification </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classP521.html#a15ca802e298c7ff3be06924b0edb7daa" title="Derives the public key from a private key for P-521 signing operations. ">P521::derivePublicKey()</a></td><td align="right">1503ms</td><td colspan="3">Derive a public key from a private key </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#a335b17b40949f66aa579d1035384662c" title="Generates the key pair for Alice in a New Hope key exchange. ">NewHope::keygen()</a>, Ref</td><td align="right">29ms</td><td colspan="3">Generate key pair for Alice, Ref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#a2f09529f5f73cf9763c28b58b13bbd14" title="Generates the public key and shared secret for Bob. ">NewHope::sharedb()</a>, Ref</td><td align="right">41ms</td><td colspan="3">Generate shared secret and public key for Bob, Ref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#ac8128e0799fe74a6c69c541e0d6bd66e" title="Generates the shared secret for Alice. ">NewHope::shareda()</a>, Ref</td><td align="right">9ms</td><td colspan="3">Generate shared secret for Alice, Ref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#a335b17b40949f66aa579d1035384662c" title="Generates the key pair for Alice in a New Hope key exchange. ">NewHope::keygen()</a>, Torref</td><td align="right">42ms</td><td colspan="3">Generate key pair for Alice, Torref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#a2f09529f5f73cf9763c28b58b13bbd14" title="Generates the public key and shared secret for Bob. ">NewHope::sharedb()</a>, Torref</td><td align="right">53ms</td><td colspan="3">Generate shared secret and public key for Bob, Torref version </td></tr>
|
|
<tr>
|
|
<td><a class="el" href="classNewHope.html#ac8128e0799fe74a6c69c541e0d6bd66e" title="Generates the shared secret for Alice. ">NewHope::shareda()</a>, Torref</td><td align="right">9ms</td><td colspan="3">Generate shared secret for Alice, Torref version </td></tr>
|
|
</table>
|
|
</div></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Fri Apr 27 2018 11:07:37 for Arduino Cryptography Library by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|