RISC V and Security: How, When and Why Helena Handschuh Rambus - - PowerPoint PPT Presentation

risc v and security how when and why
SMART_READER_LITE
LIVE PREVIEW

RISC V and Security: How, When and Why Helena Handschuh Rambus - - PowerPoint PPT Presentation

RISC V and Security: How, When and Why Helena Handschuh Rambus Security Technologies Fellow RISCV Security Standing Committee Chair CHES 2019 @ Atlanta 08/26/2019 Outline RISCV Foundation Security Standing Committee Creation and


slide-1
SLIDE 1

RISC V and Security: How, When and Why

CHES 2019 @ Atlanta 08/26/2019

Helena Handschuh Rambus Security Technologies Fellow RISCV Security Standing Committee Chair

slide-2
SLIDE 2

2

  • RISCV Foundation
  • Security Standing Committee Creation and Charter
  • Security Task Group Charters and status update
  • Crypto Extensions TG
  • Trusted Execution Environment TG
  • Taxonomy and related DARPA SSITH activities
  • Speaker Program
  • Academic and industry initiatives around RISCV
  • Open problems and research directions

Outline

slide-3
SLIDE 3

3

  • RISC-V (pronounced “risk-five”) is a free and open ISA enabling a new era of

processor innovation through open standard collaboration.

  • Founded in 2015
  • 300+ member organizations and individual members
  • open, collaborative community of software and hardware innovators
  • RISCV base ISA was born in academia and research (Berkeley)
  • A new level of free, extensible software and hardware freedom on architecture
  • Paving the way for the next 50 years of computing design and innovation.
  • Members of the RISC-V Foundation have access to and participate in the development
  • f the RISC-V ISA specifications and extensions and related HW / SW ecosystem.

The RISCV Foundation

http://riscv.org

slide-4
SLIDE 4

4

  • RISC-V (pronounced “risk-five”) is a free and open ISA enabling a new era of

processor innovation through open standard collaboration.

  • Founded in 2015
  • 300+ member organizations and individual members
  • open, collaborative community of software and hardware innovators
  • RISCV base ISA was born in academia and research (Berkeley)
  • A new level of free, extensible software and hardware freedom on architecture
  • Paving the way for the next 50 years of computing design and innovation.
  • Members of the RISC-V Foundation have access to and participate in the development
  • f the RISC-V ISA specifications and extensions and related HW / SW ecosystem.

The RISCV Foundation

http://riscv.org

slide-5
SLIDE 5

5

  • Creative Commons Attribution 4.0 International License.
  • This document is a derivative of “The RISC-V Instruction Set Manual, Volume I: User-Level ISA Version 2.1” released

under the following license: c 2010–2017 Andrew Wate term rman, n, Yunsup up Lee, David d Patt tterson, n, Krs rste Asano novi´c. Creative Commons Attribution 4.0 International License.

“The RISC-V Instruction Set Manual, Volume I: User-Level ISA, Document Version 2.2”, Editors Andrew Waterman and Krste Asanovi´c, RISC-V Foundation, May 2017.

slide-6
SLIDE 6

6

RISCV Base Instruction Set Architecture and its Extensions

  • Base ISA:
  • 32 bit
  • 32 bit (Embedded)
  • 64 bit
  • 128 bit
  • Extensions:
  • M: Multiplication/division
  • A: Atomic instructions
  • F: Single Precision Floating Point
  • D: 2P Floating Point
  • Q: 4P Floating Point
  • L: Decimal Floating Point
  • C: Compressed Instructions
  • B: Bit Manipulation
  • V: Vectors Extensions
slide-7
SLIDE 7

7

“The RISC-V Instruction Set Manual, Volume I: User-Level ISA, Document Version 20190608-Base-Ratified”, Editors Andrew Waterman and Krste Asanovi ́c, RISC-V Foundation, March 2019. Creative Commons Attribution 4.0 International License.

slide-8
SLIDE 8

8

145  236 pages; shows Ratified parts; additional extensions

slide-9
SLIDE 9

9

“The RISC-V Instruction Set Manual, Volume II: Privileged Architecture, Document Version 20190608-Priv-MSU-Ratified”, Editors Andrew Waterman and Krste Asanovi ́c, RISC-V Foundation, June 2019.

slide-10
SLIDE 10

10

Defines Machine, Supervisor and Hypervisor modes

slide-11
SLIDE 11

11

  • 65 cores available here:
  • https://riscv.org/risc-v-

cores/

  • Note that none of these cores/SoCs

have passed the in in-develo lopment t RISC-V compliance suite.

