| Electronic Components Datasheet Search |
|
DEV-15573 Datasheet(PDF) 27 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-15573 Datasheet(HTML) 27 Page - SparkFun Electronics |
|
27 / 31 page ![]() Output in the Arduino Serial Monitor. Note, this chip is a bit more capable than the built-in Arduino function random() . random(max) random(min, max) It has a basic random(min, max) . This will return a random number of type long. Note, it works very similarly to the built-in Arduino random() function, you can send it a single argument as a max, or you can send it two (as min and max). It also has the following 3 other functions that can be useful in other applications. getRandomByte() getRandomInt() getRandomLong() Each of these functions return a random number of the type written into the name. And lastly... updateRandom32Bytes() will create 32 bytes of random data and store it in atecc.random32Bytes[] . After calling updateRandom32Bytes() then your random 32 bytes of data are available at a public variable within the library instance. If your instance was named atecc as in the SparkFun examples, this array would be atecc.random32Bytes[] . This can be useful as a challenge or time-to-live-token (aka NONCE ) to send to another device. Example 6: Challenge This example shows how to setup a "challenge and response" for authentication between two systems. This is one way to add more security to your communication channel. More specifically, it prevents attackers from intercepting a message and sending it at a later time. This doesn't seem like such a bad thing, but timing of a message is sometimes equally as important as the message itself. Once such interception attack was called the RollJam, and could be used to maliciously open garage doors and unlock cars. After completing this example, you will be able to defend your projects against this type of attack! Note: If you upload the sketch as is, then it will fail to verify. This is because Bob does not have Alice's public key yet. The array at the top of the sketch is simply place holders at this point. Please follow along below to get a successful challenge and verification. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |