SEC4 FinalSlides
SEC4 FinalSlides
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 2
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 3
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 4
Poor Security - Information
• Compromised IoT
devices can provide a
lot of opportunity to
attackers
• Attackers can get access to sensitive data
• Financial information (point of sale systems)
• Camera and microphone (security systems)
• Credentials to other systems (passwords)
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 5
Poor Security - Resources
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 6
Poor Security - Access
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 7
Effects of Proper Security
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 8
Aspects of IoT Security
• Authentication
• Encryption Class Focus
• Key Storage
• Firmware Protection
• Firmware Updates
See other security classes
• Testing • SEC5 – Secure boot
• Etc… • SEC6 and SEC7 –
Secure applications
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 9
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 10
Asymmetric Crypto Review
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 11
Digital Signature Algorithm
Host Subject
Subject Public Private
Public Key Distribute Key Key
Message Sign
Verify
OK? Signature
Certificate
Authority Info
TBS (To Be Signed) Certificate Info
Verify
(ECDSA) Subject Info
Subject Public Key
OK? Signature
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 14
Certificate Authentication
Host Subject
Authority Public Private
Public Key Key Key
Certificate (Verified) Certificate
Authority Info
Certificate Info
Subject Info
Subject Public Key
Signature
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 16
Certificate Chains
Root
CA
Intermediate Intermediate
CA CA
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 18
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 19
AWS Introduction
Cloud computing is the on-demand delivery of compute power, database storage,
applications, and other IT resources through a cloud services platform via the internet
with pay-as-you-go pricing.
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 20
Our concept of IoT
Things Cloud
Sense & Act Storage & Compute
Intelligence
Insights & Logic → Action
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 21
AWS IoT Architecture
Things Cloud
Sense & Act Storage & Compute
Secure device
connectivity
and messaging
Intelligence
Insights & Logic → Action
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 22
AWS IoT Architecture
Things Cloud
Sense & Act Storage & Compute
Secure local Secure device Fleet onboarding, Fleet IoT data analytics
triggers, actions, connectivity management and audit and and intelligence
and data sync and messaging SW updates protection
Endpoints
Gateway
Intelligence
Insights & Logic → Action
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 23
Authentication
ClientId, Cert
Session
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 24
AWS IoT Certificate Management
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 25
AWS IoT Managed Certificates
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 26
Customer Managed Certificates
CSR
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 28
Just In Time Registration
• JITR (jit-ter)
• Pairs with Bring Your Own Certificate (BYOC)
• Decouples certificate provisioning and registration
• Enables event driven hook for post-registration actions
• Certificate deactivation and revocation
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 29
Amazon FreeRTOS
IoT Operating System for Microcontrollers
Amazon FreeRTOS, based on the popular FreeRTOS, is a microcontroller
operating system that makes small, low powered edge devices easy to program,
deploy, secure, connect, and maintain.
1010101101
0101110101
1010101010
1010010101
0101001010
0101010111
?
0101011001
1001011001
00101101
Will it work on my chip? Does it have the Where do I get it? How do I start?
functionality I need?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 30
Amazon FreeRTOS
IoT Operating System for Microcontrollers
Amazon FreeRTOS, based on the popular FreeRTOS, is a microcontroller
operating system that makes small, low powered edge devices easy to program,
deploy, secure, connect, and maintain.
EMBEDDED APPS
CONNECTIVITY
GREENGRAS
S LIBRARIES
OVER THA AIR
(OTA) AGENT
LIBRARIES
LIBRARIES
CLOUD &
SECURTIY
HELLO
FreeRTOS
HW DRIVERS
Will it work on my chip? Does it have the Where do I get it? How do I start?
functionality I need?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 31
IoT microcontroller device concerns: User program
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 32
IoT microcontroller device concerns: Security
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 33
IoT microcontroller device concerns: Communications
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 34
IoT microcontroller device concerns: Key management
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 35
IoT microcontroller device concerns: Peripherals
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 36
IoT microcontroller device concerns: Bootloader
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 37
IoT microcontroller device concerns: Bootloader
Amazon FreeRTOS
Networking your app flawlessly Communications
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 38
Microcontroller development environments
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 39
Microcontroller development environments
Amazon
Commercial
FreeRTOS
IDE support
Vendor IDE
support
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 40
Microcontroller development environments
Amazon
Commercial
FreeRTOS
IDE support
Vendor IDE
support
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 41
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 42
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 43
Lab 1 Objectives
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 44
Setting up AWS IoT for JITR
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 45
Create Registration Lambda Function
• Essential Functions
• Adds device certificate to IoT account
• Attaches policy to device certificate
• Can Be Extended
• Perform additional validation
• Trigger other registration actions
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 46
Creating IoT Rule
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 47
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 48
TLS (Transport Layer Security)
Layer Description
7 Application High-level APIs (e.g. MQTT)
6 Presentation Encoding/compression/encryption Transport
5 Session Collections of messages Layer Security
4 Transport Reliable transmission of data (e.g. TCP or UDP)
3 Network Moving data between network nodes (e.g. IP)
2 Data Link Data transfer on a direct connection (e.g. MAC)
1 Physical The business of physically moving bits
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 50
TLS Authentication
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 51
Trust Store
Client Server
Key Exchange
Calculate Calculate
Key Agreement
ECDH ECDH
Forward Secrecy
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 54
TLS Cipher Suites
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 55
TLS Cipher Suite Example
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
ServerHelloDone
ClientKeyExchange
Finished
Finished
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 57
TLS Handshake – Mutual
Client Server
ClientHello
ServerHello
Certificate
ServerKeyExchange
CertificateRequest
ServerHelloDone
Certificate
ClientKeyExchange
CertificateVerify
Finished
Finished
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 58
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 59
Why Hardware Security?
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 60
ATECC608A Introduction
5000
milliseconds
4000
3000
2000
1000
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 64
ATECC608A TLS Support
ATECC608A Client Server
Random ClientHello
ServerHello
Verify Certificate
Verify ServerKeyExchange
CertificateRequest
ServerHelloDone
GenKey Certificate
ECDH ClientKeyExchange
Sign CertificateVerify
Finished
Finished
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 65
ATECC608A for AWS IoT (TLS)
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 66
ATECC608A Key Agreement
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 67
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 68
AWS IoT CAs
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 69
Microchip Provisioning Services
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 72
Create Certificate Authorities
• Create Root CA
• True root
• Self-signed certificate
• Create Signer CA
• Create CSR (certificate signing request)
• Create Certificate from Root CA
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 73
Registering the Signer
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 74
Hardware Setup
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 75
Provisioning the Thing
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 76
Register CA with AWS IoT
Signer AWS IoT
Private Key
verificationCertificate Validate
Signer Certificate caCertificate Ok?
Register CA
CAs
Signer Certificate
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 77
Just In Time Registration
Device AWS IoT
Connect Is Device Cert
Device Certificate in Cert Registry?
Signer Certificate
No
Disconnect
Is Signer Cert CAs
in CA Registry? Signer Certificate
Yes
Publish to topic:
$aws/events/certificates/registered/<ca id>
ZeroTouchJustInTimeRegistration
rule triggers
Run lambda function:
ZTLambdaJITR
Registers Device Certificate
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 78
ATWINC1500
MCU ATWINC1500
Application
TLS DNS DHCP …
WINC1500
Radio
Driver
MCU
TCP / UDP
IP
WIFI
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 79
WINC1500 and ATECC608A TLS
integration
• WINC1500 implements TLS for user
• Elliptic Curve math not supported
• WINC1500 requests EC math be performed by crypto
proxy in firmware
• Firmware crypto proxy performs actual operations
using the ATECC608A
• WINC1500 stores required certificates
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 80
ATWINC1500 ECC Pass-through
ECDSA
Sign
Signature
Signature
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 81
Client Certificates
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 82
MQTT Communication
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 83
Lab Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 84
Class Agenda
• Importance of IoT Security
• PKI & Certificates for Authentication
• AWS IoT Authentication, JITR, and FreeRTOS
• Lab 1: AWS Account Setup
• TLS (Transport Layer Security)
• ATECC608A Secure Element
• Provisioning
• Lab 2: Provisioning and Connecting
• Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 85
AVR-IoT and PIC-IoT Platform
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 86
AVR-IoT PIC-IoT Platform
Smart
User App
PIC® & MQTT*
AVR® JWT*
MCUs
Connected Secure
WINC1500 ECC608
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 87
Summary
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 89
LEGAL NOTICE
SOFTWARE:
You may use Microchip software exclusively with Microchip products. Further, use of Microchip software is subject to the copyright notices, disclaimers, and any license terms accompanying such software, whether set forth at the
install of each program or posted in a header or text file.
Notwithstanding the above, certain components of software offered by Microchip and 3 rd parties may be covered by “open source” software licenses – which include licenses that require that the distributor make the software
available in source code format. To the extent required by such open source software licenses, the terms of such license will govern.
MICROCHIP DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING ANY IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY DIRECT OR INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL, OR CONSEQUENTIAL LOSS, DAMAGE, COST, OR EXPENSE OF ANY KIND
RELATED TO THESE MATERIALS OR ACCOMPANYING INFORMATION PROVIDED TO YOU BY MICROCHIP OR OTHER THIRD PARTIES, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBLITY OF SUCH
DAMAGES OR THE DAMAGES ARE FORESEEABLE. PLEASE BE AWARE THAT IMPLEMENTATION OF INTELLECTUAL PROPERTY PRESENTED HERE MAY REQUIRE A LICENSE FROM THIRD PARTIES.
TRADEMARKS:
The Microchip name and logo, the Microchip logo, Adaptec, AnyRate, AVR, AVR logo, AVR Freaks, BesTime, BitCloud, chipKIT, chipKIT logo, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, HELDO, IGLOO, JukeBlox,
KeeLoq, Kleer, LANCheck, LinkMD, maXStylus, maXTouch, MediaLB, megaAVR, Microsemi, Microsemi logo, MOST, MOST logo, MPLAB, OptoLyzer, PackeTime, PIC, picoPower, PICSTART, PIC32 logo, PolarFire, Prochip
Designer, QTouch, SAM-BA, SenGenuity, SpyNIC, SST, SST Logo, SuperFlash, Symmetricom, SyncServer, Tachyon, TempTrackr, TimeSource, tinyAVR, UNI/O, Vectron, and XMEGA are registered trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries.
APT, ClockWorks, The Embedded Control Solutions Company, EtherSynch, FlashTec, Hyper Speed Control, HyperLight Load, IntelliMOS, Libero, motorBench, mTouch, Powermite 3, Precision Edge, ProASIC, ProASIC Plus,
ProASIC Plus logo, Quiet-Wire, SmartFusion, SyncWorld, Temux, TimeCesium, TimeHub, TimePictra, TimeProvider, Vite, WinPath, and ZL are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BlueSky, BodyCom, CodeGuard, CryptoAuthentication, CryptoAutomotive, CryptoCompanion, CryptoController, dsPICDEM,
dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP, INICnet, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, memBrain, Mindi, MiWi, MPASM, MPF,
MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PowerSmart, PureSilicon, QMatrix, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O,
SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and
other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
The Adaptec logo, Frequency on Demand, Silicon Storage Technology, and Symmcom are registered trademarks of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2019, Microchip Technology Incorporated, All Rights Reserved.
© 2019 Microchip Technology Incorporated. All Rights Reserved. 23066 SEC4 Slide 90