2
Security processes
This section describes the security processes used to perform a mutual authentication and establish a secure
transfer channel (SFC) where all the communications are encrypted.
2.1
Public key exchange
The public keys exchange is done in two steps:
•
The Android phone sends its "Login" and ECC "Public key".
•
The ST25DV-I2C-DISCO board sends its ECC "Public key".
If the ST25DV-I2C-DISCO kit has never been used before, it saves the "Login" and the "Public key" in static
memory and consider this user to be the administrator "Authorized User" of the product. It means that the
ST25DV-I2C-DISCO kit only accepts requests from this smartphone user.
When the Android phone receives the ST25DV-I2C-DISCO "Public key", it checks that this key is signed by a
manufacturer key. This verification ensures that the product (represented by the ST25DV-I2C-DISCO kit here) is
not counterfeited.
2.2
Definition of a "Shared Secret"
To establish an encrypted channel, the Android phone and the ST25DV-I2C-DISCO kit have to agree on a
symmetric key used to encrypt all the communications between the two devices. This key cannot be exchanged
over NFC because someone may spy all the data exchanged and get the key.
Elliptic curve Diffie–Hellman (aka "ECDH") is a well known "key agreement protocol" used to establish a "Shared
Secret" over an insecure channel.
used to define a symmetric key used to encrypt all the communications of this session.
The two communicating devices must both have an ECC key pair. They exchange their public keys (the private
key remain secret and is not shared). Each device use ECDH scheme to combine its own private key with the
public key of the peer device. Thanks to ECC, these two operations leads to the exact same result, that is called
"Shared Secret" (see
Someone who has spied the communication has seen the public keys exchanged but this is not sufficient to find
the "Shared Secret".
The two devices have been able to define a "Shared Secret" that nobody else can find. Only the ones knowing
the private keys can get the "Shared Secret".
2.3
Derivation of a public key
The "Shared Secret" can be used to encrypt the communications between the two devices but it has a weakness:
the ECC key pairs of the Android and ST25DV-I2C-DISCO devices do not change, so the "Shared Secret" is
always the same. Someone can record the data exchanged over NFC and re-execute them. This is called "replay
attack".
UM2575 - Rev 1
Section 2.3 Derivation of a public key
Figure
5).
Figure 5.
Elliptic curve Diffie-Hellman over NFC
Discovery
public key
Android phone
Pub
describes how this "Shared Secret" is
Android
public key
ST25DV-I2C-DISCO
Pub
UM2575
Security processes
page 6/23
Need help?
Do you have a question about the ST25DV-I2C and is the answer not in the manual?