ATECC108A
ATECC108A
ATECC108A
Features
Atmel-8895CX-CryptoAuth-ATECC108A-Datasheet_01/13/2016
Pin Configuration and Pinouts
Pin Function
NC No Connect
GND Ground
Figure 1. Pinouts
1 Introduction ................................................................................................................. 6
1.1 Applications ........................................................................................................................................... 6
1.2 Device Features .................................................................................................................................... 6
1.3 Cryptographic Operation ....................................................................................................................... 7
1.4 Commands ............................................................................................................................................ 8
6 I2C Interface................................................................................................................ 38
6.1 I/O Conditions ..................................................................................................................................... 38
6.1.1 Device is Asleep ..................................................................................................................... 38
6.1.2 Device is Awake ..................................................................................................................... 38
2
6.2 I C Transmission to ATECC108A........................................................................................................ 40
6.2.1 Word Address Values ............................................................................................................. 41
6.2.2 Command Completion Polling ................................................................................................ 41
6.3 Sleep Sequence .................................................................................................................................. 41
6.4 Idle Sequence ..................................................................................................................................... 41
2
6.5 I C Transmission from the ATECC108A ............................................................................................. 42
6.6 Address Counter ................................................................................................................................. 42
6.7 SMBus Timeout ................................................................................................................................... 43
2
6.8 I C Synchronization ............................................................................................................................. 43
10 Compatibility.............................................................................................................. 92
10.1 Atmel ATSHA204 ................................................................................................................................ 92
10.2 Atmel ATECC108 ................................................................................................................................ 92
11 Mechanical ................................................................................................................. 93
11.1 Pinouts ............................................................................................................................................... 93
11.2 Wiring Configuration for Single-Wire Interface .................................................................................... 93
1.1 Applications
® ™
The Atmel ATECC108A is a member of the Atmel CryptoAuthentication family of crypto engine authentication
devices with highly secure hardware-based key storage.
The ATECC108A has a flexible command set that allows use in many applications, including the following,
among many others:
Network/IoT Node Protection
Authenticates node IDs and ensures the integrity of messages.
Anti-Counterfeiting
Validates that a removable, replaceable, or consumable client is authentic. Examples of clients could be
system accessories, electronic daughter cards, or other spare parts. It can also be used to validate a
software/firmware module or memory storage element.
Protecting Firmware or Media
Validates code stored in flash memory at boot to prevent unauthorized modifications, encrypt downloaded
program files as a common broadcast, or uniquely encrypt code images to be usable on a single system
only.
Storing Secure Data
Store secret keys for use by crypto accelerators in standard microprocessors. The ATECC108A can be
used to store small quantities of data necessary for configuration, calibration, ePurse value, consumption
data, or other secrets. Programmable protection is available using encrypted/authenticated reads and
writes.
Checking User Password
Validates user-entered passwords without letting the expected value become known, maps memorable
passwords to a random number, and securely exchanges password values with remote systems.
1.4 Commands
The ATECC108A is a command-based device which receives commands from the system, executes those
commands, and then returns a result or error code. Within this document, the following nomenclature is used to
describe the various commands:
Security Commands
Described in Section 9, Security Commands; this group of commands generally access the EEPROM
space and/or perform cryptographic computation. These commands are indicated with a special font in this
document (e.g. GenDig) and are available from all interfaces.
Cryptographic Commands
This subset of the security commands includes all the ECC commands which access the hardware ECC
accelerator (GenKey, Sign, and Verify) and the SHA commands which access the hardware SHA
accelerator (CheckMac, DeriveKey, GenDig, HMAC, MAC, SHA, and Nonce).
Zone of 128 bytes (1,024-bit) EEPROM that contains the serial number SN[a:b] = Arrange of bytes
Configuration and other ID information, as well as, access the permission information within a field of the
for each slot of the data memory. Configuration zone.
Zone of 64 bytes (512 bits) of OTP bits. Prior to locking the OTP zone,
One Time OTP[bb] = A byte within the
the bits may be freely written using the standard Write command.
Programmable OTP zone, while OTP[aa:bb]
The OTP zone can be used to store read-only data or one-way fuse
(OTP) indicates a range of bytes.
type consumption logging information.
Terms discussed within this document will have the following meanings:
Term Meaning
A single 256-bit (32-byte) area of a particular memory zone. The industry SHA-256 documentation
Block also uses the term “block” to indicate a 512-bit section of the message input. Within this document, this
convention is used only when describing hash input messages.
keyID is equivalent to the slot number for those slots designated to hold key values. Key 1 (sometimes
referred to as key[1]) is stored in Slot[1] and so on. While all 16 slots can potentially hold keys, those
keyID
slots which are configured to permit clear-text reads would not normally be used as private or secret
keys by the crypto commands.
Contains input and output buffers, as well as, state storage locations. See Section 2.5, Static RAM
SRAM
(SRAM) Memory.
(1)
Slot Blocks Bytes Bits Typical Use Notes
Only these slots implement the single use feature (Section 3.2.5,
Private or
0–7 2 36 288 Single Use Keys). While all slots support key derivation; only these
Secret Key
slots include UpdateCounters (Section 3.2.2, Rolled Keys).
Public Key, For curves supported by this device, these slots are large enough to
9 – 14 3 72 576 Signature or contain both the X and Y components of an ECDSA public key or the
Certificate R and S components of an ECDSA signature.
Private, Data, This is the only slot that supports the 128 count limited use feature
Secret Key, (Section 3.2.6, Limited Use Key (Slot 15 only)), If this feature is not
15 3 72 576
Signature, or required, then it can otherwise be used for the same purposes as
Certificate Slots 9 thru 14.
Note: 1. The last block in some data slots contains fewer than 32 bytes.
Data slots which contain ECC public or private keys should be formatted according to Section 4.1.1, ECC Key
Formatting. The device uses the keyType and pubInfo fields of KeyConfig to determine what is stored in a slot.
Private keys can never be read from the device under any circumstances. ECC key slot contents may not be
usable by the ECC commands unless they are validated as follows:
ECC Private Keys
Prior to the first PrivWrite or GenKey(Create) command execution on a slot, private keys are
invalid. The key may also be invalid if the PrivWrite command is started, but power is interrupted prior
to its completion.
ECC Public Keys
The key must be validated using an input signature and the ECC Verify command if the PubInfo bit of
KeyConfig is one. If that bit is zero, then ECC usage does not depend on the key Verify operation.
These keys may be stored in Slots 8 thru 15 only. This feature is optional.
47 RevNum Device revision number. See Section 2.2.6. Never Always
8 12 SN[4:8] Part of the serial number value. See Section 2.2.6. Never Always
0xAA (Read-only Mode): Writes to the OTP zone are forbidden when
the OTP zone is locked. Reads of all words are permitted.
0x55 (Consumption Mode): Writes to the OTP zone when the OTP
zone is locked; causes bits to transition only from a one to a zero. If Config
18 OTPmode Always
Reads of all words are permitted. Unlocked
0x00 (Legacy Mode): When the OTP zone is locked, the device
operates in a manner compatible with the ATSA102S.
All other values of OTP mode are reserved and should not be used.
Bit 0: SelectorMode.
0 = Selector can always be written with the UpdateExtra
command.
1= Selector can only be written if it currently has a value of zero.
Bit 1: TTLenable.
1 = Input levels are VCC referenced. If Config
19 ChipMode Always
0 = Input levels use a fixed reference. Unlocked
Bit 2: Watchdog Duration.
0 = tWATCHDOG is 1.3s, nominal.
1 = tWATCHDOG is 10.0s, nominal. Atmel recommends this be set
to zero for the best security
Bits 3-7: Should be set to 000000.
Two bytes of access and usage permissions and controls for each slot If Config
20 51 SlotConfig
Unlocked
Always
of the Data zone. See Section 2.2.1, SlotConfig (Bytes 20 to 51).
For limited use keys 0 to 7, this byte indicates how many times a key
52,54,56,58 UseFlag may be used before such use is disabled. Applies to Keys 0 to 7 only If Config
Always
60,62,64.66 (byte 52 corresponds to Key0, 54 to Key1, and so on). Initialized to Unlocked
0xFF. See 3.2.5, Single Use Keys.
For keys that can be updated with the DeriveKey, these bytes
indicate how many times this operation has been performed. Applies to
53,55,57,59 UpdateCount Keys 0 to 7 only, (byte 53 corresponds to Key0, 55 to Key1, and so on). If Config
Always
61,63,65,67 Unlocked
Initialized to 0x00. See Sections 3.2.2, Rolled Keys, 3.2.4, Created
Secret Keys, and 9.3, DeriveKey Command.
128 bits to control limited use for KeyID 15. Initialized to 0xFF. See If Config
68 83 LastKeyUse
Unlocked
Always
Section 3.2.6, Limited Use Key (Slot 15 only).
Via Update
One byte value that can be modified via the UpdateExtra command
84 UserExtra Extra Cmd Always
after the Data zone has been locked. Only
Selects which device will remain in active mode after execution of the Via Update
85 Selector Pause command. See Sections 9.11, Pause Command and 9.17, Extra Cmd Always
UpdateExtra Command). Only
If Config
90 – 91 RFU Must be zero. Unlocked
Always
Four individual format bytes are associated with the X.509 certificate
formatting of public keys stored within the device. If the value of the
byte associated with a particular public key is zero, then these
formatting restrictions are ignored and that public key can be validated
with Verify(Validate). Unused bytes within this array must be
zero, otherwise, the formatting must be as follows:
Bits 0 – 3: PublicPosition. The block number in which the public key If Config
92 – 95 X509format Always
must be inserted in the SHA sequence for the Unlocked
Verify(ValidateExternal) command to properly
validate a public key.
Bits 4 – 7: TemplateLength. The total number of blocks in the entire
SHA sequence which are required for the
Verify(ValidateExternal) command to properly
validate a public key.
Two bytes of additional access and usage permissions and controls for
If Config
96 – 127 KeyConfig each slot of the Data zone. See Section 2.2.5, KeyConfig (Bytes 96 thru Always
Unlocked
127).
Use this keyID to encrypt data being read from this slot using the Read command. See more
information in the description for bit 6 in this table, the Section 9.14, Read Command, and Table
2-6 for more details.
0 = Then this slot can be the source for the CheckMac copy operation. See Section 3.2.7,
Password Checking.
► Do not use zero as a default. Do not set this field to zero unless the CheckMac copy
03 ReadKey operation is explicitly desired, regardless of any other read/write restrictions.
Slots containing private keys can never be read and this field has a different meaning:
Bit 0: External signatures of arbitrary messages are enabled.
Bit 1: Internal signatures of messages generated by CheckMac or GenKey are enabled.
Bit 2 and 3: Reserved for the future use. These bits must be set to zero.
For slots containing public keys that can be validated (PubInfo is one, see Section 2.2.5,
KeyConfig), this field stored the ID of the key that should be used to perform the validation.
1 = The key stored in the slot is intended for verification usage and cannot be used by the
MAC or HMAC commands. When this key is used to generate or modify TempKey, then
4 NoMac
that value may not be used by the MAC and HMAC commands.
0 = The key stored in the slot can be used by all commands.
1 = The key stored in the slot is “Limited Use”. See Section 3.2.6, Limited Use Key (Slot 15
only).
5 LimitedUse
► LimitedUse is only supported for slots 0 to 7. This bit must be zero for slots 8 – 14.
0 = There are no usage limitations.
1 = Reads from this slot will be encrypted using the procedure specified in the Read command
(Section 9.1.4, Address Encoding) using ReadKey (bits 0 to 3 in this table) to generate the
6 EncryptRead encryption key. No input MAC is required. If this bit is set, then IsSecret must also be set (in
addition, see the following Table 2-6).
0 = Clear text reads may be permitted.
1 = The contents of this slot are secret – Clear text reads are prohibited and both 4-byte reads
and writes are prohibited. This bit must be set if EncryptRead is a one or if WriteConfig has
any value other than Always to ensure proper operation of the device.
7 IsSecret
0 = The contents of this slot should contain neither confidential data nor keys. The GenKey
and Sign commands will fail if IsSecret is set to zero for any ECC private key.
See Table 2-6 for additional information.
Use this key to validate and encrypt data written to this slot. See Section 9.19, Write
8 11 WriteKey
Command.
Clear text reads are always permitted from this slot. Slots set to this state should never be
0 0
used as key storage. Either 4 or 32 bytes may be read at a time.
Reads are never permitted from this slot. Slots set to this state can still be used for key
1 0
storage.
Reads from this slot are encrypted using the encryption algorithm documented in
1 1 Section 9.14, Read Command. The encryption key is in the slot specified by ReadKey.
4-byte reads and writes are prohibited.
The tables overlap: for example, a code of 0110 indicates a slot which can be written in encrypted
form using the Write command and can also be the target of an unauthorized DeriveKey
command with the target as the source.
KeyType in the KeyConfig field (see Table 2-7) indicates whether the GenKey or DeriveKey commands can
be used on a particular slot; with GenKey for ECC keys only, and DeriveKey for SHA-256 keys.
See Section 2.2.4, Writing ECC Private Keys for special information regarding the writing of ECC private keys.
ECC public keys are treated as normal data, and Write permissions for those slots are described in this section.
Clear text writes are always permitted on this slot. Slots set to
0 0 0 0 Always always should never be used as key storage. Either 4 or 32 bytes
may be written to this slot.
Writes are never permitted on this slot using the Write command.
0 0 1 X Never
Slots set to never can still be used as key storage.
Writes are never permitted on this slot using the Write command.
1 0 X X Never
Slots set to never can still be used as key storage.
Writes to this slot require a properly computed MAC, and the input
data must be encrypted by the system with WriteKey using the
X 1 X X Encrypt encryption algorithm documented in the Write command
description (Section 9.19, Write Command). 4-byte writes to this
slot are prohibited.
(1)
Bit 15 Bit 14 Bit 13 Bit 12 Source Key Description
0 X 1 0 Target DeriveKey command can be run without authorizing MAC. (Roll)
1 X 1 0 Target Authorizing MAC required for DeriveKey command. (Roll)
0 X 1 1 Parent DeriveKey command can be run without authorizing MAC. (Create)
1 X 1 1 Parent Authorizing MAC required for DeriveKey command. (Create)
Slots with this value in the WriteConfig field may not be used as the
X X 0 X —
target of the DeriveKey command.
Note: 1. The source key for the computation performed by the DeriveKey command can either be the key directly
specified in Param2 (Target) or the key at slotConfig[Param2].WriteKey (Parent). See Section 3.2, Key Uses
and Restrictions.
The IsSecret bit controls internal circuitry necessary for proper security for slots in which reads and/or writes
must be encrypted or are prohibited altogether. It must also be set for all slots that are to be used as keys,
including those created or modified with the DeriveKey command. Specifically, to enable proper device
operation, this bit must be set unless WriteConfig is Always. Four byte accesses are generally prohibited to and
from slots in which this bit is set.
Slots used to store key values should always have IsSecret set to one and EncryptRead set to zero (reads
prohibited) for maximum security. For fixed key values, WriteConfig should be set to Never. When configured in
this way, after the Data zone is locked, there is no way to read or write the key. It may only be used for crypto
operations.
Some security policies require that secrets be updated from time to time. The ATECC108A supports this
capability in the following way: WriteConfig for the particular slot should be set to Encrypt and
SlotConfig.WriteKey should point back to the same slot by setting WriteKey to the slot ID. A standard Write
command can then be used to write a new value to this slot, provided that the authentication MAC is computed
using the old (i.e. current) key value.
X X 0 X GenKey may not be used to write random keys into this slot.
If the slot contains an ECC public or private key, then the key type field below must be set
to indicate a curve type supported by the device. If the slot contains any other kind of data,
key, or secret, then this field must be set to seven for proper operation.
0 = B283 NIST ECC key
1 = K283 NIST ECC key
24 KeyType 2 = RFU (reserved for future use)
3 = RFU (reserved for future use)
4 = P256 NIST ECC key
5 = RFU (reserved for future use)
6 = RFU (reserved for future use)
7 = Not an ECC key
1 = Then this slot can be individually locked using the Lock command. See the SlotLocked
field in the Configuration zone to determine whether a slot is currently locked or not.
5 Lockable 0 = Then the remaining keyConfig and slotConfig bits control modification permission.
Applies to all slots, regardless of whether or not they contain keys. See Section 2.4,
EEPROM Locking.
This field controls the requirements for random nonces used by the following commands:
GenKey, MAC, HMAC, CheckMac, Verify, DeriveKey, and GenDig.
6 ReqRandom
1 = A random nonce is required.
0 = A random nonce is not required.
Private
This bit indicates that the slot contains an ECC private key and it is used by the device to limit uses of this
slot to the appropriate ECC commands.
If this bit is set, then SlotConfig.ReadKey is used to enable or disable the use of the private key for various
operations. ReadKey:0 enables the use of the key for signatures of externally supplied data, while
ReadKey:1 enables the use of the key to sign only messages that are stored in TempKey by the GenKey
or GenDig commands. This mechanism permits a remote entity to have the knowledge that a particular
key value or slot contents are stored within an ATECC108A device, and it prevents an attacker from
creating an external message that would model an internal state that does not exist and create a signature
of that state.
PubInfo
For public keys, this field can be used to walk a certificate chain to validate the key. This feature is
implemented using the Verify command and the validation is stored in nonvolatile memory alongside the
key so that subsequent uses of the public key do not require additional validation. These keys are always
invalidated when any part of the slot containing the key is written.
For private keys, this field can be used to increase security or privacy in some situations by preventing the
generation of the public key corresponding to a private key. The presumption is that the public key has
been stored elsewhere at the time the private key was generated or written into the device. This field is
ignored when a random key is generated. The ATECC108A includes a method of walking either an X.509
certificate chain or a simplified internal format chain. See the SHA and Verify(ValidateExternal)
commands for more details.
There is neither read nor write access to the OTP and Data zones prior to locking of the
Configuration zone.
0 0 or 1 No No Not writeable.
Individually lockable slots can contain either secret information or readable data and may be used in one of two
ways:
The Configuration zone and non-lockable data slots should be initialized and locked in the usual manner by
the OEM. After the Data zone has been locked, those particular slots marked as lockable can then be
modified and individually locked in the field at some point in the future.
After the Configuration zone is locked, some slots can be personalized and locked by the OEM prior to
transfer of the device/component to a second party such as a subcontractor or distributor that personalizes
the remaining slots, and then locks the Data zone prior to shipment of the device into the field.
The Lock command does not provide a CRC validation mechanism when using the individual slot locking
mechanism. If slots are locked prior to locking of the entire Data zone, then the contents may be validated at the
time of data/OTP locking. After the Data/OTP zones are locked, either the Read, CheckMac, or MAC commands
can be used to validate the slot contents prior to individual slot locking.
Validation of a public key via the Verify command can occur regardless of the state of the
SlotLocked bit for that slot.
2.5.1 TempKey
TempKey is a storage register in the SRAM array that can be used to store an ephemeral result value from the
Nonce, GenDig, SHA, or GenKey commands. The contents of the 32 byte data value in this register can never
be read from the device (although the device itself can read and use the contents internally). The Info
command can be used to return the value of the nine status/flag bits within this register.
Execution of GenDig or GenKey replaces the old contents of TempKey with the new calculated output, which is
a combination of the old TempKey value and other information. Execution of the Nonce command or the copy
mode of the CheckMac command completely replaces any previous output of the GenDig or GenKey
commands. This register contains the elements shown in the table below:
TempKey 256 bit (32 byte) Nonce (from Nonce command) or digest (from GenDig command).
If TempKey was generated by GenDig or GenKey, these bits indicate which key
KeyID 4 bits was used in its computation. The four bits represent one of the slots of the Data
zone.
1 = The contents of TempKey were generated using the value in a slot for which
slotConfig.NoMac is one, and therefore cannot be used by the MAC and HMAC
NoMacFlag 1 bit
commands. If multiple slots were used in the calculation of TempKey, then this
bit will be set if slotConfig.NoMac was set for any of those slots.
In this specification, TempKey refers to the contents of the 256 bit data register. The remaining bit fields are
referred to as TempKey.SourceFlag, TempKey.GenDigData, and so forth.
3.1.1 SHA-256
The ATECC108A MAC command calculates the digest of a secret key concatenated with the challenge or nonce.
It optionally includes various other pieces of information stored on the device within the digested message. The
ATECC108A computes the SHA-256 digest based upon the algorithm documented in the following site:
http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
The complete SHA-256 message processed by the ATECC108A is listed in Section 9, Security Commands for
each of the particular commands that use the algorithm. Most standard software implementations of the
algorithm automatically add the appropriate number of pad and length bits to this message to match the
operation the device performs internally.
The SHA-256 algorithm is also used for encryption by taking the output digest of the hash algorithm and XORing
it with the plain text data to produce the ciphertext. Decryption is the reverse operation, in which the ciphertext is
XORed with the digest with the result being the plain text.
3.1.2 HMAC/SHA-256
The response to the challenge can also be computed using the HMAC algorithm based upon the SHA-256
documented at the following site:
http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf
Because of the increased computation complexity, the HMAC command is not as flexible as the MAC command,
and the computation time is extended for HMAC. While the HMAC sequence is not necessary to ensure the
security of the digest, it is included for compatibility with various software packages.
Any power interruption during the execution of the DeriveKey command in Roll mode may cause
either the key or the UpdateCount to have an unknown value. If writing to a slot is enabled using bit
14 of SlotConfig, such keys can be written in encrypted and authenticated form using the Write
command. Alternatively, multiple copies of the key can be stored in multiple slots so that failure of a
single slot does not incapacitate the system.
The lowest levels of the I/O protocols are described below. Above the I/O protocol level, exactly the same bytes
are transferred to and from the device to implement the security commands and error codes, which are
documented in Section 9, Security Commands.
The device implements a failsafe internal watchdog timer that forces it into a very low-power mode
after a certain time interval regardless of any current activity. System programming must take this into
consideration. See Section 9.1.6, Watchdog Failsafe.
The sleep current specification values are guaranteed only if SCL pin is held low or left unconnected.
Note Well: This may result in the loss of data stored in the command output buffer.
After this flag, the system starts sending a command group to the device. The first bit of the
0x77 Command
group can follow immediately after the last bit of the flag.
This command tells the device to wait for a bus turnaround time and then to start transmitting
0x88 Transmit
its response to the previously transmitted command group.
Upon receipt of an idle flag, the device goes into the idle mode and remains there until the
0xBB Idle
next Wake token is received.
Upon receipt of a sleep flag, the device enters the low-power sleep mode until the next Wake
0xCC Sleep
token is received.
Transmit Flag
The transmit flag is used to turn around the bus so that the ATECC108A can send data back to the system.
The bytes that the device returns to the system depend on the current state of the device and may include
status, error code, or command results.
When the device is busy executing a command, it ignores the SDA pin and any flags that are sent by the
system. See Table 9-4, Command Opcodes, Short Descriptions, and Execution Time for each command
type’s execution delays. The system must observe these delays after sending a command to the device.
Idle Flag
The idle flag is used to transition the ATECC108A to the idle mode, which causes the input/output buffer to
be flushed. It does not invalidate the contents of the TempKey and RNG Seed registers. This flag can be
sent to the device at any time that it will accept a flag. When the device is in the idle mode, the watchdog
timer is disabled.
Sleep Flag
The sleep flag transitions the ATECC108A to the low-power sleep mode, which causes a complete reset of
the device, including invalidation of the contents of the SRAM and all volatile registers. This flag can be
sent to the device at any time that it will accept a flag.
The Timeout Counter is reset after every legal token; therefore, the total time to transmit the
command may exceed the tTIMEOUT interval while the time between bits may not.
The I/O timeout circuitry is disabled when the device is busy executing a command.
Note Well: There are many differences between the two devices (for example, the ATECC108A and
2
AT24C16 have different default I C addresses); therefore, designers should read the respective
datasheets carefully.
The SDA pin is normally pulled high with an external pull-up resistor because the ATECC108A includes only an
open-drain driver on its output pin. The bus master may either be open-drain or totem pole. In the latter case, it
should be tri-stated when the ATECC108A is driving results on the bus. The SCL pin is an input and must be
driven both high and low at all times by an external device or resistor.
Acknowledge (ACK): On the ninth clock cycle after every address or data byte is transferred, the receiver
will pull the SDA pin low to acknowledge proper reception of the byte.
Not Acknowledge (NOT ACK): Alternatively, on the ninth clock cycle after every address or data byte is
transferred, the receiver can leave the SDA pin high to indicate that there was a problem with the reception
of the byte or that this byte completes the group transfer.
2
Figure 6-3. NOT ACK and ACK Conditions on I C Interface
2
Multiple ATECC108A devices can easily share the same I C interface signals if the I2C_Address byte in the
Configuration zone is programmed differently for each device on the bus. Because all seven of the bits of the
2 2
device address are programmable, ATECC108A can also share the I C interface with any I C device, including
any Serial EEPROM.
2
The tables below label the bytes of the I/O transaction. The column labeled “I C Name” provides the name of the
byte as described in the AT24C16 datasheet.
2
Table 6-1. I C Transmission to ATECC108A
2
Name I C Name Description
2
This byte selects a particular device on the I C interface. ATECC108A is selected if
bits 1 thru 7 of this byte match bits 1 thru 7 of the I2C_Address byte in the
2
Device Address Device Address Configuration zone. Bit 0 of this byte is the standard I C R/W bit, and should be
zero to indicate a write operation (the bytes following the device address travel from
the master to the slave).
This byte should have a value of 0x03 for normal operation. See Sections 6.2.1,
Word Address Word Address
Word Address Values and 6.6, Address Counter for more information.
The command group, consisting of the count, command packet, and the two byte
Command Data1,N CRC. The CRC is calculated over the size and packet bytes. See Section 9.1, I/O
Groups.
Because the device treats the command input buffer as a FIFO, the input group can be sent to the device in one
2
or many I C command groups. The first byte sent to the device is the count, so after the device receives that
number of bytes, it will ignore any subsequently received bytes until execution is finished.
The system must send a Stop condition after the last command byte to ensure that ATECC108A will start the
computation of the command. Failure to send a Stop condition may eventually result in a loss of synchronization;
2
see Section 6.8, I C Synchronization for recovery procedures.
Sleep The ATECC108A goes into the low power sleep mode and ignores all subsequent I/O
0x01
(Low-power) transitions until the next wake flag. The entire volatile state of the device is reset.
The ATECC108A goes into the idle mode and ignores all subsequent I/O transitions until
Idle 0x02
the next wake flag. The contents of TempKey and RNG Seed registers are retained.
Write subsequent bytes to sequential addresses in the input command buffer that follow
Command 0x03
previous writes. This is the normal operation.
Reserved 0x04 – 0xFF These addresses should not be sent to the device.
2
Name I C Name Direction Description
2
This byte selects a particular device on the I C interface and ATECC108A will be
selected if bits 1 thru 7 of this byte match bits 1 thru 7 of the I2C_Address byte in
Device Device 2
To slave the Configuration zone. Bit 0 of this byte is the standard I C R/W pin, and should
Address Address
be one to indicate that the bytes following the device address travel from the
slave to the master (Read).
The output group, consisting of the count, status/error byte or the output packet
Data Data1,N To master
followed by the two byte CRC per Section 9.1, I/O Groups.
The status, error, or command outputs can be read repeatedly by the master. Each time a Read command is
2
sent to the ATECC108A along the I C interface, the device transmits the next sequential byte in the output buffer.
See the following section for details on how the device handles the address counter.
If the ATECC108A is busy, idle, or asleep, it will not ACK the device address on a read sequence. If a partial
command has been sent to the device and a read sequence [Start + DeviceAddress(R/W == R)] is sent to the
device, then the ATECC108A will not ACK the device address to indicate that no data is available to be read.
tTIMEOUT (MIN)
SCL
Power-Up
Bit 3 Bit 2 Bit 1 Bit 0 Name State Meaning
The SCL pin is unused and should be tied to GND. Any attempt to
execute the GPIO mode of the Info command will result in an
x x 0 0 Disable Input error code being returned to the system firmware. The GPIO
mode of the Info command will also return an error code if the
2
part is configured for I C operation.
The SCL pin will be permanently configured as an output and will
be driven to a zero (default) state when the first wake operation
after power-up occurs. The pin can then be driven to the opposite
( '1') state by the Info command if a prior authorization has been
0 0 0 1 Auth0 Low
performed using the SignalKey slot. The GPIO output mode of the
Info command can be used to reset the pin back to the default
value without authorization. The GPIO retains its state so long as
VCC remains above 2V.
0 1 0 1 Auth1 High As Auth0; however, the default state after power-up is one.
The SCL pin will be permanently configured as an input. On
power-up, an internal intrusion latch is set to zero. The intrusion
latch is set via authorization and is cleared if SCL falls. The state
of latch can be determined via the Info command. It will remain
in that state so long as a voltage greater than 1.8V is applied to
the SCL pin and VCC remains above 2.0V regardless of the
1 x 0 1 Intrusion Input
internal state (asleep, idle, or wake) of the ATECC108A. Any
falling edge on the SCL pin resets the intrusion latch to zero
regardless of whether or not the ATECC108A is in wake or sleep
mode. Reading the state of the GPIO pin via the Info command
returns the value of the intrusion latch; not the current state of the
pin.
The SCL pin will remain permanently configured as an input.
x x 1 0 Input Input Execution of the Info command will permit the current state on
the pin to be returned to the system firmware.
The SCL pin will be configured as an output and will be driven to a
zero state when the first wake operation occurs. Subsequent
x 0 1 1 Output0 Low Info commands can be executed to drive the pin high or low.
Alternatively, the Info command can be used to change the
GPIO pin to an input.
x 1 1 1 Output1 High As Output0; however, the default state after power-up is one.
The GPIO pin has active drivers for both the high and low output states to enable connection to two different
LEDs, which may be connected to VCC and GND respectively. If an LED is connected to a supply voltage higher
than VCC, it may not turn off completely when the GPIO pin is high. In this case, the GPIO pin should be
transitioned to an input to completely turn off the LED.
Operating Temperature .......................... -40°C to 85°C *Notice: Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent damage to
Storage Temperature ........................... -65°C to 150°C the device. This is a stress rating only and functional
operation of the device at these or any other
Maximum Operating Voltage ................................ 6.0V
conditions beyond those indicated in the operational
DC Output Current ............................................... 5mA sections of this specification are not implied.
Exposure to absolute maximum rating conditions for
Voltage on any pin ...................... -0.5V to (VCC + 0.5V) extended periods may affect device reliability.
8.2 Reliability
The ATECC108A is fabricated with the Atmel high reliability of the CMOS EEPROM manufacturing technology.
(1)
Parameter Symbol Direction Min Typ Max Unit Notes
Wake High
To Crypto SDA should be stable high for this entire
Delay to Data tWHI 500 µs
Authentication duration.
Comm.
Applicable from TA = -40°C to +85°C, VCC = +2.0V to +5.5V, CL =100pF (unless otherwise noted).
To Crypto
Zero Authentication 4.10 4.34 4.56 µs
Transmission tZHI
From Crypto
High Pulse 4.60 6 8.60 µs
Authentication
To Crypto
Zero Authentication 4.10 4.34 4.56 µs
Transmission tZLO
From Crypto
Low Pulse 4.60 6 8.60 µs
Authentication
Note: 1. START, ZLO, ZHI, and BIT are designed to be compatible with a standard UART running at 230.4Kbaud for
both transmit and receive. The UART should be set to seven data bits, no parity and one Stop bit.
tLOW tLOW
SCL
SDA IN
SDA OUT
2
Table 8-3. AC Characteristics of I C Interface
Applicable over recommended operating range from TA = -40°C to + 85°C, VCC = +2.0V to +5.5V,
CL = 1 TTL Gate and 100pF (unless otherwise noted).
Figure 8-5. VIH and VIL When TTLenable = 1 on All I/O Interfaces
If the voltage supplied to the VCC pin of the ATECC108A is different than the system voltage to which the input
pull-up resistor is connected, then the system designer may choose to set TTLenable to zero, which enables a
fixed input threshold according to the following table. The following applies only when the device is active:
Number of bytes to be transferred to (or from) the device in the group, including count byte,
packet bytes, and checksum bytes. The count byte should therefore always have a value of
(N+1), where N is equal to the number of bytes in the packet plus the two checksum bytes.
0 Count For a group with one count byte, 50 packet bytes, and two checksum bytes, the count byte
should be set to 53. The maximum size group (and value of count) is 155 bytes, and the
minimum size group is four bytes. Values outside this range will cause the device to return
an I/O Error.
1 to (N-2) Packet Command, parameters and data, or response. See below for more details.
CRC-16 verification of the count and packet bytes. The CRC polynomial is
0x8005. The initial register value should be zero and after the last bit of the count and
N-1, N Checksum packet have been transmitted; the internal CRC register should have a value that matches
the checksum bytes in the block. The first CRC byte transmitted (N-1) is the least-significant
byte of the CRC value, so the last byte of the group is the most-significant byte of the CRC.
The ATECC108A is designed in such a way that the count value in the input group should be consistent with the
size requirements that are specified in the command parameters. If the count value is inconsistent with the
command opcode and/or parameters within the packet, then the ATECC108A will respond in different ways
depending upon the specific command. The response may either include an error indication or some input bytes
may be silently ignored.
The command code. See Section 9.1.3, Command Opcodes, Short Descriptions, and
0 Opcode
Execution Times.
After the ATECC108A receives all the bytes in a group, the device transitions to the busy state and attempts to
execute the command. Neither status nor results can be read from the device when it is busy. During this time,
the I/O interface of the device ignores all SDA transitions regardless of the I/O interface selected. The command
execution delays are listed in Section 9.1.3.
Successful Command
0x00 Command executed successfully.
Execution
Checkmac or Verify The CheckMac or Verify command was properly sent to the device,
0x01
Miscompare but the input client response did not match the expected value.
Command was properly received but could not be executed by the device
Execution Error 0x0F in its current state. Changes in the device state or the value of the
command bits must be made before it is re-attempted.
After Wake,
0x11 Indication that ATECC108A has received a proper Wake token.
Prior to First Command
DeriveKey 0x1C Derive a target key value from the target or parent key. 3 50 ms
Selectively put just one device on a shared bus into the idle
Pause 0x01 0.1 3 ms
mode.
PrivWrite 0x46 Write an ECC private key into a slot in the Data zone. 0.8 47 ms
Notes: 1. Typical execution times are representative of the duration to execute the command assuming no error
conditions, fastest mode setting, and favorable environmental conditions. For best performance, delay for this
interval and then start polling to determine actual command completion.
2. Maximum execution times are representative of the longest duration of a successful command execution under
the worst case statistical and environmental conditions. Some internal modes such as limited use and others
will cause the delays to be as much as 50ms longer.
In most but not all cases, failing commands will return relatively quickly, often well before the typical execution
time.
Table 9-5. Address Encoding for Config and OTP Zones (Param2)
Byte 1 Byte 0
Byte 1 Byte 0
When OTP mode is read-only, all offsets in both blocks are available to
use with 4 or 32 byte reads. If OTP mode is consumption, then writes are
OTP 0–1 —
also permitted to all offsets. See Table 2-7, Write Configuration Bits:
Write Command if OTP mode is legacy.
0–1 0–7
All offsets in all slots available for both Read and Write. A 4-byte access
Data 0 – 12 8
is permitted on a particular slot only if SlotConfig.IsSecret is zero.
0–2 9 – 15
In the following table, address is the value to be passed to the Read and/or Write commands as the address
parameter to access data in the specific blocks using a 32 byte Read or Write. Size is the number of implemented
EPROM bytes within that particular block.
Slot 8 contains an additional nine blocks, each containing 32 bytes that are not included in Table 9-8.
To use a four byte Read or Write command to access the first word in a block, use the addresses shown in
Table 9-8; otherwise, the least significant three bits of the address field should include the word address to be
accessed. The 32 byte access is permitted in blocks that contain less than 32 implemented memory bytes. The
extra bytes will be returned as zero on a read and ignored on a Write.
0 0x0000 32 0x0100 4
1 0x0008 32 0x0108 4
2 0x0010 32 0x0110 4
3 0x0018 32 0x0118 4
4 0x0020 32 0x0120 4
5 0x0028 32 0x0128 4
6 0x0030 32 0x0130 4
7 0x0038 32 0x0138 4
Example: To complete a four byte read of the 53rd through 56th byte of Slot 9, the word address would be:
The 53rd byte is the 21st byte in Block 1 (53 divided by 32 is 1, 53 minus 32 is 21).
The 21st byte is located at byte offset 0x14, which is at word offset 0x05 (0x14 divided by 4 is 0x05).
Per Table 9-6, the address parameter to the Read command is 000000 01 0 1001 101 or 0x014.
0 1 4 D
Param1
Zone Value Size Read Write
9664 bits Never when unlocked; otherwise, All writeable when unlocked.
Data 2 1208 bytes controlled by IsSecret and When locked, writes controlled by
16 Slots EncryptRead. WriteConfig.
Bit 0: 0 = The second 32 bytes of the SHA message are taken from the input
ClientChal parameter.
1 = The second 32 bytes of the message are taken from TempKey.
Bit 1: 0 = Use key[KeyID] in first SHA block.
1 = Use TempKey.
Param1 Mode 1
Bit 2: If Mode:0 or Mode:1 are set, then the value of this bit must match the value
in TempKey.sourceFlag or the command will return an error.
Bits 3 – 4: Must be zero.
Bit 5: = Use 64 bits of OTP zone in calculation.0 = Use 64 zeros.
Bits 6 – 7: Must be zero.
The internal key is to be used to generate the response. All except bits 0:3 of KeyID
Param2 KeyID 2
are ignored.
Challenge sent to client. If Mode:0 is one, then the value of this parameter will be
Data1 ClientChal 32
ignored. (These 32 bytes must still appear in the input stream).
Returns a single byte with a value of zero if ClientResp matches the internally computed
Result 1
digest; value of one if there is a mismatch.
Parent Target
Key Key
Mode
SHA Source
(AUTH) Key Nonce
SHA
(Dervice)
If 0x00 (Config), then use KeyID to specify any of the four 256-bit blocks of the
Configuration zone. If KeyID has a value greater than three, the command will
return an error.
If 0x01 (OTP), use KeyID to specify either the first or second 256-bit block of the
OTP zone.
If 0x02 (Data), then KeyID specifies a slot in the Data zone or a transport key in the
Param1 Zone 1 hardware array.
If 0x03 (Shared Nonce), then KeyID specifies the location of the input value in the
message generation.
If 0x04 (Counter), is not supported by ATECC108A.
If 0x05 (Key Config), then KeyID specifies the slot for which the configuration
information is to be included in the message generation.
All other values are reserved and must not be used.
32 or Four bytes of data for SHA calculation when using a NoMac key, 32 bytes for
Data1 OtherData
4 or 0 “Shared Nonce” mode, otherwise ignored
If zone is “Shared Nonce” and KeyID:15 is zero then the SHA-256 message body used to create the resulting
new TempKey consists of the following bytes:
32 bytes Input OtherData Parameter
1 byte Opcode (always 0x15)
1 byte Mode
1 byte LSB of KeyID
1 byte Zero
1 byte SN[8]
2 bytes SN[0:1]
25 bytes Zeros
32 bytes TempKey.value
If zone is Data and SlotConfig[KeyID].NoMac is one, then the SHA-256 message body used to create the
resulting new TempKey consists of the following bytes:
32 bytes Data.slot[KeyID]
4 bytes OtherData
1 byte SN[8]
2 bytes SN[0:1]
25 bytes Zeros
32 bytes TempKey.value
If zone is “Key Config” (0x05), then the SHA-256 message body used to create the resulting new TempKey
consists of the following bytes:
32 bytes TempKey
1 byte Opcode
1 byte Mode
2 bytes Param2
1 byte SN[8]
2 bytes SN[0:1]
1 byte Zero
2 bytes SlotConfig[KeyId]
2 bytes KeyConfig[KeyId]
1 byte SlotLocked:KeyId
19 bytes Zeros
1 byte 0x00
Bits Meaning
0–1 Must be zero.
1: A random private key is generated and stored in the Slot specified by KeyID. KeyType must indicate an
2 ECC key in the KeyConfig area for this KeyID or an error will be returned.
0: A the private key currently stored in the slot is used to generate the public key.
1: The device creates a PubKey digest based on the private key in KeyID and places it in TempKey.
3
0: No PubKey digest is created.
1: KeyID must point to a public key, and GenKey only creates the digest in TempKey without any public
4 key generation operation. Bit 2 and bit 3 of the mode byte are ignored if this bit is set.
0: KeyID points to a private key, and mode:2 and mode:3 control device operation.
5–7 Must be zero.
When a PubKey digest of a 566 bit public key (i.e. the public part of a 283 bit private key) is to be calculated by
the GenKey command, the following message is used as the input to the SHA-256 algorithm:
32 bytes TempKey
1 byte Opcode
1 byte Param1
2 bytes Param2
1 byte SN[8]
2 bytes SN[0:1]
17 bytes Zeros
72 bytes X and Y coordinates of the public key. Upper five bits of both are masked to zeros.
When the public key length is 512 bits, the message is as follows:
32 bytes TempKey
1 byte Opcode
1 byte Param1
2 bytes Param2
1 byte SN[8]
2 bytes SN[0:1]
25 bytes Zeros
64 bytes X and Y coordinates of the public key
Param1 Mode 1 Controls which fields within the device are used in the message.
The internal key is to be used to generate the response. Bits 0:3 only are used to
Param2 KeyID 2
select a slot; however, all 16 bits are used in the HMAC message.
Data — 0 —
The HMAC digest is computed using the key at KeyID as the HMAC key over a message consisting of the
following information:
32 bytes Zeros
32 bytes TempKey
1 byte Opcode (always 0x11)
1 byte Mode
2 bytes KeyID
8 bytes OTP[0:7] (or zeros.)
3 bytes OTP[8:10] (or zeros.)
1 byte SN[8] bits (never zeroed out)
4 bytes SN[4:7] bits (or zeros, see Table 9-21)
2 bytes SN[0:1] (never zeroed out)
2 bytes SN[2:3] (or zeros, see Table 9-21)
Bits Meaning
2 The value of this bit must match the value in TempKey.SourceFlag or the command will return an error.
3 Must be zero.
1 = Include the first 88 OTP bits (OTP[0] through OTP[10]) in the message; otherwise, the corresponding
4
message bits are set to zero.
1 = Include the first 64 OTP bits (OTP[0] through OTP[7]) in the message; otherwise, the corresponding
5
message bits are set to zero. If Mode[4] is set, the value of this mode bit is ignored.
1 = Include the 48 bits SN[2:3] and SN[4:7] in the message; otherwise, the corresponding message bits are
6
set to zero.
7 Must be zero.
A single 4-byte word representing the revision number of the device is returned. Software
0 Revision
should not depend on this value as it may change from time to time.
Returns a value of one if an ECC private or public key stored in the key slot specified by param
is valid and zero if the key is not valid. For public keys in slots where PubInfo is zero, the
1 KeyValid
information returned by this command is not useful. This information is not meaningful for slots
in which KeyType does not indicate a supported ECC curve.
Accesses the GPIO pin when the device is in either of the Single-Wire Interface modes. The
specific operation is controlled by Param2 as follows:
Bit 0 State to which output is to be driven.
3 GPIO Ignored if bit 1 is zero.
Bit 1 Driver state; Input (0) or Output (1).
Bits 2-15 Must be zero.
Always return the current state in the first byte followed by three bytes of 0x00.
Data — 0 Ignored.
Bits Meaning
0: The Configuration zone is to be locked.
1: The Data and OTP zones are to be locked.
0–1
2: A single slot in the Data zone is to be locked.
3: Illegal value, the device will return an error.
2–5 The slot number to be locked if bits0:1 have a value of two; otherwise, these bits must be zero.
6 Unused, must be zero.
Summary check bit. This bit is ignored when locking individual data slots.
0: The summary value is verified before the zone is locked.
7
1: Check of the zone summary is ignored and the zone is locked regardless of the contents of the zone.
Atmel does not recommend using this mode.
Param1 Mode 1 Controls which fields within the device are used in the message.
The internal key is to be used to generate the response. Bits 0:3 only are used to
Param2 KeyID 2
select a slot; however, all 16 bits are used in the SHA-256 message.
The message that will be hashed with the SHA-256 algorithm consists of the following information:
32 bytes key[KeyID] or TempKey (see Table 9-30, Mode Encoding)
32 bytes Challenge or TempKey (see Mode Encoding)
1 byte Opcode (always 0x08)
1 byte Mode
2 bytes Param2
8 bytes OTP[0:7] (or zeros)
3 bytes OTP[8:10] (or zeros)
1 byte SN[8] bits (never zeroed out)
4 bytes SN[4:7] bits (or zeros, see Mode Encoding)
2 bytes SN[0:1] (never zeroed out)
2 bytes SN[2:3] (or zeros, see Mode Encoding)
Bits Meaning
0: The second 32 bytes of the SHA message are taken from the input challenge parameter.
0
1: The second 32 bytes are filled with the value in TempKey. This mode is recommended for all use.
0: The first 32 bytes of the SHA message are loaded from one of the data slots.
1
1: The first 32 bytes are filled with TempKey
If either Mode:0 or Mode:1 are set, Mode:2 must match the value in TempKey.SourceFlag or the command
2
will return an error.
3 Must be zero.
1: Include the first 88 OTP bits (OTP[0] through OTP[10]) in the message; otherwise, the corresponding
4
message bits are set to zero.
1: Include the first 64 OTP bits (OTP[0] through OTP[7]) in the message; otherwise, the corresponding
5
message bits are set to zero. If Mode[4] is set, the value of this mode bit is ignored.
1: Include the 48 bits SN[2:3] and SN[4:7] in the message; otherwise, the corresponding message bits are
6
set to zero.
7 Must be zero.
Param1 Mode 1 Controls the mechanism of the internal RNG and seed update.
The output of the RNG, calculated nonce or a single byte with a value of zero if Mode[0:1] is
OutData 1 or 32
three.
If Mode[0:1] is zero or one and Param2:15 is one, then the input NumIn parameter must be 20 bytes long and the
SHA-256 message body used to create the nonce stored internally in TempKey consists of the following.
TempKey must be valid prior to execution of this command and the values of the remaining TempKey flags
remain unchanged.
32 bytes TempKey
20 bytes NumIn from input stream
1 byte Opcode (always 0x16)
1 byte Mode
1 byte LSB of Param2 (should always be 0x00)
If Mode[0:1] is three, then this command operates in pass-through mode, the input parameter (NumIn) must be
32 bytes long and TempKey is loaded with NumIn. No SHA-256 calculation is performed, no data is returned to
the system, and TempKey.SourceFlag is set to Input.
Bits Meaning
0: Combine new random number with NumIn, store in TempKey. Automatically update EEPROM seed
only if necessary prior to random number generation. Recommended for highest security.
1: Combine new random number with NumIn, store in TempKey. Generate random number using existing
0–1
EEPROM seed, do not update EEPROM seed. Not recommended for general use.
2: Invalid.
3: Operate in pass-through mode and Write TempKey with NumIn.
Param1 Selector 1 All devices that do not match this value go to idle mode.
Data Ignored 0
If the command indicates that some other device should idle, ATECC108A returns a
Success 1
value of 0x00. If this device goes to idle, no value is returned.
For best security, Atmel recommends that the PrivWrite command not be used, and that private
keys be internally generated from the RNG using the GenKey(Create) command.
The slot indicated by this command must be configured via KeyConfig.Private to contain an ECC private key, and
SlotConfig.IsSecret must be set to one, or else this command will return an error. If the slot is individually locked
using SlotLocked, then this command will also return an error.
The private key data is always sent to the device as a 36 byte integer. It is passed to the device MSB first. For
B283 keys, the first six bits on the bus should have a plain text value of zero, for K283 keys the first seven bits
should be zero, and for P256 keys the first four bytes (32 bits) should be zero.
Prior to the Data zone being locked, this command can be used to write the slot contents without regards to the
slotConfig value and/or the method by which TempKey was generated. The input data may or may not be
encrypted based on the zone byte; if the input data is plain text then the MAC is ignored, but if it is encrypted then
the MAC must be present and be properly computed. Prior to the Configuration zone being locked, this
command will always return an error.
Once the Data zone is locked, the following is necessary for the write to complete:
SlotConfig.IsSecret must be one.
SlotConfig.WriteConfig must be set to Encrypt to indicate that writes require encryption. It is not possible to
write to a slot for which WriteConfig is set to any other value.
TempKey must be valid, its contents must have been generated using the GenDig command, and the
KeyId used during the GenDig execution must match SlotConfig.WriteKey.
Zone:6 must be set to indicate that the input data has been encrypted as follows:
– The first 32 input bytes should be externally encrypted by XORing their value with the current value
in TempKey. The next four bytes should be externally encrypted by XORing their value with the first
four bytes of SHA-256(TempKey).
An input authenticating MAC must be computed as follows:
– SHA-256(TempKey, Opcode, Param1, Param2, SN[8], SN[0:1], <21 bytes of zeros>, 36 bytes of
PlainTextData)
KeyConfig.ReqRandom, KeyConfig.ReqAuth and KeyConfig.AuthKey are ignored by this command
because they will have been checked by the GenDig command for the parent encrypting key.
The same internal stored seeds are used for both the Nonce and Random commands.
Param1 Mode 1 Controls the mechanism of the internal RNG and seed update.
Data Ignored 0 —
Bits Meaning
0 = Automatically update EEPROM seed only if necessary prior to random number generation.
0 Recommended for highest security.
1 = Generate random number using existing EEPROM seed, do not update EEPROM seed.
The byte addresses to be read should be divided by four (drop the least-significant two bits) before being passed
to the device. If 32 bytes are being read, then the least-significant three bits of the input address are ignored.
Addresses beyond the end of the specified zone result in an error.
The following restrictions apply to the three zones:
Configuration Zone:
The words within this zone are always readable using this command, regardless of the value of
LockConfig.
OTP Zone:
If the OTP zone is unlocked this command returns an error. Once locked, if OTPmode is set to a non-zero
value and the address points to either word zero or one, then the command also returns an error;
otherwise, the corresponding word within the OTP zone is returned in the clear. If OTPmode is Legacy,
then only four byte reads are permitted.
Data Zone:
If the Data zone is unlocked, this command returns an error; otherwise, the values within the corresponding
SlotConfig word control access to the data slot. If SlotConfig.IsSecret is set and a four byte read is
attempted, the device returns an error. If EncryptRead is set, this command encrypts the data as specified
above. If IsSecret is set and EncryptRead is clear, this command returns an error. If IsSecret is clear and
EncryptRead is clear, this command returns the desired slot in the clear.
Partial data blocks are always zero extended to 32 bytes before being encrypted.
Bits 0 and 1: Select among Configuration, OTP, or Data. See Section 9.1.4.
Bits 2-6: Must be zero.
Param1 Zone 1
Bit 7: 1 = 32 bytes are read; otherwise four bytes are read. Must be zero if
reading from OTP zone.
Param2 Address 2 Address of first word to be read within the zone. See Section 9.1.4.
Data — 0 —
Bits 0-2 = 000 (Start): Load TempKey with the initialization value for SHA2-56. No
message bytes are accepted (Length must be zero).
Bits 0-2 = 001 (Update): Add 64 bytes in the message parameter to the SHA context.
Bits 0-2 = 010 (End): Complete the SHA-256 computation and load the digest into
TempKey and the output buffer. Up to 63 message bytes are accepted (Length
must be 0 through 63 inclusive.)
Bits 0-2 = 011 (Public): Add 64 bytes of a public key stored in one of the Data zone slots
to the SHA context. Param2 should contain the slot ID of the public key, and
the command will return an error if the slot contains anything other than a
Param1 Mode 1
public key. No further bytes should appear in the input stream (Message size
is zero).
Bits 0-2 = 100 (HMACstart): Load TempKey with the initialization value for SHA2-56.
Length field specifies the key to be used for the HMAC calculation. No
message bytes are accepted.
Bits 0-2 = 101 (HMACend): Complete the HMAC/SHA-256 computation and load the
digest into TempKey and the output buffer. Up to 63 message bytes are
accepted (Length must be 0 through 63 inclusive.)
Bits 3-7: Must be zero.
Response 1 or 32 The SHA256 digest if Mode is 10, otherwise zero for success or an error code.
The internally-stored private key to be used to generate the signature. The curve
Param2 KeyID 2
specified in KeyConfig[KeyID].KeyType will be used.
Bits Meaning
1–5 Must be 0.
1: Include the 48 bits SN[2:3] and SN[4:7] in the message for internal signatures
6 0: The corresponding message bits are set to 0.
This bit is ignored if mode:7 is 1.
Internal signatures are always generated over digest information placed in TempKey by GenKey or GenDig,
and include further configuration information regarding the key used for the TempKey calculation.
If multiple GenKey or GenDig commands have been run between the Nonce and Sign commands,
only the configuration for the last key used will be signed.
The bit within the SlotLocked field corresponding to the last key used in the TempKey computation is in the LSB
of the byte listed below, regardless of whether or not the slot is individually lockable or not. This 55 byte message
is created as follows:
If the slot contains a public key corresponding to a supported curve, and if PubInfo indicates this key must be
validated before being used by Verify, and if the validity bits have a value of 0x05, then the PubKey Valid byte
will be 0x01. In all other cases, it will be zero.
32 bytes TempKey (must have been generated by GenKey or GenDig)
1 byte Opcode
1 byte Mode
2 bytes Param2
2 bytes SlotConfig[TempKeyFlags.keyId]
2 bytes KeyConfig[TempKeyFlags.keyId]
1 byte TempKeyFlags (b0-3: keyId, b4: sourceFlag, b5: GenDigData,b6: GenKeyData,
b7: NoMacFlag)
2 byte UseFlag[TempKeyFlags.keyId] (*see note below)
1 byte UpdateCount[TempKeyFlags.keyId] (*see note below)
1 byte SN[8] (never zeroed out)
4 bytes SN[4:7] (or zeros, see Mode)
2 bytes SN[0:1] (never zeroed out)
2 bytes SN[2:3] (or zeros, see Mode)
1 byte SlotLocked:TempKeyFlags.keyId
1 byte PubKey Valid (or zero, see above)
1 byte 0x00
This message is then hashed using the SHA-256 algorithm and passed to the ECDSA signature computation
engine. This secondary digest is always zero extended prior to being signed.
Note: * On the ATECC108A, the UseFlag and UpdateCount bytes in this message are always set to 0x00.
Regardless, these bytes are set to zero if TempKeyFlags.keyId is eight or higher.
Data — 0
If the memory byte was updated, this command returns a value of 0x00;
Success 1
otherwise, it returns an execution error.
Returns a value of zero if the signature of the message can be verified using the public key.
Response 1 Returns a value of one if the signature does not match, or another error code if there is some form
of parsing or execution error.
The message to be used for the ECDSA Verify operation depends on the mode as follows:
Stored, External, and ValidateExternal Modes
The contents of TempKey should contain the SHA-256 digest of the message.
– 283 bit private (566 bit public) Keys (ECC108A only)
TempKey is extended as follows:
If SN[8] has a value of 0xEE, then the contents of the TempKey register are zero extended to form
the message, which is input to the ECDSA Verify algorithm in addition to the signature and public
key; otherwise, TempKey is extended with SN[0], SN[1], SN[8] and a fourth byte of zero.
– 256 bit private (512 bit public) Keys
TempKey does not need to be extended with any pad bits prior to execution of the ECDSA Verify
algorithm.
Validate or Invalidate Mode
The contents of TempKey should contain a digest of the PublicKey at KeyID. It must have been generated
using the GenKey command over the KeyID slot. The device then generates a message based on the
same format as the Sign(Internal) command, except that the parameter and state bytes are copied
from the input parameter OtherData. The message is formatted as follows:
32 bytes TempKey (must have been generated by GenKey)
1 byte Sign Opcode
10 bytes OtherData[0:9]
1 byte SN[8]
4 bytes OtherData[10:13]
2 bytes SN[0:1]
5 bytes OtherData[14:18]
This message is hashed using SHA-256 and used as the message input to the ECC Verify operation.
Bits 0 – 1: Select among Config, OTP or Data. See Section 9.1.5, Zone Encoding.
Bits 2 – 5: Must be zero.
Param1 Zone 1 Bit 6: 1 = The input data has been encrypted; otherwise the input data is in the
clear. Ignored after the Data zone is locked.
Bit 7: 1 = 32 bytes will be written; otherwise four bytes are written.
11.1 Pinouts
The device is offered in multiple packages: 8-lead SOIC, 8-pad UDFN, and 3-lead CONTACT (i.e. non-solder)
package. The pinout is as follows:
Name Pin
SDA 5
SCL 6
VCC 8
GND 4
NC 1, 2, 3, 7
Notes: 1. B = Bulk
2. T = Tape and Reel
SOIC = 4,000 units per reel.
UDFN = 15,000 units per reel.
RBH = 5,000 units per reel.
3. Please contact Atmel for availability.
4. Please contact Atmel for thinner packages.
13.1 ATECC108A
Issue: For device revisions 0x1005 and lower (use the Info command to get device revision).
Slot 8 is limited to 224 bytes. Attempts to write data beyond this limit will result in errors.
GenDig modes of SharedRandomNonce and KeyConfig not supported.
E E1
N L
Ø
TOP VIEW
END VIEW
e b
A COMMON DIMENSIONS
(Unit of Measure = mm)
3/6/2015
TITLE GPC DRAWING NO. REV.
8S1, 8-lead (0.150” Wide Body), Plastic Gull Wing
Package Drawing Contact: SWB 8S1 H
Small Outline (JEDEC SOIC)
packagedrawings@atmel.com
1 8
Pin 1 ID
2 7
D
3 6
4 5
TOP VIEW C
SIDE VIEW
A2 A
C
A1 E2
b (8x)
8 1
7 2 COMMON DIMENSIONS
Pin#1 ID (Unit of Measure = mm)
D2
6 3 SYMBOL MIN NOM MAX NOTE
A 0.50 0.55 0.60
5 4 A1 0.0 0.02 0.05
e (6x) A2 - - 0.55
L (8x) K D 1.90 2.00 2.10
11/2/15
TITLE GPC DRAWING NO. REV.
8MA2, 8-pad 2 x 3 x 0.6mm Body, Thermally
Package Drawing Contact: Enhanced Plastic Ultra Thin Dual Flat No-Lead YNZ 8MA2 H
packagedrawings@atmel.com Package (UDFN)
COMMON DIMENSIONS
(Unit of Measure = mm)
1/31/11
TITLE GPC DRAWING NO. REV.
Package Drawing Contact: 3RB, 3-lead 2.5x6.5mm Body, 2.0 mm pitch,
packagedrawings@atmel.com CONTACT PACKAGE. (Sawn) RHB 3RB 01
Updated write endurance from write cycles of 100,000 to 400,000 minimum and the 8S1
8895CX 01/13/2016
and 8MA2 package drawings.
DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellect ual property right
is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL T ERMS 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 warra nted 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 Atmel
of such products would reasonably
Confidential: For Release be expected
Only Underto resultNon-Disclosure
in significant personal injury or death
Agreement (“Safety -Critical Applications”) without an Atmel officer's specific written consent.
(NDA)
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
100 ATECC108A [Datasheet]
are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atme l as military-grade. Atmel products are not designed nor
1
intended for use in automotive applications unless specifically designated by Atmel as automotive-grade.
Atmel-8895CX-CryptoAuth-ATECC108A-Datasheet_01/13/2016
0
0