1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00

Update docs

This commit is contained in:
Rhys Weatherley
2016-01-16 09:47:55 +10:00
parent 9fb22bce90
commit ab1bf9b19b
386 changed files with 5395 additions and 2985 deletions

View File

@@ -103,6 +103,12 @@ Standard noise sources</h1>
<p>The transistor design needs an input voltage of 10 to 15 VDC to trigger the avalanche effect, which can sometimes be difficult in a 5V Arduino environment. The ring oscillator design can run at 5V but the quality of the noise is less than for the transistor design. The <a class="el" href="classRingOscillatorNoiseSource.html" title="Processes the signal from a ring oscillator based noise source. ">RingOscillatorNoiseSource</a> class attempts to make up for this by collecting more input bits for the same amount of output entropy. See <a class="el" href="crypto_rng_ring.html">this page</a> for more information on ring oscillators.</p>
<p>For both of the standard noise sources, the system should have enough entropy to safely generate 256 bits of key material about 3 to 4 seconds after startup. This is sufficient to create a private key for <a class="el" href="classCurve25519.html" title="Diffie-Hellman key agreement based on the elliptic curve modulo 2^255 - 19. ">Curve25519</a> for example.</p>
<p>If you are unsure which noise source to use, then I suggest <a class="el" href="classTransistorNoiseSource.html" title="Processes the signal from a transistor-based noise source. ">TransistorNoiseSource</a> as Rob's design has had more review. Another approach is to mix multiple noise sources together to get the best of both worlds.</p>
<h1><a class="anchor" id="crypto_rng_builtin"></a>
Built-in entropy sources</h1>
<p>Some entropy sources are built in and do not need to be provided via a <a class="el" href="classNoiseSource.html" title="Abstract base class for random noise sources. ">NoiseSource</a> object.</p>
<p>On the Arduino Due, the built-in True Random Number Generator (TRNG) is used to seed the random number generator in addition to any configured noise sources.</p>
<p>On AVR-based Arduino platforms (Uno, Nano, Mega, etc), jitter between the watchdog timer and the main CPU clock is used to harvest some entropy using a technique similar to that described <a href="https://sites.google.com/site/astudyofentropy/project-definition/timer-jitter-entropy-sources/entropy-library">here</a>. This is not a high quality source of entropy but it is "better than nothing" if an external noise source is not available or practical. Entropy accumulates very slowly and it could take several minutes before the state is sufficiently random for safe use.</p>
<p>For security-critical applications it is very important to combine the built-in entropy sources with an external noise source.</p>
<h1><a class="anchor" id="crypto_rng_init"></a>
Initializing the random number generator</h1>
<p>To use the random number generator, both <a class="el" href="classRNGClass.html">RNG</a> and a noise source must first be initialized. We start by including the necessary libraries:</p>
@@ -184,7 +190,7 @@ Destroying secret data</h1>
</div><!-- fragment --> </div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Dec 18 2015 05:39:07 for ArduinoLibs by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Sat Jan 16 2016 09:47:01 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>