APPLICATION NOTE. Generating Random Secrets. ATSHA204A, ATECC108A, and ATECC508A. Description. Topics

Similar documents
APPLICATION NOTE. 3-lead CONTACT Package Usage. ATSHA204A, ATECC108A, and ATECC508A. Introduction. 3-lead CONTACT Package

AVR42789: Writing to Flash on the New tinyavr Platform Using Assembly

APPLICATION NOTE. CryptoAuthentication Personalization Guide. ATSHA204A and ATECC508A. Introduction. Features

ATECC508A Public Key Validation. Introduction. Atmel CryptoAuthentication APPLICATION NOTE

AT60142H/HT. Rad-Hard 512Kx8 Very Low Power CMOS SRAM ERRATA-SHEET. Active Errata List. Errata History. Abbreviations. 1.

AT88CK101 HARDWARE USER GUIDE. Atmel CryptoAuthentication Development Kit. Atmel CryptoAuthentication AT88CK101 Daughterboard

AT03975: Getting Started with SAM L21. Descripton. Features. SMART ARM-Based Microcontroller APPLICATION NOTE

ATAES132A Firmware Development Library. Introduction. Features. Atmel CryptoAuthentication USER GUIDE

AT21CS Series Reset and Discovery. Introduction. Serial EEPROM APPLICATION NOTE

APPLICATION NOTE. AT6486: Using DIVAS on SAMC Microcontroller. SMART ARM-Based Microcontroller. Introduction. Features

AT09381: SAM D - Debugging Watchdog Timer Reset. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

ATECC108/ATSHA204 USER GUIDE. Atmel Firmware Library. Features. Introduction

This user guide describes how to run the Atmel ATWINC3400 Bluetooth Low Energy (BLE) Provisioning demo from out-of-box conditions.

Smart RF Device Family - Getting Started Guide. Features. Description. References ATAN0115 APPLICATION NOTE

AT03262: SAM D/R/L/C System Pin Multiplexer (SYSTEM PINMUX) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

AT06467: Getting started with SAM D09/D10/D11. Features. Description. SMART ARM-based Microcontrollers APPLICATION NOTE

EDBG. Description. Programmers and Debuggers USER GUIDE

AT11512: SAM L Brown Out Detector (BOD) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Features. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

QT3 Xplained Pro. Preface. Atmel QTouch USER GUIDE

Ethernet1 Xplained Pro

The Three-Legged Stool of Cryptography

USER GUIDE. Atmel QT6 Xplained Pro. Preface

DGILib USER GUIDE Atmel-42771A-DGILib_User Guide-09/2016

QT2 Xplained Pro. Preface. Atmel QTouch USER GUIDE

AT10942: SAM Configurable Custom Logic (CCL) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

USER GUIDE. ATWINC1500 Xplained Pro. Preface

APPLICATION NOTE. AT04470: Differences between SAM D21 Variants A, B, and L. 32-bit Microcontroller. Introduction

APPLICATION NOTE. AT11008: Migration from ATxmega16D4/32D4 Revision E to Revision I. Atmel AVR XMEGA. Introduction. Features

ATtiny817 QTouch Moisture Demo User Guide. Description. Features. AVR 8-bit Microcontrollers USER GUIDE

SAMA5D2 Quad SPI (QSPI) Performance. Introduction. SMART ARM-based Microprocessor APPLICATION NOTE

ATECC108. Atmel CryptoAuthentication SUMMARY DATASHEET. Features. Applications NOT RECOMMENDED FOR NEW DESIGNS. Replaced by ATECC108A

AT88RF04C. CryptoRF EEPROM Memory 13.56MHz, 4 Kilobits SUMMARY DATASHEET. Features

APPLICATION NOTE. Atmel QT4 Xplained Pro User Guide ATAN0114. Preface

AVR42772: Data Logger Demo Application on XMEGA A1U Xplained Pro. Introduction. Features. AVR XMEGA Microcontrollers APPLICATION NOTE

Native route discovery algorithm

USER GUIDE. Atmel Segment LCD1 Xplained Pro. Preface

