mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
Update docs
This commit is contained in:
45
crypto.html
45
crypto.html
@@ -79,25 +79,50 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><h1><a class="anchor" id="crypto_algorithms"></a>
|
||||
Supported Algorithms</h1>
|
||||
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>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>, <a class="el" href="classSpeck.html" title="Speck block cipher with a 128-bit block size. ">Speck</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="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>, <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>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>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>, <a class="el" href="classAcorn128.html" title="ACORN-128 authenticated cipher. ">Acorn128</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>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="classRNGClass.html">RNG</a>, <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>
|
||||
<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>
|
||||
<li><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></li>
|
||||
<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> </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>
|
||||
<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 encryptionm and decryption.</p>
|
||||
<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>
|
||||
@@ -419,7 +444,7 @@ Performance on ARM</h2>
|
||||
</div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Thu Apr 26 2018 06:55:48 for Arduino Cryptography Library by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Thu Apr 26 2018 08:02:04 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>
|
||||
|
||||
Reference in New Issue
Block a user