Toward a methodology for Unified Verification of HW/SW Co-designs - - PowerPoint PPT Presentation

toward a methodology for unified verification of hw sw co
SMART_READER_LITE
LIVE PREVIEW

Toward a methodology for Unified Verification of HW/SW Co-designs - - PowerPoint PPT Presentation

Toward a methodology for Unified Verification of HW/SW Co-designs Building a bridge between two worlds Florian Lugou <florian.lugou@telecom-paristech.fr> Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr> Aurlien


slide-1
SLIDE 1

Toward a methodology for Unified Verification of HW/SW Co-designs

Building a bridge between two worlds

Florian Lugou

<florian.lugou@telecom-paristech.fr>

Ludovic Apvrille

<ludovic.apvrille@telecom-paristech.fr>

Aurélien Francillon

<aurelien.francillon@eurecom.fr>

slide-2
SLIDE 2

2

3/10/2015

Institut Mines-Télécom PROOFS 2015

Contents

Why? SMART Why Hardware/Software co-designs? Why unified verification? Don’t we already do that? Successive verification of HW & SW Unified verification SMASHUP What is it? Using ProVerif Limitations and discussion Demo

slide-3
SLIDE 3

3

3/10/2015

Institut Mines-Télécom PROOFS 2015

Contents

Why? SMART Why Hardware/Software co-designs? Why unified verification? Don’t we already do that? Successive verification of HW & SW Unified verification SMASHUP What is it? Using ProVerif Limitations and discussion Demo

slide-4
SLIDE 4

4

3/10/2015

Institut Mines-Télécom PROOFS 2015

SMART

remote attestation

Secure and Minimal Architecture for (Establishing a Dynamic) Root of Trust

Verifier Prover

Generate challenge Compute fingerprint Accept or Reject challenge fingerprint

slide-5
SLIDE 5

5

3/10/2015

Institut Mines-Télécom PROOFS 2015

SMART

a HW/SW co-design

Processor Memory Backbone Data Program Prover Verifier ROM Key K attests X

slide-6
SLIDE 6

6

3/10/2015

Institut Mines-Télécom PROOFS 2015

SMART

Bringing formal guarantees

We are here interested in SW-level attacks (no side channel attack, etc.). Formal verification of SMART raises challenges: Security of the scheme depends on secrecy of K. Vulnerabilities in SW (ROM) could endanger secrecy. Custom HW must be taken into account. Security depends on HW features such as interrupt masking.

slide-7
SLIDE 7

7

3/10/2015

Institut Mines-Télécom PROOFS 2015

Growing Interest in HW/SW Co-designs

HW modification is costly but: Mass production makes HW customization affordable. Some HW modifications are cheaper than others. In some cases, strong security guarantees can’t be achieved in pure SW. It’s because HW modification is costly that formally verifying it is essential.

slide-8
SLIDE 8

8

3/10/2015

Institut Mines-Télécom PROOFS 2015

Verifying both Hardware and Software

Different models and methods

SW spec source assembly binary HW impl netlist HDL spec HW HW modelisation HW prover HW proof HW prop HW model SW integration assumed HW model SW prover SW proof SW prop SW model

Different methods of verification. SW: symbolic execution, taint propagation, model checking, . . . HW: model checking, equivalence checking, . . .

slide-9
SLIDE 9

9

3/10/2015

Institut Mines-Télécom PROOFS 2015

Verifying both Hardware and Software

But close interactions

However, HW and SW may have close interactions: SW and HW parts involved in a protocol; HW impacts the way SW is executed. This is particularly true for security designs.

slide-10
SLIDE 10

10

3/10/2015

Institut Mines-Télécom PROOFS 2015

Contents

Why? SMART Why Hardware/Software co-designs? Why unified verification? Don’t we already do that? Successive verification of HW & SW Unified verification SMASHUP What is it? Using ProVerif Limitations and discussion Demo

slide-11
SLIDE 11

11

3/10/2015

Institut Mines-Télécom PROOFS 2015

Successive verification of HW & SW

The idea

Independant Verification

SW spec source assembly binary HW impl netlist HDL spec HW SW integration HW modelisation assumed HW model SW prover HW prover SW proof HW proof SW prop HW prop SW model HW model

slide-12
SLIDE 12

11

3/10/2015

Institut Mines-Télécom PROOFS 2015

Successive verification of HW & SW

The idea

Successive Verification

SW spec source assembly binary HW impl netlist HDL spec HW SW integration HW prover HW model prover proof prop refinement proof whole model

1 2

slide-13
SLIDE 13

12

3/10/2015

Institut Mines-Télécom PROOFS 2015

Successive verification of HW & SW

The idea

Manual expression of a formal model that: enables HW to be proved correct against this model, enables the verifier to express properties in this formal environment, and formalizes the effects of SW instructions on the model. The presence of the verifier is needed to bridge the semantic gap between HW and SW

slide-14
SLIDE 14

13

3/10/2015

Institut Mines-Télécom PROOFS 2015

Successive verification of HW & SW

Feasibility and drawbacks

Is it feasible? Finding such model is tedious and involves a lot of manual effort. Feasible when SW & HW are disjoint enough to find a simple formal interface. How could we automate this?

slide-15
SLIDE 15

14

3/10/2015

Institut Mines-Télécom PROOFS 2015

Unified verification

The idea

Successive Verification

SW spec source assembly binary HW impl netlist HDL spec HW SW integration HW prover HW model prover proof prop refinement proof whole model