RISC V Cores / SoCs

slide-12
SLIDE 12

12

  • Simul

ulators

  • Objec

ject toolcha hain

  • Debu

bugg gging ng

  • C compi

piler ers s and d librar aries es

  • Boot load

ader ers s and d moni nitors

  • OS and

d OS kernel nels

  • Compi

piler ers s and d runtimes es for other her langua uages es

  • IDEs
  • ……… Security (!)

RISC RISC-V Soft Software Ecos

  • system Overview
slide-13
SLIDE 13

13

January 2018… the o..s… moment

slide-14
SLIDE 14

14

January 2018… the oops(!) moment

slide-15
SLIDE 15

15

  • July 2, 2018
  • “RISC-V Foundation Announces Security Standing Committee, Calls Industry To

Join In Efforts”

  • “Security

y is one ne of the he fund undamental issues s in n our ur conn nnec ected ed worl

  • rld. The RISC-V

community is committed to pushing the industry forward through innovative approaches and new thinking to addr ddress ss existing and nd emer erging thr hrea eats” (Helena)

  • “It is an exciting time to witness the advent of a new

new compute e pl platfor

  • rm tha

hat ha has s forma rmal met ethod

  • ds

s at its foun undation

  • n for

r proc proces essor sor corr rrectness ess and nd secu curity,” …“RISC-V is a simple, free and open ISA that is an ideal vehicle for research in form rmally y assured d secu curity and nd secure ha hardware e de develop

  • pment for everything from consumer devices to national

security applications.” (Joe Kiniry)

Creation of the RISCV Security Standing Committee

slide-16
SLIDE 16

16

  • Security Standing Committee Charter:
  • Promote RISC-V as an ideal vehicle for the security community
  • Liaise with other internal RISC V committees and with external security committees
  • Create an information repository on new attack trends, threats and countermeasures
  • Identify top 10 open challenges in security for the RISC-V community to address
  • Propose security committees (Marketing or Technical) to tackle specific security topics
  • Recruit security talent to the RISC-V ecosystem (e.g., into committees)
  • Develop consensus around best security practices for IoT devices and embedded systems

Security Standing Committee

chair: Helena Handschuh, Rambus vice-chair: Joe Kiniry, Galois website: https://lists.riscv.org meetings roughly every other week, alternating between “Speaker Program” and “Business Meeting”

slide-17
SLIDE 17

17

  • Cha

hart rter er:

  • pro

propose se ISA ex extensi sions s to to the he vector r ex exten ensi sion

  • ns for
  • r the

he sta standardiz ized ed and nd secure ex exec ecutio ion of

  • f

pop popula lar r cryptog

  • graphy algorit

ithms. .

  • To
  • ensu

sure tha hat pro processo sor r imp mple lementers s are re abl ble to to sup upport rt a wi wide e ra range e of

  • f pe

perf rformance e and nd sec ecuri rity ty lev evel els s the he comm

  • mmittee wi

will ll crea eate a ba base se and nd an n ex exten ended ed spec pecifi ificati tion. .

  • The

he ba base se wi will ll be be comp

  • mpri

rise sed of

  • f low
  • w-cost ins

nstru ructi tions tha hat t are e us usefu ful l for

  • r the

he accele lerati tion

  • n of
  • f com
  • mmon
  • n

algorit ithms.

  • The

he ext exten ended ed spec pecifi ificati tion

  • n wi

will ll inc nclu lude grea eater r fun uncti tionali lity ty, re rese serv rve e enc ncod

  • dings for
  • r mo

more e alg lgorit rithms, s, and nd wi will ll fa facili litate imp mproved sec ecurit ity of

  • f ex

exec ecutio ion and nd hi higher pe perf rform rmance. e.

  • The

he scope e wi will ll inc nclu lude sy symmetr tric ic and nd asy symmetric ic cryptographic ic alg lgorit rithms and nd re rela lated pri primiti tives es suc uch as me mess ssage di digests.

  • s. The

he com

  • mmit

ittee e wi will ll also so ma make ISA pro proposa sals ls re regardin ing the he us use e of

  • f ra

random bi bits ts and nd sec ecure key ey ma management.

Cryptographic Extensions Task Group

Chair: Richard Newell, Microchip, Vice-chair: Derek Atkins, SecureRF

slide-18
SLIDE 18

18

Cryptographic Extensions Task Group

