From 3b4a928457c52a0329c8d82f7bdc831203bb24fa Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Sun, 3 May 2015 14:25:20 +1000 Subject: [PATCH] Move example EEPROM address for RNG from 500 to 950 --- doc/crypto-rng.dox | 6 +++--- libraries/Crypto/RNG.cpp | 4 ++-- libraries/Crypto/examples/TestCurve25519/TestCurve25519.ino | 2 +- libraries/Crypto/examples/TestEd25519/TestEd25519.ino | 2 +- libraries/Crypto/examples/TestRNG/TestRNG.ino | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/crypto-rng.dox b/doc/crypto-rng.dox index 0cf3ed56..1752d20b 100644 --- a/doc/crypto-rng.dox +++ b/doc/crypto-rng.dox @@ -112,8 +112,8 @@ all of the application's noise sources: \code void setup() { // Initialize the random number generator with the application tag - // "MyApp 1.0" and load the previous seed from EEPROM address 500. - RNG.begin("MyApp 1.0", 500); + // "MyApp 1.0" and load the previous seed from EEPROM address 950. + RNG.begin("MyApp 1.0", 950); // Add the noise source to the list of sources known to RNG. RNG.addNoiseSource(noise); @@ -132,7 +132,7 @@ those can be mixed in during the setup() function after calling begin(): \code void setup() { - RNG.begin("MyApp 1.0", 500); + RNG.begin("MyApp 1.0", 950); RNG.stir(serial_number, sizeof(serial_number)); RNG.stir(mac_address, sizeof(mac_address)); RNG.addNoiseSource(noise); diff --git a/libraries/Crypto/RNG.cpp b/libraries/Crypto/RNG.cpp index 5e03f5bd..a7ef58a6 100644 --- a/libraries/Crypto/RNG.cpp +++ b/libraries/Crypto/RNG.cpp @@ -71,8 +71,8 @@ * Ethernet.begin(mac_address); * * // Initialize the random number generator with the application tag - * // "MyApp 1.0" and load the previous seed from EEPROM address 500. - * RNG.begin("MyApp 1.0", 500); + * // "MyApp 1.0" and load the previous seed from EEPROM address 950. + * RNG.begin("MyApp 1.0", 950); * * // Stir in the Ethernet MAC address. * RNG.stir(mac_address, sizeof(mac_address)); diff --git a/libraries/Crypto/examples/TestCurve25519/TestCurve25519.ino b/libraries/Crypto/examples/TestCurve25519/TestCurve25519.ino index 8be8011f..5ebc97e7 100644 --- a/libraries/Crypto/examples/TestCurve25519/TestCurve25519.ino +++ b/libraries/Crypto/examples/TestCurve25519/TestCurve25519.ino @@ -207,7 +207,7 @@ void setup() // Start the random number generator. We don't initialise a noise // source here because we don't need one for testing purposes. // Real DH applications should of course use a proper noise source. - RNG.begin("TestCurve25519 1.0", 500); + RNG.begin("TestCurve25519 1.0", 950); // Perform the tests. testEval(); diff --git a/libraries/Crypto/examples/TestEd25519/TestEd25519.ino b/libraries/Crypto/examples/TestEd25519/TestEd25519.ino index 2ce0190c..30e219d7 100644 --- a/libraries/Crypto/examples/TestEd25519/TestEd25519.ino +++ b/libraries/Crypto/examples/TestEd25519/TestEd25519.ino @@ -227,7 +227,7 @@ void setup() // Start the random number generator. We don't initialise a noise // source here because we don't need one for testing purposes. // Real applications should of course use a proper noise source. - RNG.begin("TestEd25519 1.0", 500); + RNG.begin("TestEd25519 1.0", 950); // Perform the tests. testFixedVectors(); diff --git a/libraries/Crypto/examples/TestRNG/TestRNG.ino b/libraries/Crypto/examples/TestRNG/TestRNG.ino index 994f2ea5..9141c442 100644 --- a/libraries/Crypto/examples/TestRNG/TestRNG.ino +++ b/libraries/Crypto/examples/TestRNG/TestRNG.ino @@ -12,7 +12,7 @@ #define RNG_APP_TAG "MyApp 1.0" // EEPROM address to save the random number seed at. -#define RNG_EEPROM_ADDRESS 500 +#define RNG_EEPROM_ADDRESS 950 // Noise source to seed the random number generator. TransistorNoiseSource noise(A1);