Using an STM8L162M8 AES hardware accelerator with a CR95HF
to encrypt contactless tag data memory
Introduction
This application note describes STM8L162M8 demonstration firmware which reads and
writes encrypted data into an LRxk contactless tag. The MCU encrypts data using its
embedded AES hardware and sends it to a contactless tag through the CR95HF
transceiver.
The data stored into the contactless tag can be read by anyone but decrypted only by the
encryption or decryption key owner.
The following conventions and notations apply in this document unless otherwise stated.
1.2.1 Binary number representation
Binary numbers are represented by strings of digits 0 and 1, with the Most Significant Bit
(MSB) on the left, the Least Significant Bit (LSB) on the right, and “0b” added at the
beginning.
For example: 0b11110101
1.2.2 Hexadecimal number representation
Hexadecimal numbers are represented by numbers 0 to 9, characters A - F, and “0x” added
at the beginning. The Most Significant Byte (MSB) is shown on the left and the Least
Significant Byte (LSB) on the right.
For example: 0xF5
Doc ID 022369 Rev 35/22
Acronyms and notational conventionsAN3992
1.2.3 Decimal number representation
Decimal numbers are represented as is, without any trailing character.
For example: 245
6/22Doc ID 022369 Rev 3
AN3992Overview
2 Overview
2.1 AES cryptography overview
The purpose of cryptography is to protect sensitive data to avoid it from being read by
unauthorized persons. There are many algorithms that implement cryptography. These
techniques can be split into:
●Asymmetric cryptography algorithms: These algorithms use a key to encrypt and
another key to decrypt messages. RSA and DSA are examples of this type of
algorithm.
●Symmetric cryptography algorithms: These algorithms use the same key to encrypt
and decrypt messages. Advanced Encryption Standard (AES), Data Encryption
Standard (DES) are examples of this type of algorithm.
The Advanced Encryption Standard (AES) specifies a FIPS-approved cryptography
algorithm that can be used to protect electronic data. AES exists in three versions: 128-bit,
192-bit and 256-bit.
2.2 CR95HF overview
The CR95HF device is an RF transceiver IC for contactless application (ISO/IEC 15693,
ISO/IEC 14443-3 and ISO/IEC 18092). It manages the RF communication with RFID or
NFC contactless tags. It includes frame coding, RF modulation and contactless tag
response decoding.
The CR95HF is a slave device. A host (such as an MCU) is required to control it.
2.3 STM8L162M8 overview
High-density STM8L162M8 microcontrollers have an embedded AES 128-bit hardware
accelerator to off-load the CPU from encryption or decryption tasks. This AES peripheral is
a fully compliant implementation of the AES standard as defined by the FIPS publication
(FIPS PUB 197, 2001 November 26).
This application note applies to STM8L162M8 high-density devices with built-in AES
peripheral. The software supplied with this application note provides an implementation of
some commonly used AES chaining modes (ECB, CBC, CFB, OFB and CTR).
For more detailed information, you should refer to the AES section of the STM8L15x and STM8L16x microcontroller family reference manual (RM0031).
Doc ID 022369 Rev 37/22
Loading...
+ 15 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.