Chair: Richard Newell, Microchip, Vice-chair: Derek Atkins, SecureRF

  • Approach based on vector extensions
  • AES instructions
  • 128, 192, 256; done
  • SHA-2 instructions
  • SHA-256 and SHA-512; almost done
  • Need to convert AES and SHA-2 into formal specs now…
  • Prototyping Public Key Crypto algorithms
  • Long integer arithmetic
  • Implementation proof of concept
  • Future directions:
  • More light-weight approach: could recommend subset of vector extensions only
  • XCrypto (Bristol): proposed scalar instructions, rotates, etc. to have SW run faster
  • Paris Telecom also interested in same type of research
slide-19
SLIDE 19

19

Char arter er:

  • To defin

efine e an archi hitec ectur ure spec ecific fication

  • n to supp

ppor

  • rt trusted

ed ex exec ecution

  • n env

nviron

  • nmen

ent for RISC-V proces esso sors

  • To provide

de necess essary implem emen entation gu guide deline nes and/ d/or recommend ndations ns to assi sist hardw dwar are e devel eloper pers s to real alize e the e spec ecific fication

  • n
  • To ena

nabl ble e the e devel elopm pment of necess essar ary compo pone nents, s, such h as compi piler er, simul ulation n model del, hardw dwar are, e, and d softw ftwar are compo ponen ents s to suppo pport the e speci ecific fication

  • n

Trusted Ex Execution En Environment Tas ask Group Chair: ir: Joe

  • e Xie,

ie, Nvid idia Vic Vice-chair: Nic ick Koss

  • ssifi

fidis, , Fort

  • rth
slide-20
SLIDE 20

20

  • HW:
  • PMP Physical Memory Protection based on Privilege spec 1.12
  • IO PMP proposal 0.1
  • Next: Control Flow Integrity (CFI) ext.
  • SW:
  • Secure Monitor architecture
  • Secure boot architecture: signature verification + optional extensions for key

management, certs, revocation, attestation

  • TEE APIs: OS-TA, App-TA, TA-TA, TA-SecMon, Attestation of a TA, TEE/TA Mgmt.

Trusted Ex Execution En Environment Tas ask Group Chair: ir: Joe Joe Xi Xie, e, Nvid idia Vic Vice-chair: Nic ick Koss

  • ssifi

fidis, , For

  • rth
slide-21
SLIDE 21

21

  • “Lando” : a formal specification language for HW design with 4 sublanguages:
  • A system spec language
  • Architecture language
  • Product line engineering language
  • Security property specification language
  • Domain Model for specifying security properties.
  • Ex: formalization of the NIST CWEs related to buffer/memory errors

Taxonomy and related DARPA SSITH activities SSC Vice-Chair: Joe Kiniry, Galois

slide-22
SLIDE 22

22

  • BESSPIN: a tool suite for formal reasoning
  • GRIFT: subsystem of tool suite already contributed to RISCV Formal TG
  • Platform specs and security-enriched ISA:
  • Secure voting machine platform spec includes security properties/guarantees
  • Built on RISCV; demonstrated @ Defcon this month
  • 6 other platform specs based on RISCV SoCs
  • Rocket, Boom, Piccolo, Flute, Bassoon, Riscy

Taxonomy and related DARPA SSITH activities SSC Vice-Chair: Joe Kiniry, Galois

slide-23
SLIDE 23

23

  • Ge

Gern rnot Heis iser, Data61 1 on

  • n Timin

ing Attacks s and nd Aug ugmented ISA

  • Dayeol Lee,

ee, Berk erkeley on

  • n the

e Key eystone e proj roject (TEE fra ramework)

  • Jose
  • se Renau, Esper

eranto

  • on
  • n Timin

ing Attack Miti itigatio ion Idea deas

  • Jon
  • n Ge

Geater er, Tha hale les on

  • n ins

nsights ts into

  • Trustz

tzone and nd TEEs s

  • Ni

Nicole le Fern rn, Tort

  • rtuga Log
  • gic

ic on

  • n Securit

ity-Orie iented Ver erific ficati tion

  • n Tool
  • ols

s

  • Danie

iel l Ge Genkin in on

  • n For
  • resh

eshadow

  • Ste

tefan Mangard, IAIK K Gr Graz on

  • n ISA ex

extensi sion

  • ns (SCA, CF

CFI, sec ecure me memory ry acces ess) s)

  • Be

Ben Marshall, l, Br Bris istol l on

  • n Xcry

rypto ISA ex exten ensi sions

  • Your
  • ur na

name e he here

SSC Speaker Program

slide-24
SLIDE 24

24