APPLICATION NOTE. AT05567: TC Capture on External Interrupt with the Event System on SAM D20. Preface ASF PROJECT DOCUMENTATION

AT88SC3216CRF. CryptoRF EEPROM Memory 13.56MHz, 32 Kilobits SUMMARY DATASHEET. Features

ATtiny104 Xplained Nano. Preface. AVR 8-bit Microcontrollers USER GUIDE

APPLICATION NOTE. AT03324: Atmel REB212BSMA-EK Quick Start Guide. Atmel MCU Wireless. Introduction

APPLICATION NOTE. Scope. Reference Documents. Software Ethernet Bridge on SAMA5D3/D4. Atmel SMART SAMA5D3/D4 Series

APPLICATION NOTE. Atmel AT03160: Migrating Bootloader from ATxmega128A1 to other Atmel XMEGA Devices. Atmel AVR XMEGA. Features.

Hardware Prerequisites Atmel Xplained Pro Evaluation Kit Atmel WINC1500 extension USB Micro Cable (TypeA / MicroB)

I/O1 Xplained Pro. Preface. Atmel MCUs USER GUIDE

USER GUIDE. ZigBit USB Stick User Guide. Introduction

APPLICATION NOTE. How to Securely Switch Atmel s LIN Transceiver ATA6662/ATA6662C to Sleep Mode ATA6662/ATA6662C. Concerning Atmel ATA6662

APPLICATION NOTE. Atmel AVR1638: XMEGA RTC Calibration. 8-bit Atmel Microcontrollers. Features. Introduction

Atmel AVR1619: XMEGA-B1 Xplained Demonstration. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

USER GUIDE. Atmel OLED1 Xplained Pro. Preface

APPLICATION NOTE. Atmel AT03261: SAM D20 System Interrupt Driver (SYSTEM INTERRUPT) SAM D20 System Interrupt Driver (SYSTEM INTERRUPT)

ATZB-SAMR21-XPRO. Preface. SmartConnect USER GUIDE

64K (8K x 8) Battery-Voltage Parallel EEPROM with Page Write and Software Data Protection AT28BV64B

APPLICATION NOTE. Atmel AT03304: SAM D20 I 2 C Slave Bootloader SAM D20. Description. Features

USER GUIDE. Atmel QT1 Xplained Pro. Preface

SAM4 Reset Controller (RSTC)

Atmel QT600 Quick Start Guide Touch Solutions

MySonicWall Secure Upgrade Plus

Atmel AVR32847: Migration from/to the UC3L0 64/32/16 from/to the UC3L0 256/ bit Atmel Microcontrollers. Application Note.

USER GUIDE. Atmel maxtouch Xplained Pro. Preface

OLED display with pixels resolution Ambient light sensor CPU load Analog filter Quadrature Encoder with push button Digital I/O

USER GUIDE EDBG. Description

SMART ARM-based Microcontrollers ATSAMD21E16LMOTOR USER GUIDE

AVR1315: Accessing the XMEGA EEPROM. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

RELEASE NOTES. GNU Toolchain for Atmel ARM Embedded Processors. Introduction

AVR1518: XMEGA-A1 Xplained Training - XMEGA Clock System. 8-bit Atmel Microcontrollers. Application Note. Prerequisites.

AVR1503: Xplain training - XMEGA Programmable Multi Interrupt Controller 8-bit Microcontrollers Application Note Prerequisites

Atmel and the use of Verilator to create uc Device Models

Atmel LF-RFID Kit Comparison Chart. Application Note. Atmel LF-RFID Kit Comparison Chart. 1. Description

Application Note Using the ATV750, ATV750B, and ATF750C Erasable Programmable Logic Device Introduction 1.1 Device Names and Pin/Node Assignments

How to Show Grouping in Scatterplots using Statistica

APPLICATION NOTE. Atmel AVR536: Migration from ATmega644 to ATmega644A. 8-bit Atmel Microcontrollers. Introduction

One Identity Password Manager User Guide

AT07942: SAM4L Asynchronous Timer (AST) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

APPLICATION NOTE. Atmel AVR057: Internal RC Oscillator Calibration for ATtiny4/5/9/10/20/40. 8-bit Atmel Microcontrollers. Features.

