PascalUrien Talk Venise 2016
PascalUrien Talk Venise 2016
[email protected]
CoFounder of the Ethertrust Company
Venezia, Italy, October 9th 2016
Pascal Urien 1
Part One: Mobile Payments
Pascal Urien 2
Background
Pascal Urien 3
Smartcard Genesis
• 1980, First BO’ French bank card, from CP8
RAM
• 1988, SIM card specification EEPROM R
• 1990, First ISO7816 standards
O
• 1991, First SIM devices M
CPU
• 1995, First EMV standards
• 1997, First Javacard
1988, the 21 (BO’) chip
– The javacard is a subset of the java language
– Patent US 6,308,317
• 1998, JCOP (IBM JC/OP)
• 1999, Global Platform (GP)
• 2002, First USIM cards
Siemens (SIM) chip, 1997
Pascal Urien 4
What is a Secure Element ?
A Secure Element (SE) is a Secure Microcontroller, equipped with host interfaces
such as ISO7816, SPI or I2C .
OS JAVACARD JCOP EXAMPLE: NXP PN532
GP (Global Platform)
ROM 160 KB
EEPROM 72 KB
RAM 4KB
Crypto-processor
3xDES, AES, RSA, ECC
Certification CC (Common Criteria) EAL5+
Security Certificates EMVCo
Pascal Urien 5
NFC Genesis
• 1994, Mifare 1K
– In 2011 Mifare chips represent 70% of the transport market.
• 2001, ISO 14443 Standards (13,56 MHz)
– Type A (Mifare)
– Type B
– Type F (Felica)
• 2004, NFC Forum
– Mifare (NXP), ISO14443A, ISO14443B, Felica (Sony)
– Three functional modes :
• Reader/Writer, Card Emulation, Peer to Peer
• NFC controllers realize NFC modes
Pascal Urien 6
From ISO 7816 to ISO 14443
• The basic idea of Wi-Fi design was Wireless Ethernet.
• The basic idea of ISO 14443 design was Wireless (ISO 7816)
Smartcard.
– Contrary to IEEE 802.11 there is no security features at the
radio frame level.
ISO 14443
V= 2 π fc S µo H Contactless Mode
READER
H = 5 A/m
ISO 7816 fc= 13,56 MHz
S= 40.10-4
Contact Mode V= 2,2V
Pascal Urien 7
About Inductive Coupling
Φ1 L1 M i1
=
Φ2 L2 M i2
No energy propagation,
The Energy is conservative, i.e. implies vicinity proof.
The Energy delivered by the primary circuit PPRI = i1 . ( M ω i2 ),
Pascal Urien
is equal to the energy consumed by the secondary circuit PSEC = i2 . ( M ω i1 ). 8
Propagation -d/λ
Po S /4πd2 e
S
d
Po
Pascal Urien 9
Secure Elements Market
Pascal Urien 10
NFC Standards Overview
NDEF
14443 SNEP
ISO 14443-2A ISO 14443-2A
-2B
ISO 14443-3A ISO 14443-3A
14443 LLCP
FELICA
-3B
NFC-SEC
DEP
Passive Mode
NFCIP-1 ISO 14443-4 NFCIP-1 Active Mode
NFCIP-1
*ISO/IEC_18092 standard and NFCIP-1 standards are similar
DEP: Data Exchange Protocol Pascal Urien 11
SIM-Centric Legacy Paradigm
Pascal Urien 12
HID NFC White Paper: SIM Centric Services
Trusted
Service
Manager
- Payment
- Access Control
- Transport
Pascal Urien 13
Cloud of Secure Elements
• Remote use
of Secure
Elements
hosted in the
cloud
through
secure TLS
channel
Pascal Urien 14
About TLS Stack for
Secure Element
User’s CA
INTERNET
Certificate Certificate
TLS Sessions
5 mm
CLOUD RESOURCES
JAVA VIRTUAL
MACHINE Get-KeysBlock
Get-CipherSuite
Pascal Urien 15
About Mobile Payments
Pascal Urien 16
Some Figures
• According to the French national bank ("Banque de France"), the France gross domestic
product (GDP) was about 1900 billion € in 2013.
• The global amount of financial transactions was about 27 000 billion €.
• 1,7% of these operations were performed with bank cards (leading to about 450 billion
€).
• Nine billion of card transactions were performed in 2013, with an average value of 50€.
• The number of payment cards in France was about 86 million, more than the
population.
• In France in 2015
– About 0,025 billion of NFC payment operations
– 10 € in average
– 0,25 billion €
– 0,05 % of payment card transactions
Pascal Urien 17
About the EMV Payment Four Corner
Architecture
ACQUIRER Bank
Merchant Account
Merchant Bank
Payment Processor
ISSUER Bank
Card Issuer
CHIP
Payment
terminal
EMV Card
Pascal Urien 18
A typical EMV transaction comprises
five steps
• 1) Selection of the PPSE (Proximity Payment Systems Environment)
application, which gives the list of embedded payment EMV
applications identified by their AID.
• 2) Selection of an EMV payment application.
• 3) Reading of the application capacities, thanks to the GPO (Get
Processing Options) command, which also returned the structure of
embedded information organized according to a records/files scheme.
• 4) Reading of records and files via the ReadRecord command.
Certificates are checked and a DDA procedure may be used as non
cloning proof.
• 5) Generation of payment cryptograms, triggered by GenerateAC or
CDA commands. Pascal Urien 19
Legacy EMV
• According to iso7816 standards EMV applications are identified by
AID (Application IDentifier) attributes, 16 bytes at the most.
• An EMV application embeds an index of a certification authority (such
as VISA or MasterCard), an issuer certificate signed by the CA, and an
ICC (integrated circuit card) certificate delivered (and signed) by the
issuer.
• The ICC certificate authenticates most of information stored within
the EMV application (PAN, bearer's name, validity dates...), encoded
according to the ASN.1 syntax.
• An ICC private RSA key is available and used for non cloning proof,
thanks to a dedicated command called DDA (Dynamic Data
Authentication), in which a 32 bits random is encrypted by the ICC
private key.
Pascal Urien 20
Legacy EMV
• Financial transactions are associated with cryptogam
generation based on symmetric 3xDES cryptographic
algorithm.
• One or two dedicated commands (GenerateAC) are
required by a payment operation, whose input
parameters include, among others, the amount and the
date.
• DDA and GenerateAC may be combined in a single
procedure called CDA (Combined Dynamic
Authentication).
Pascal Urien 21
EMV ISO7816 main commands
EMV Binary (hexadecimal) Encoding
Iso7816 request CLA INS P1 P2 P3
SELECT AID 00 A4 04 00 P3=AID-length AID
GetProcessingOptions 80 A8 00 00 P3=parameters-length
ReadRecord 00 B2 P1 P2 00
P1=record number
(P2-4)/8 = file number (FSI)
GenerateAC 80 AE P1 00 P3=parameters length
P1= type of cryptogram
Pascal Urien 22
PayPass Mag Stripe (PMS)
• PMS is an adaptation of EMV standards to magnetic stripe.
• It generates a dynamic Card Validation Code (named CVC3).
• A PayPass transaction comprises the five following operations:
– 1) Selection of the PPSE application.
– 2) Selection of the PayPass application.
– 3) Issuance of the GPO command.
– 4) Reading of the record one, file one, which contains the track1 and track 2
equivalent data
– 5) Issuance of the Compute Cryptographic Checksum (CCC) iso7816 request,
including an unpredictable number. The PayPass application returns the CVC3
value.
• Contrary to EMV the PMS profile does not embed certificates or RSA private
key. Thanks to CVC3 it is compatible with legacy magnetic card networks.
Pascal Urien 23
Customer’s
Google Card Not Present transaction (CNP) Issuer Bank
Acquirer
Google Card
Issuer Network
Customer‘s Acquirer’s Bank
Cards
The
Google Google
Virtual
Cloud of PVC
prepaid
card
Wallet 2
Bank Cards
MasterCard (2012)
Pascal Urien 24
Google PrePaid Card Transaction
// SELECT 2PAY.SYS.DDF01
>> 00A404000E325041592E5359532E4444463031
<< 6F2C840E325041592E5359532E4444463031A51ABF0C1761154F10A000000004
1010AA54303200FF01FFFF8701019000
Pascal Urien 25
Google PrePaid Card Transaction
// Select MasterCard Google Prepaid Card
>> 00A4040010A0000000041010AA54303200FF01FFFF
<<
6F208410A0000000041010AA54303200FF01FFFFA50C500A4D617374657243617
2649000
Pascal Urien 26
// Get Processing Options
>> 80A80000028300
<< 770A 8202 0000 9404 08010100 9 000
Google PrePaid
AIP=0000 AFI= 08010100
Card Transaction
// Reader Record one File one Track 1 data
>> 00B2010C00
<< 706A9F6C0200019F62060000000000389F63060000000003C64 5629 235343330
3939393930393937393939395E202F5E31373131313031303031303030303030
303030309F6401049F650200389F660203C6 9F6B13 5430 999909979999 D 1711 1
01 0010000000000F 9F670104 9000 Track 2 data PAN= 999909979999
Validity Date= 1711
// COMPUTE Cryptographic Checksum (CVC3)
>> 802A8E8004 00000080
<< 770F9F6102 0038 9F6002 0038 9F3602 0012 9000
CVC3 Track 2 CVC3 Track 1 Pascal ATC
Urien 27
VISA MSD
• VISA VCPS (Visa Contactless Payment Specification) MSD (Magnetic Stripe Data),
is an adaptation of EMV standards to magnetic stripe for contactless payments.
• It generates a dynamic Card Verification Value (dCVV, a three digits code) based
on a 3xDES (112 bits) secret key.
• A VISA MSD transaction comprises the four following operations:
– 1) Selection of the PPSE application.
– 2) Selection of the VISA MSD application.
– 3) Sending of the GPO command with payment attributes (amount, date...).
– 4) Reading of the record one, file one, which contains the track 2 equivalent data.
This file includes a dCVV computed after the previous GPO.
• Contrary to EMV the VISA MSD profile does not embedded certificate or RSA
private key. Thanks to dCVV it is compatible with legacy magnetic card networks.
Pascal Urien 28
Apple Pay
Select PPSE
00A404000E 325041592E5359532E4444463031
6F 23 […] 9000
6F File Control Information (FCI) Template
84 Dedicated File (DF) Name
325041592E5359532E4444463031
A5 File Control Information (FCI) Proprietary Template
BF0C File Control Information (FCI) Issuer Discretionary Data
61 Application Template
4F Application Identifier (AID) – card
A0000000031010
87 Application Priority Indicator
01
Pascal Urien 29
Apple Pay
Select VISA MSD
00A4040007 A0000000031010
6F 39 […] 9000
6F File Control Information (FCI) Template
84 Dedicated File (DF) Name
A0000000031010
A5 File Control Information (FCI) Proprietary Template
9F38 Processing Options Data Object List (PDOL)
9F6604 9F0206 9F0306 9F1A02 9505 5F2A02 9A03 9C01 9F3704 9F4E14
BF0C File Control Information (FCI) Issuer Discretionary Data
9F4D Log Entry
1401
9F5A Unknown tag
1108400840
Pascal Urien 30
Apple Pay
GPO
80 A8 00 00 37 83 35 [...]
83 35
86 00 00 80
00 00 00 00 00 01
00 00 00 00 00 00
04 80
00 00 00 00 00
04 80
14 08 18
01
4A 94 57 1A
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80 06 00 80 08 01 01 00 9000
AIP = 0080 , MSD mode
AFL = 08010100, one record one file
Pascal Urien 31
Apple Pay
//Read Record 1 file 1
00 B2 01 0C 00
701A 57 13 40 71 23 13 11 22 33 44 D2 00 32 01 00 00 05 09 00 02 5F 5F 20
02 20 2F 90 00
Pascal Urien 32
//Select PPSE
00A404000E325041592E5359532E444446303100 EMV
6F23840E325041592E5359532E4444463031A511BF0C0E610C4F07A00000000
410108701019000
Pascal Urien 34
6F File Control Information (FCI) Template
84 Dedicated File (DF) Name EMV
A0000000041010
A5 File Control Information (FCI) Proprietary Template
50 Application Label
MasterCard
87 Application Priority Indicator
01
5F2D Language Preference
fr
9F11 Issuer Code Table Index
01
9F12 Application Preferred Name
Mastercard
BF0C File Control Information (FCI) Issuer Discretionary Data
9F4D Log Entry
0B0A
Pascal Urien 35
GPO
80A8000002830000
7716 8202 1980 9410 08010100100101011801020020010100 9000 EMV
77 Response Message Template Format 2
82 Application Interchange Profile
94 Application File Locator (AFL)
Pascal Urien 38
// P1= Generate TC (01xx) + CDA signature Request (xxx1)= 50
80AE50002B 0000000006290 000000000000 250 0000000000 0978 150610 00 90B4
E0D2 25 0000 0000000000000000 1F0302 00
000000000690 Amount
000000000000 Cashback
250 Country Code
EMV
0000000000 Terminal Verfication Result
0978 Currency code
150610 Transaction Date
00 Transaction Type
90B4E0D2 Unpredictable Number
25 Terminal type
0000 Data Authentication Code
0000000000000000 ICC Dynamic Number
1F0302 Cardholder Verification Method
00 LE
//CDOL1 tag 8C
9F0206 9F0306 9F1A02 9505 5F2A02 9A03Pascal
9C01 9F3704 9F3501 9F4502 9F4C08 9F3403
Urien 39
7781 91
09 a1 86 bd eb 56 60 ba 15 b2 b2 8d 9f 1c b2 e4 74 a6 8d 8c
Transaction Data Hash Code
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb Padding
154fb6d9d774f5e6f7eef512b557eaf754c9c8f3bc Signature
Pascal Urien 41
signature= 154fb6d9d774f5e6f7eef512b557eaf754c9c8f3bc =sha1 EMV
{ 05012608a1bb29ced689957c80
|| ece93cd4a08034c8
|| 09a186bdeb5660ba15b2b28d9f1cb2e474a68d8c
CDA
|| 49 x bb (49 = 0x70 - 0x26 - 25)
|| 90B4E0D2 } // Unpredictable Number
Pascal Urien 43
The SIMulation Project
Pascal Urien 44
Pascal Urien 45
Scope
• Remote use of Secure Elements hosted in the
Cloud through secure TLS channel
RACS
NFC TLS
HCE
TCP
IP
Pascal Urien 46
Architecture
• Four Components
– Legacy payment terminal
– Android Mobile
• Host Card Emulation
• Mobile API for SIM interface
– SIM card
• Delivering a TLS stack
– Payment servers
• Built over RACS server and legacy payment card
Pascal Urien 47
RACS
seid
racs.com:port
seid
TLS-SE
connect
HCE VirtualCard API CLOUD
(AID)
APP init
HCE-SIM Mobile API
Pascal Urien 49
Introducing RACS
• The RACS protocol is in the perspective of
these former experiments.
• It has been designed for efficient and
secure remote use of secure elements via ISO7816
the internet. APDU
Pascal Urien 50
RACS Uniform Resource Identifier
• RACS setups a secure (TLS) connection with a remote server, it
collects the list of hosted secure elements, and thereafter it powers
on a secure element, resets the device and exchanges APDU
requests and responses.
• RACS defines an URI (Uniform Resource Identifier), such as
• ServerName:Port/SEID
• It comprises the server name or IP address, the TCP port and a SE
identifier (the SEID).
• Therefore it creates a concept somewhat similar to a WEB of secure
elements, or a WEB of cryptographic procedures.
Pascal Urien 51
A PKI Infrastructure
• In order to perform strong mutual authentication both
RACS client and server are equipped with X509
certificates, dealing with asymmetric cryptography
(RSA or elliptic curves).
• The client SUBJECT attribute, more precisely the
Common Name (CN) field of this attribute identifies a
legitimate client, and is associated within the server to
an index UID, the user identifier.
Pascal Urien 52
Key Diversification Data
How to
allocate
SEID
Reader Serial Number
LIST
SEID
RESET POWERON
SHUTDOWN
APDU IO
Pascal Urien 55
APDU
Command
• No Script !
Pascal Urien 56
Security Policy
• Only users equipped with valid certificates successfully establish TLS
sessions.
• A user identifier (UID) is derived from the certificate Common Name (CN)
attribute.
• A TLS session is identified by a unique identifier (the SID).
• Every secure element has two states, unlocked and locked.
– The SHUTDOWN command forces the unlocked state; the POWERON
command switches the SE state from locked to unlocked.
– In the locked state the SE may be only used by the SID that previously locked
it.
• At the end of a TLS session all used SEs are unpowered and unlocked.
Pascal Urien 57
SEID Locking
Unlocked Locked(SID)
Power Off Power On
POWERON(SID) POWERON
(Other-SID)
SHUTDOWN(All-SID)
DENIED
END Of TLS SESSION(SID)
Pascal Urien 58
Access Control
• The server manages two kinds of table:
– The Users-Table stores for each CN a list of
authorized SEIDs.
– Each SEID is linked to a SEID-Table storing for
every AID (embedded application) a list of
authorized CNs.
Pascal Urien 59
uid
UID, SID, AID, Filter
TLS
sid sid
POWERON
seid seid
SELECT
aid aid
Filter
Pascal Urien
Filter 60
Experimental
Platform
Pascal Urien 61
SEID files
ATR.txt File
CardSN.txt File
Pascal Urien 62
Access Control Files
Users.txt file
SEID.txt file
Filter.txt file
Pascal Urien 63
•
The Open MobileAPI
The API defines a generic framework for the access to Secure Elements in a mobile environment. It is
based on four main objects.
• The SEService is the abstract representation of all SEs that are available for applications running in the
mobile phone.
• SEService seService = new SEService(this,this)
• public void serviceConnected(SEService service)
• seService.shutdown()
• The Reader is the logical interface with a Secure Element. It is an abstraction from electronics devices
which are needed for contact (ISO 7816) and contactless (ISO 14443) smartcards.
• Reader[] readers = seService.getReaders()
• The Session is opened and closed with a Reader. It establishes the logical path with the SE managed by
the Reader.
• Session session = readers[0].openSession()
• session.close() or readers[0].closeSessions()
• The Channel is associated with an application running in the SE and identified by an ID (the AID=
Application IDentifier)
• Channel channel = session.openLogicalChannel(aid)
• byte[] response channel.transmit(byte[] command)
• channel.close()
Pascal Urien 64
OpenMobileAPI: The SIM File System
MF (3F00)
|-EF-DIR (2F00) --> reference to DF-PKCS#15
|
|-DF-PKCS Access Control Main File #15 (7F50)
|-ODF (5031) --> reference to DODF
|-DODF (5207) --> reference to EF-ACMain
|-EF-ACMain (4200) --> reference to EF-ACRules
|-EF-ACRules (4300) --> reference to EF-ACConditions
|-EF-ACConditions1 (4310)
|-EF-ACConditions2 (4311)
|-EF-ACConditions3 (4312)
Pascal Urien 65
EF-ACRules
30 10
A0 08 // aid
04 06
A0 00 00 01 51 01 // Application Identifier (AID)
30 04
04 02
43 10 // EF-ACCondition File
30 10 A0 08 04 06 A0 00 00 01 51 02 30 04 04 02 43 11
30 10 A0 08 04 06 A0 00 00 01 51 03 30 04 04 02 43 11
30 08
82 00 // other
30 04
04 02
43 12 // file
FF FF FF 90 00
Pascal Urien 66
No access to any application
Tx: 00 A4 00 04 02 43 10 // Select AC-Conditions1
Rx: 61 20
Tx: 00 C0 00 00 12
Rx: 62 1E 82 02 41 21 83 02 43 10 A5 06 C0 01 00 DE 01 00 61 0E
Tx: 00 B0 00 00 00 // Read AC-Conditions1 - empty file, no access to any application
Rx: 6C 1E
Tx: 00 B0 00 00 1E
Rx: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF 90 00
Pascal Urien 67
Access to a single application
Tx: 00 A4 00 04 02 43 11 // Select AC-Conditions2
Rx: 61 20
Tx: 00 C0 00 00 20
Rx: 62 1E 82 02 41 21 83 02 43 11 A5 06 C0 01 00 DE 01 00 8A 01
05 8B 03 6F 06 02 80 02 00 1E 88 00 90 00
Tx: 00 B0 00 00 00 // Read AC-Conditions2,
Rx: 6C 1E
Tx: 00 B0 00 00 1E
Rx: 30 16
04 14
11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
// CertHash
FF FF FF FF FF FF 90 00 Pascal Urien 68
Access by any application
Tx: 00 A4 00 04 02 43 12 // Select AC-Conditions3
Rx: 61 20
Tx: 00 C0 00 00 20
Rx: 62 1E 82 02 41 21 83 02 43 12 A5 06 C0 01 00 DE 01 00 8A 01 05 8B
03 6F 06 02 80 02 00 1E 88 00 90 00
Tx: 00 B0 00 00 00 // Read AC-Conditions3, access by any application
Rx: 6C 1E
Tx: 00 B0 00 00 1E
Rx: 30 00 // empty condition entry,
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
90 00 Pascal Urien 69
Host Card Emulation
Pascal Urien 71
HCE Service
<host-apdu-service
xmlns:android= "http://schemas.android.com/apk/res/android"
android:description="@string/servicedesc"
android:requireDeviceUnlock="false" >
<aid-group
android:category="other"
android:description="@string/aiddescription" >
<aid-filter android:name= "325041592E5359532E4444463031" />
<aid-filter android:name= "a0000000041010aa54303200ff01ffff" />
</aid-group>
</host-apdu-service>
Pascal Urien 72
User’s Experience
Selection of Connection Ready for Fidelity Card Payment
a bank card to server payment Reading Transaction
Pascal Urien 73
About Virtual Fidelity Cards
• A virtual fidelity card is associated
with an application AID registered
with the payment application.
• The merchant terminal selects
this virtual card (via the dedicated
iso7816 SELECT command) before
the transaction.
• The returned information
includes a card number to which
the payment would be bound.
Pascal Urien 74
Legacy Timing
• A legacy contactless transaction consumes about 400ms,
and requires 8 ISO7816 requests, which are detailed below:
– Selection of the PPSE application.
– Selection of the NFC payment application.
– Issuance of the GPO command.
– Four ReadRecord commands used for collecting four files
located in two records.
– One GenerateAC request, realizing a CDA operation.
• About 50% of the transaction time (200 ms) is consumed by
the CDA computing.
Pascal Urien 75
TERMINAL RACS Script
Transparent Remote
Processing
Mode APDU
BEGIN APDUScript
APDU
END
RACS Server
RACS Script
executed BEGIN ResetScript
after the SHUTDOWN SEID
connection POWERON SEID
to the server END
Pascal Urien SEID 76
Transparent Mode
• In the transparent mode every iso7816
request is forwarded to the server
• What leads to an extra time cost of about
250ms (in average) per APDU
• Total duration is about 8x250+400= 2400ms.
Pascal Urien 77
TERMINAL RACS Script executed
SELECT PPSE
for cryptographic
SELECT AID Local (CDA) computing
GPO Processing
READ-RECORD(s) BEGIN CdaScript
APDU [GPO]
GENERATE-AC APDU [GENERATE-AC]
END
Cache
RACS Server
Mode
RACS Script BEGIN ResetScript
executed SHUTDOWN SEID
after the POWERON SEID
connection SELECT SEID AID
to the server ENDPascal Urien SEID 78
Cache Mode
• The mobile application manages a cache; the seven first iso7816 requests,
which return static information, are locally processed by the smartphone.
• Each operation needs about 30ms; therefore seven APDUs cost 210ms,
which is nearly equivalent to the legacy transaction.
• The last request (GenerateAC) is forwarded to the remote server, which
implies a delay ranging between 350 and 650 ms, according to the
following repartition:
– 200 ms are burnt by the remote CDA operation
– 100-250 ms are spent by the platform components (mobile phone, server
operating system and network components)
– 50-200 ms are consumed by the latency of 3G/4G cellular network.
• Total: 560-860ms
Pascal Urien 79
Part II – Secure Elements For
Object
Pascal Urien 80
About the Internet of Things (IoT)
• Pretz, K. (2013). “The Next Evolution of the
Internet”
Pascal Urien 81
Beyond The Horizon
• The IoT is the death of the Moore Law.
• Waldrop M. "More Than Moore", Nature February 2016
Vol 530
– The semiconductor industry will soon abandon its pursuit of
Moore’s Law.
• "Rebooting the IT Revolution: A Call to Action" (SIA/SRC),
2015
– "Security is projected to become an even bigger challenge in the
future as the number of interconnected devices increases... In
fact, the Internet of Things can be viewed as the largest and
most poorly defended cyber attack surface conceived by
mankind"
Pascal Urien 82
*W= ½ Nq x V
Trillion Sensors q = 1,6 10-19
10-14 J == 125,000 electrons
Towards
Cyber
Physical
Systems
(CPS)
Pascal Urien 83
Internet Of Things
JSON (JavaScript Object Notation) Communication
is a lightweight, text-based, Stack
language-independent data
interchange format
JSON Schema
JSON Data Interchange Format
REST protocol
Application
Framework Electronics
Operating
System Board
Pascal Urien 84
EXAMPLE 1: NEST
Pascal Urien 85
https://www.threadgroup.org
DTLS + J-PAKE
Authentification
J-PAKE is a password-
authenticated key exchange
(PAKE) with “juggling” (hence
the “J”).
It essentially uses elliptic
curve Diffie-Hellmann for key
agreement and Schnorr
signatures as a NIZK (Non-
Interactive Zero-Knowledge)
proof mechanism
Pascal Urien 86
Pascal Urien 87
6LoWPAN deals with IPv6 and
Mesh networks
IEEE 802.15.4
MAC Frame Size 127 Bytes
IpV6 header 40 Bytes
TCP header 20 Bytes
Pascal Urien 88
•
IEEE 802.15.4
Coordinator is assumed to be the Trust Center (TC) and
provides
– Cryptographic key establishment
– Key transport
– Frame protection
– Device management
• Cryptographic Keys
– Master , basis for long term security used for symmetric
key establishment. It is used to keep confidential the Link
Keys exchange between two nodes in the Key
Establishment Procedure (SKKE).
– Link, shared exclusively between two network peers for
Unicast communication.
– Network, used for broadcast communication security.
Pascal Urien 89
THREAD BOARD
http://www.silabs.com/
Pascal Urien 90
Example 2: Open Connectivity
Foundation (OCF)
Pascal Urien 91
https://openconnectivity.org/
The Open Connectivity Foundation
(OCF) is creating a specification
and sponsoring an open source project to
make this possible.
The OCF sponsors the IoTivity open
source project which includes a reference
implementation of our specification
available under the Apache 2.0 license.
Pascal Urien 94
CoAP /HTTP
Pascal Urien 96
Secure Storage
It is strongly recommended that IoT device makers provide reasonable
protection for Sensitive Data so that it cannot be accessed by unauthorized
devices, groups or individuals for either malicious or benign purposes.
In addition, since Sensitive Data is often used for authentication and
encryption, it must maintain its integrity against intentional or accidental
alteration
Device Authentication with DTLS
Device Authentication with Symmetric Key Credentials
Device Authentication with Raw Asymmetric Key Credentials
Device Authentication with Certificates
Secure Boot
In order to ensure that all components of a device are operating properly and
have not been tampered with, it is best to ensure that the device is booted
properly. There may be multiple stages of boot. The end result is an
application running on top an operating system that takes advantage of
Pascal Urien
memory, CPU and peripherals through drivers. 97
IPv4/IPv6 Issue
Pascal Urien 98
Example 3. MBED
Pascal Urien 99
MBED stack from the ARM company
• LWM2M (Lightweight Machine to Machine Technical Specification) is a framework based on CoAP dealing with
objects hosted by LWM2M clients and communicating with LWM2M servers
• LWM2M manages the following interfaces
– Bootstrap
– Client Registration (with servers)
– Device management
– Information Reporting
• Two transport mechainsm ("transport channel bindings“)
– UDP/IP
– SMS
Pascal Urien 104
Example 4. Home Kit
Client
About TLS
Server
Server CA
KPubS KPubCA Client Hello (ClientRandom, SessionID) Flight1
*Certificate
Flight2
Certificate Request
Server Hello (ServerRandom, SessionID)
ServerHelloDone
ChangeCipherSpec
Flight2
Client Encrypted Server Finished Message
*Certificate KPubC
Flight3 Flight3
*CertificateVerify {MessagesDigest} KPrivC ChangeCipherSpec
ChangeCipherSpec
Encrypted and HMACed RECORD
Encrypted Client Finished Message
Encrypted And HMACed RECORD
ChangeCipherSpec
Flight4
Encrypted Server Finished Message
EAP-Response-EAP-TLS, Flags
EAP-Success
Pascal Urien 115
EAP-TLS Flags Field
Segmentation Reassembly Procedures
- The L bit (length included) is set to indicate the presence of the four-
octet TLS flight length field, and is set for the first fragment of a
fragmented TLS message or set of messages.
- The M bit (more fragments) is set on all but the last fragment.
- The S bit (EAP-TLS start) is set inPascal
anUrien
EAP-TLS Start message. 116
Client Server
EAP-Request-EAP-TLS, Flags-Start
EAP-Response-EAP-TLS, Flags, DTLS Flight1
EAP-DTLS EAP-Request-EAP-TLS, Flags, DTLS Flight2
EAP-Response-EAP-TLS, Flags, DTLS Flight3
EAP-Response-EAP-TLS, Flags
EAP-Success
Pascal Urien 117
Client Server
RAMCPU
PACKETS EAP-TLS
TLS PACKETS E2PROM
EAP-TLS
BRIDGE ROM
RAMCPU
PACKETS DTLS PACKETS E2PROM
EAP-TLS
BRIDGE ROM
Pascal Urien 122
Experimental Platform
The cryptographic module (Gemalto TOP-IM_GX4 )is based on
the Samsung S3CC9TC chip. It includes:
- a 16 bits CPU
- 72 KB of EEPROM
- 384 KB of ROM
- 8 KB of RAM for the CPU
- 2 KB of RAM for the crypto processor
DTLS 2xTLS
COAPTLS
DTLS TLS Session
COAP POST is transferred Get
KeyValue to the Mobile KeyContain
COAP ACK OK
er
DTLS Close
Write KeyContainer in the SIM
DTLS Close
ePlug.java
TLS-SE API HTTP
TLS Server
JAVA 1.5
TCP
PCSC- Virtual IP
Lite Hub
Debian OS
TLS
Pascal Urien 133
Switches
Power In AmpMeter
TLS
Raspberry Pi
Power Out Pascal Urien 134
Questions ?
Pascal Urien
October 9th 2016