Cryptoauthentication™ Faqs: © 2014 Atmel Corporation 1
Cryptoauthentication™ Faqs: © 2014 Atmel Corporation 1
Cryptoauthentication™ Faqs: © 2014 Atmel Corporation 1
AES requires a key to encrypt and the same key to decrypt. Both the
transmitter of the encrypted information and the receiver of it must store
that key and keep that key secret on both sides. If the key is not kept
secret on either side then the information can be obtained by unintended
outside parties, which defeats the whole purpose. So, securely storing the
key is one of the most critical parts of security. The memory where the key
is stored must be able to withstand attacks that try to read the key(s).
The strength of security, therefore, depends on both the key size and the
specific algorithms employed. So, any of these algorithms might be stronger
or weaker than any other. Among most cryptographic experts, the following
key sizes are considered to be approximately similar in strength: SHA-256,
AES-128, RSA-3072 and ECC-256. The letters depict the algorithm (e.g.
SHA) and the numbers after the dash represent the length of the key (e.g. -
256).
These important industry standard algorithms are all used in different ways
depending on the application, and many cryptographic systems even use
several types of algorithms together to optimize the benefits of each for
higher security and operational efficiencies (such as speed).
Regardless of the algorithm type, crypto protocol, or system architecture, the best
solution is to prevent the break in the first place by using high security hardware key
storage.
The question often comes up about how to ensure that the communication
between the crypto device and the host MCU is not attacked by a man-in-
the-middle. In order to prevent a hacker from manipulating the bus
between the two chips, the Authentication OK signal (i.e. the Boolean
response) can be uniquely encrypted by the crypto IC.
One way to secure the bus between the crypto IC and MCU is to perform an
authentication on the result of crypto calculation on crypto device (this is
called the CheckMAC function). The idea is to make sure that when the
authentication (i.e. crypto) device puts out the Boolean response (which
means True or False, or one or zero) from the Check MAC operation that
the response cannot be tampered with.
All the Atmel devices have a method of protecting the single Boolean bit
that comes from the authentication chip to the microprocessor. It involves
using the second key that is both stored in the CryptoAuthetication device
and compiled into the code. After the successful completion of the
CheckMAC operation, the second secret is copied into the TempKey
register. Then the MCU sends over a unique number (for example, time of
day), which is then combined with that second secret using SHA and
returned to the MCU.
The software on the MCU does the same combination using the compiled
secret to see if it agrees with the result from the authentication device. This
is beneficial, because it means that you cannot just put a simple switch in
the wire between the two and always send a 1 (i.e. True).
The Atmel cryptographic ICs can also be set up to implement a secure boot
with any MCU. In this mode the devices confirm the authenticity of
downloaded code.
Many encryption algorithms like DES and AES use the XOR function as a key part
of their implementation. Those algorithms use a secret key to produce code that
is XORed with the data in order to encrypt or decrypt that data. The secrecy of
the encrypted data depends upon how well the crypto algorithm mathematically
scrambles that code, and not upon the strength of the XOR function itself.
During an encrypted read operation the crypto device uses a random number
that is hashed with an internal secret (i.e. the secret key) to create a result (i.e.
a hash value or digest). That hash value (i.e. digest) is then XORed with the
value to be sent out of the device. (In other words, to encrypt the plaintext, the
plaintext is XORed with the hash of the secret key and a random number.) When
that encrypted data is received outside of the crypto device, the receiver will
need to know the secret (i.e. secret key) that was used in order for that receiver
to reproduce the devices internal value that he or she will XOR with the received
encrypted data to mathematically reconstruct the plaintext. (see next page)
Since a completely new random number is created for each and every
encrypted transport, and because the hash of that random number with the
secret key is used as the XOR code, then breaking such an encrypted
transport would require actually breaking the SHA-256 algorithm itself or
obtaining the secret key.
The best choice today to address those two issues is using a specialized
crypto device (like Atmels CryptoAuthentication) or a secure micro. One
very important point is that a secure device is only as good as the
protection of the stored secrets (i.e. keys) in a specialized crypto key
storage device or in a secure MCU. (see next page)
The only way to fully protect the system software is to use a secure (i.e. smart card
based) microcontroller and store the entire system code within the device. In that way
it cannot be read, copied, or modified by an attacker. However, due to cost and other
concerns, this will not be an acceptable solution for most systems. On the other hand,
a specialized cryptographic authentication IC can provide excellent protection at a low
cost.
In order to stop others from copying the system firmware and producing duplicate
products (i.e. clones), a crypto IC can be employed to match the firmware to
legitimate products. Authorizing firmware can be done by sending challenges to the
cryptographic IC regularly during normal operation and then checking for the correct
response. If a system is build doesnt include a correctly programmed crypto IC, the
firmware will fail to operate, thus protecting against cloning.
If, in the above scheme, the firmware is updated on a regular basis and new challenge-
responses are incorporated into the system, it becomes very difficult for a hacker to
analyze the firmware and remove the authorization checks. If a remote connection is
available, implementing some of the challenges randomly from a trusted backend
server can make this nearly foolproof. (see next page)
Processors like the Atmel ARM9 devices include an on-chip boot ROM. This
ROM can be programmed to use a crypto IC to check a firmware signature
stored in the external flash prior to executing that program. If unauthorized
modifications have been made to the operating program, it will be
immediately detected and system operations can be interrupted.
The cryptographic algorithms used inside Atmel Crypto devices are industry-
standard and approved algorithms that do not require paying a license fee
to Atmel or any third party.
In addition, Atmel offers communication layer source code free of charge for
users to employ in any way without royalty.
Atmel chips are designed from the ground up to provide an ultra-high level
of hardware security. Atmel is now beyond the third generation of devices
that contain years of high security device making experience and know-
how. Some of the benefits that accrue to the Atmel devices are noted
below:
Atmel uses proprietary test methods to eliminate test and probe access
points
Atmel chips use the SHA-256 and ECC algorithms to ensure a long system
life. CRC based systems cannot stand up to modern cryptanalysis and SHA-
1 is no longer recommended for new system use by the US government.
(see next page)
Atmel takes great care to analyze all possible input conditions to ensure
that faulty or aggressive input sequences will never result in the loss of
secret data.
Atmel, Atmel logo and combinations thereof, Enabling Unlimited Possibilities, and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. 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 intellectual 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 PRODUCTS 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, DAMAGES 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 commitment 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 warranted for use as components in applications intended to support or sustain life.