SonicWall Mobile Connect for Chrome OS

AVR1303: Use and configuration of IR communication module. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR32752: Using the AVR32 UC3 Static Memory Controller. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AT697E. Application Note. Checking AT697E Code for Occurrence of LDF/FPOPd Instructions Sequence with a dependency on an Odd-Numbered Register

AT03664: Getting Started with FreeRTOS on SAM D20/D21/R21/L21/L22. Introduction. Features. SMART ARM-based Microcontrollers APPLICATION NOTE

a clock signal and a bi-directional data signal (SCL, SDA)

One Identity Starling Two-Factor Desktop Login 1.0. Administration Guide

APPLICATION NOTE. Atmel AT02260: Driving AT42QT1085. Atmel QTouch. Features. Description

AT02667: XMEGA-E5 Xplained Hardware User's Guide. Features. Description. AVR XMEGA Microcontrollers APPLICATION NOTE

EAM Portal User's Guide

Cloud Access Manager How to Deploy Cloud Access Manager in a Virtual Private Cloud

APPLICATION NOTE. Atmel AT01080: XMEGA E Schematic Checklist. Atmel AVR XMEGA E. Features. Introduction

USER GUIDE. Atmel PROTO1 Xplained Pro. Preface

Atmel CryptoAuthentication Starter Kit

One Identity Starling Two-Factor Authentication. Administration Guide

USER GUIDE. AT08578: SAM D20 QTouch Robustness Demo. Atmel QTouch. Description. Features

USER GUIDE. ATmega168 Xplained Mini User Guide. Introduction

Atmel AVR ATxmega384C3 microcontroller OLED display with 128x32 pixels resolution Analog sensors. Ambient light sensor Temperature sensor

USER GUIDE. Wireless Production Test Reference Protocol Specification Document. Atmel MCU Wireless. Description

Atmel ATtiny1634 MCU Atmel ATA SBC LIN transceiver with integrated voltage regulator Touch. Three Atmel QTouch buttons One Atmel QTouch slider

APPLICATION NOTE. Atmel AVR3009: Driving QTouch Device with I 2 C Interface. Atmel QTouch. Introduction

AVR1501: Xplain training XMEGA Timer/Counter 8-bit Microcontrollers Application Note Prerequisites 1 Introduction

APPLICATION NOTE. Atmel AVR2131: Lightweight Mesh Getting Started Guide. Atmel MCU Wireless. Features. Description

Tisio CE Release Notes

AT91 ARM Thumb Microcontrollers. Application Note. AT91 Host Flash Loader. 1. Package Contents. 2. Definition of Terms. 3.

Transcription:

APPLICATION NOTE Generating Random Secrets ATSHA204A, ATECC108A, and ATECC508A Description When defining a secret that will be used for cryptographic authentication, it is important that the secret is not predictable in any way. The classic way to do that is by using a high quality random number. The Atmel CryptoAuthentication devices can generate high-quality random numbers which can be deployed for any purpose, including as part of the crypto protocols of the device itself. Because each 256-bit random number is guaranteed to be unique from all numbers ever generated on this or any other device, its inclusion in the protocol calculation ensures that replay attacks (i.e. re-transmitting a previously successful transactions) always fail. This random number generator is very useful for authentication or for any other system purposes. Topics Why a Truly Random Secret Matters What Makes a High-quality Secret How to use ACES (Atmel Crypto Evaluation Studio) software to access high-quality true random numbers for personalization of the crypto devices or for other external application software.