slide-16
SLIDE 16

14

3/10/2015

Institut Mines-Télécom PROOFS 2015

Unified verification

The idea

Unified Verification

SW spec source assembly binary HW impl netlist HDL spec HW SW integration HW modelisation prover proof prop HW language model HW model whole model

slide-17
SLIDE 17

15

3/10/2015

Institut Mines-Télécom PROOFS 2015

Unified verification

The idea

Use a formal representation of the HDL. Express the effect of each HDL statement, so that the composition of these is a formal representation of the whole. May restrict the scope of designs. Create an interface to integrate software.

slide-18
SLIDE 18

16

3/10/2015

Institut Mines-Télécom PROOFS 2015

Unified verification

ex: loosely coupled designs

E.g: HW and SW parts using a protocol to communicate 1 2 agents communicate through a clear interface HW and SW describe the behaviour of each agent doesn’t really matter whether it’s HW or SW Use a common language (as SystemC) and SW analysis tools

  • 1. D. Kroening et al.,

Formal Verification of SystemC by Automatic Hard- ware/Software Partitioning

slide-19
SLIDE 19

17

3/10/2015

Institut Mines-Télécom PROOFS 2015

Unified verification

ex: tightly coupled designs

E.g.: Customizing core processor logic HW customizes the way SW must be modelled would require low level representation of HW automated extraction of SW concepts (program counter, stack frames, etc.) is nowaday mostly unfeasible SW representation that could be linked to a low level representation of HW: binary format Find a compromise between exhaustivity of HW description and scalability of the proof?

slide-20
SLIDE 20

18

3/10/2015

Institut Mines-Télécom PROOFS 2015

Contents

Why? SMART Why Hardware/Software co-designs? Why unified verification? Don’t we already do that? Successive verification of HW & SW Unified verification SMASHUP What is it? Using ProVerif Limitations and discussion Demo

slide-21
SLIDE 21

19

3/10/2015

Institut Mines-Télécom PROOFS 2015

SMASHUP: What is it?

Simple Modelling and Attestation of Software and Hardware Using Proverif. A python compiler from HW + SW to ProVerif specification. SW is provided as assembly language (MSP430). HW is described as a list of standard modules. Properties are expressed as secrecy properties. The specification produced can be checked with ProVerif.

slide-22
SLIDE 22

20

3/10/2015

Institut Mines-Télécom PROOFS 2015

SMASHUP: What is it?

SW spec source assembly binary HW impl netlist HDL spec HW SW integration HW modelisation prover proof prop HW language model HW model whole model

slide-23
SLIDE 23

20

3/10/2015

Institut Mines-Télécom PROOFS 2015

SMASHUP: What is it?

SW spec source assembly binary HW impl netlist HDL spec HW SW integration HW modelisation prover proof prop HW language model HW model whole model SMASHUP python modules ProVerif

slide-24
SLIDE 24

21

3/10/2015

Institut Mines-Télécom PROOFS 2015

Using ProVerif

Introduction

“ProVerif is a tool for automatically analyzing the security of cryptographic protocols.” automatically: simple reasoning with Horn clauses

i

pi

  • r
  • i

pi → q

security: naturally handles secrecy and authenticity properties protocols: multiple processes sending and receiving messages Motivations: simple logic and security orientation

slide-25
SLIDE 25

22

3/10/2015

Institut Mines-Télécom PROOFS 2015

Using ProVerif

Reasoning with Horn clauses

Works on predicates. E.g: attacker(var) means the attacker knows value of var. Horn clauses as logic bases. For instance: mess(ch, m) ∧ attacker(ch) → attacker(m) and attacker(ch) ∧ attacker(m) → mess(ch, m). Verification is based on unification of clauses: attacker(m) → attacker(f(m)) and attacker(f(g(m))) → attacker(m), results in attacker(g(m)) → attacker(m).

slide-26
SLIDE 26

23

3/10/2015

Institut Mines-Télécom PROOFS 2015

Using ProVerif

Application to verification of low-level SW

new predicate: state(pc, s) means “a state where PC equals pc and system is in state s is reachable” effect of an instruction: state(pc, s) → state(pc′, s′) Memory is modelled as an array of variables. Example of HW modification (adding interrupts): state(pc, s, 1) → attacker(s) and attacker(s′) ∧ state(pc, s, 1) → state(pc + 1, s′, 1).

slide-27
SLIDE 27

24

3/10/2015

Institut Mines-Télécom PROOFS 2015

Limitations and discussion

Working with concrete types: No representation of numbers in ProVerif. Simple arithmetic operations increase complexity (ProVerif only allows constructors or reductions). Idea: interface ProVerif with theory solvers (bit vector, etc.). Working at binary level (shellcodes, ROP , etc.). Re-work the HW Description Language to enable finer-grained description of HW designs.

slide-28
SLIDE 28

25

3/10/2015

Institut Mines-Télécom PROOFS 2015

Contents

Why? SMART Why Hardware/Software co-designs? Why unified verification? Don’t we already do that? Successive verification of HW & SW Unified verification SMASHUP What is it? Using ProVerif Limitations and discussion Demo

slide-29
SLIDE 29

26

3/10/2015

Institut Mines-Télécom PROOFS 2015

Conclusion

Summing it up: growing interest for HW/SW Co-design need for a method of unified verification a first step: SMASHUP Thank you !

slide-30
SLIDE 30

27

3/10/2015

Institut Mines-Télécom PROOFS 2015

Questions?

Any Questions?