Other ongoing security initiatives: security contests

  • Hack@Dac2018 (independent from RISCV Foundation)
  • HW bug hunting;
  • Systematic bug construction for bug hunting
  • Organized on RISCV processors
  • Some “native” bugs were also found in some RISCV processors
  • Results available online
slide-25
SLIDE 25

25

Other ongoing security initiatives: security contests

https://riscv.org/2019/07/risc-v-softcpu-core-contest/

  • Thales and Microchip announced a hackathon on July 15th:
  • Soft core (verilog) running on a Microchip FPGA; opensource submissions
  • Contest rules on the website riscv.org; propose security countermeasures
  • Based on Zephyr; can make limited changes to the compiler
  • September 15th deadline for submissions
  • Need to protect against 5 very classical attacks:
  • Corrupting a function pointer on the heap
  • Buffer overflow on the stack to corrupt longjump buffer
  • Buffer overflow on the stack to change the return address
  • Corrupting a function pointer on the stack
  • Corrupting a C structure holding a function pointer
slide-26
SLIDE 26

26

  • RISC-V extensions for security
  • IAIK Graz: side-channel attacks, control flow integrity, secure memory access
  • U Bristol: XCrypto ISA extensions
  • Telecom ParisTech expressed interest
  • CEA Leti: secure processor with authenticated/encrypted resources
  • Busses, memories, datapath, instruction path
  • See RISCV Zurich workshop talk

Academic and national lab initiatives

slide-27
SLIDE 27

27

  • Sanctum, MIT and Keystone, Berkeley
  • OpenTitan, Google
  • Multizone TEE API, HexFive
  • CryptoManager Root of Trust, Rambus
  • see demo next door at coffee/lunch
  • Joel Wittenauer invited talk at FDTC 2019
  • DPA-resistant RISCV CPU, Rambus
  • Mike Hutter, Elke DeMulder, Samatha Gummalla
  • RISCV Summit 2018, DAC 2019 invited talk, Lorentz WS 2019 (next month)

Secure Enclaves initiatives based on RISCV

slide-28
SLIDE 28

28

  • Problem statement:
  • Side-channel Information leakage:
  • Power attacks (1999), electro-magnetic attacks (1999), differential fault attacks (1997),…
  • More recently discovered cross-layer exploits:
  • Spectre (2018), Meltdown (2018), Foreshadow (2019)
  • Spoiler, TLBleed, CacheBleed, RowHammer, CLKScrew
  • More to come...
  • How to address: at ISA level? Platform spec level?
  • How to do better than proprietary micro-architectures?

Open problems: How to mitigate micro-architectural flaws?

slide-29
SLIDE 29

29

Some existing proposals:

  • Augmented ISA – Gernot Heiser Data61
  • (cache) Flush instructions, memory partitioning instructions
  • Timing attack mitigations – Jose Renau Esperanto
  • Security classification tags
  • Speculative Taint Tracking (STT) – Chris Fletcher Univ Illinois
  • Tainted registers and corresponding update policies
  • Secure Enclaves Workshop, Berkeley 2019

Open problems: Cache timing side-channels mitigation

slide-30
SLIDE 30

30

  • RISCV Formal specs and Compliance test suite: “functional spec compliance”
  • How to certify for security when most security aspects are micro-architecture and implementation related and not

ISA related?

  • What (if any) security levels should be defined?
  • SESIP (NXP, Brightsight, GlobalPlatform)?
  • PSA (ARM)?
  • Open-source versus Security Certification?
  • Loosing points in CC JHAS/JIL table?
  • Open-source versus obscurity?
  • Formal verification of HW security properties
  • Lando, Besspin, Grift
  • HW verification tools or SW source code analysis which trace and enforce security properties
  • Not just RISCV-related
  • Tortuga Logic Radix, FortifyIQ TraceIQ, Secure-IC Virtualyzr, Riscure True Code

Security Certification/Assurance for RISCV based systems?

slide-31
SLIDE 31

31

  • Address at vector extension level?
  • Specific MatrixVectorMul? InnerProduct?
  • Is this necessary? useful? sufficient?
  • Any specific PQ extensions for lattices, codes, supersingular isogenies?

RISCV and Post-quantum Crypto?

slide-32
SLIDE 32

32

  • Open source approach is great
  • Many new opportunities
  • Thriving RISCV ecosystem
  • How to address security in the RISCV world is still a challenging question
  • Most serious security issues result from micro-arch flaws
  • Many good ideas and initiatives already
  • Still many open problems to work on

Call to action!

Conclusion

slide-33
SLIDE 33

33

Thank you!

https://riscv.org Helena.Handschuh@cryptography.com