1 Random Secrets For a secret to be truly random it must be unpredictable, non-correlated, and unrepeatable. Why is true randomness important for secrets? 1. The strength of cryptographic security is mathematically linked to the randomness of the secrets used. 2. If a secret is not random, an exhaustive attack may become possible. Generating a random number using a deterministic computer can be a challenge. Random number algorithms use a seed along with a predictable algorithm to generate a pseudo-random number. It is therefore the randomness of the seed that will determine the ultimate quality of the random number. In the crypto devices, the random seed comes from variations at a quantum scale within the device. The inherent quantum mechanical entropy of the circuitry within the device provides a truly random seed for the Random and Nonce Commands. 1.1 Less Secure Secrets There are some techniques and practices that should be avoided. These practices can produce secrets with lower entropy and may be discoverable. 1.1.1 Using a Pseudo Random Number Generator Most operating systems have a Pseudo Random Number Generator (PRNG) which is useful for workstation randomness. The problem with a PRNG is that it does not have a truly random seed to work with, and as a result patterns can emerge. See the visualization of the Windows PRNG below. Figure 1-1. Windows PRNG http://www.random.org/analysis/#visual 1.1.2 Making Up a Secret Made up by a human secret will always have a pattern to it. The main problems noted below: People get bored so patterns will occur quickly. The human brain has a lot of structure devoted to pattern recognition and creation. Truly random numbers will contain repeats which humans try to avoid. Humans aren't good with large numbers. 2

2 Walkthrough This section outlines the steps involved to access the crypto device s random function by using the ACES application software. 2.1 Device Configuration Since keys will not be used, the only requirement is to have the device locked per the datasheet s instructions. The Random Command section of the datasheet states: Prior to the configuration section being locked, the random number generator produces a value of 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00 to facilitate testing 1. Launch ACES Configuration Environment (ACES CE) with a crypto device on an AT88CK590 or AT88CK101 kit for example. Figure 2-1. AT88CK101 Development Kit Figure 2-2. AT88CK590 Demo-evaluation Kit 2. Observe the locked state of the crypto device in the Lock State dialog box located in the lower left corner of the ACES application. Figure 2-3. Lock State is Unlocked Figure 2-4. Lock State is Locked 3. If the lock state is locked, then skip to Section 2.2. Random Secret Generation. 4. If the lock state is unlocked, then the crypto device device needs to be locked. Select the Lock Zones button in the Lock State dialog box shown in Figure 2-3. The Lock Zone dialog box will be displayed as shown in Figure 2-4. Select the Lock Configuration Zone check box. Select the Lock OTP and Data Zones check box. Select the Lock Zones button. The Lock Successful message will be displayed. 3

Figure 2-5. Lock Zone Dialog Box 5. The lock state should now indicate locked as shown in Figure 2-5. 2.2 Random Secret Generation The next step is to use the crypto element device to generate a 256 bit (32 byte) random number. 1. Run the Random command from the Command Builder dialog box. Select Tools > then select Command Builder from the menu. The Command Builder dialog box will be displayed as shown in Figure 2-6. In the OpCode drop down list, select Random. Leave the Mode and Zero fields set to zeros. Click on the Execute Command button. The Response Packet field will contain the random number. Figure 2-6. Random Command Builder 4

2. To copy the random number, do the following: Select the random number: Left-triple-click in the Response Packet field or Click and drag select the Response Packet field. Right-click and select Copy as shown in Figure 2-7. 3. Every time the Execute Command button is pressed, a High-Quality True Random Number is generated. Figure 2-7. Copy the Random Number 4. Paste the random number (which is now in the copy buffer) into any field in ACES, or it can paste into any other application. The copied random number will remain in the copy buffer until replaced by another Copy command. 3 Summary Truly random secrets are extremely important to maximize the security of any system. The Random command implemented in both the ATSHA204A and ATECC508A generates high quality cryptographic random numbers. These True Random Numbers can be accessed for any purpose by using the ACES application software with a locked crypto element device. 4 Revision History Doc Rev. Date Comments 8843B 09/2015 Updated to include all ATSHA204A, ATECC108A, and ATECC508A devices. 8843A 05/2013 Initial document release. 5

6 Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 www.atmel.com 2015 Atmel Corporation. / Rev.:. Atmel, Atmel logo and combinations thereof, Enabling Unlimited Possibilities, and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. Other terms and product names may be trademarks of others. DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intell ectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODU CTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAG ES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any com mitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or wa rranted for use as components in applications intended to support or sustain life. SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death ( Safety -Critical Applications ) without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation o f nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for Generating use automotive Random applications Secrets unless specifically [APPLICATION designated by Atmel NOTE] as automotive-grade.