Notary: A Device for Secure Transaction Approval Anish Athalye - - PowerPoint PPT Presentation

notary a device for secure transaction approval
SMART_READER_LITE
LIVE PREVIEW

Notary: A Device for Secure Transaction Approval Anish Athalye - - PowerPoint PPT Presentation

Notary: A Device for Secure Transaction Approval Anish Athalye Adam Belay Frans Kaashoek Robert Morris Nickolai Zeldovich MIT CSAIL 1 How to securely approve transactions? Users perform sensitjve transactjonal operatjons Bank


slide-1
SLIDE 1

Notary: A Device for Secure Transaction Approval

Anish Athalye Adam Belay Frans Kaashoek Robert Morris Nickolai Zeldovich MIT CSAIL

1

slide-2
SLIDE 2

How to securely approve transactions?

  • Users perform sensitjve transactjonal operatjons
  • Bank transfers
  • Cryptocurrency transactjons
  • Deletjng backups
  • Modifying DNS records

2

slide-3
SLIDE 3

Common solution: smartphone apps

  • Sufgers from isolatjon bugs

(e.g. jailbreaks)

Approval agent on smartphone

3

slide-4
SLIDE 4

Hardware wallets for transaction approval

TX Sign(TX) Display Buons

Ledger wallet

4

slide-5
SLIDE 5

Challenge: wallets need to isolate agents

Ledger app store: 50+ third-party agents

5

slide-6
SLIDE 6

Challenge: wallets need to isolate agents

Ledger app store: 50+ third-party agents

5

slide-7
SLIDE 7

Problems with existing hardware wallets

  • OS bugs
  • Over 10 found in Ledger and Trezor wallets
  • Potentjal hardware bugs
  • Shared hardware state could leak secrets (e.g. Spectre)

6

slide-8
SLIDE 8

Contribution: Notary

  • Agent separatjon architecture
  • Reset-based switching
  • Verifjed deterministjc start
  • Physical hardware wallet prototype

7

slide-9
SLIDE 9

Threat model

  • Some agents are malicious
  • Physical atuacks out of scope
  • Could be addressed by tamper-proof hardware

8

slide-10
SLIDE 10

Separation architecture provides isolation

Agent SoC Kernel SoC Runs third-party code No OS, full access to hardware Manages storage, agent switching User I/O Reset buon Storage uart rst USB

Notary separatjon architecture

9

slide-11
SLIDE 11

Separation architecture provides isolation

Agent SoC Kernel SoC Runs third-party code No OS, full access to hardware Manages storage, agent switching User I/O Reset buon Storage uart rst USB

Kernel SoC

9

slide-12
SLIDE 12

Separation architecture provides isolation

Agent SoC Kernel SoC Runs third-party code No OS, full access to hardware Manages storage, agent switching User I/O Reset buon Storage uart rst USB

Agent SoC

9

slide-13
SLIDE 13

Separation architecture provides isolation

Agent SoC Kernel SoC Runs third-party code No OS, full access to hardware Manages storage, agent switching User I/O Reset buon Storage uart rst USB

Connected only by UART (and reset wire)

9

slide-14
SLIDE 14

Separation architecture provides isolation

Agent SoC Kernel SoC Runs third-party code No OS, full access to hardware Manages storage, agent switching User I/O Reset buon Storage uart rst USB

Kernel resets Agent SoC

9

slide-15
SLIDE 15

Separation architecture provides isolation

Agent SoC Kernel SoC Runs third-party code No OS, full access to hardware Manages storage, agent switching User I/O Reset buon Storage uart rst USB

launch(): load agent code + data

9

slide-16
SLIDE 16

Separation architecture provides isolation

Agent SoC Kernel SoC Runs third-party code No OS, full access to hardware Manages storage, agent switching User I/O Reset buon Storage uart rst USB

Agent runs on Agent SoC, independently of Kernel SoC

9

slide-17
SLIDE 17

Separation architecture provides isolation

Agent SoC Kernel SoC Runs third-party code No OS, full access to hardware Manages storage, agent switching User I/O Reset buon Storage uart rst USB

exit(state): save state and terminate

9

slide-18
SLIDE 18

Desired property: noninterference

Agent A runs switch Agent B runs me

10

slide-19
SLIDE 19

Desired property: noninterference

steal A's secrets? Agent A runs switch Agent B runs me

10

slide-20
SLIDE 20

Desired property: noninterference

steal A's secrets? Agent A runs switch Agent B runs me

10

slide-21
SLIDE 21

Deterministic start ensures noninterference

  • Run before startjng any agent
  • Clears state in SoC (puts chip in deterministjc state)

11

slide-22
SLIDE 22

Deterministic start ensures noninterference

World 0 (secret = 0) World 1 (secret = 1)

11

slide-23
SLIDE 23

Deterministic start ensures noninterference

World 0 (secret = 0) World 1 (secret = 1) Agent A runs

11

slide-24
SLIDE 24

Deterministic start ensures noninterference

World 0 (secret = 0) World 1 (secret = 1) Agent A runs Determinisc start

11

slide-25
SLIDE 25

Deterministic start ensures noninterference

World 0 (secret = 0) World 1 (secret = 1) Agent A runs Determinisc start Agent B runs

11

slide-26
SLIDE 26

Deterministic start ensures noninterference

Determinisc start

11

slide-27
SLIDE 27

Challenge: completeness

  • Lots of state
  • Registers
  • Microarchitectural state: CPU caches, ...
  • RAM
  • SoC peripherals: UART, SPI, ...
  • Must work for all states

12

slide-28
SLIDE 28

Simple approaches fail

  • Reset pin
  • Clears minimal state necessary to restart
  • Power cycling
  • State takes minutes to decay (cold boot atuacks)

13

slide-29
SLIDE 29

Notary’s approach: use software

  • Reset returns control
  • Sofuware in boot ROM can

clear internal state

  • How to write this code?
  • Must clear every single bit
  • f internal state

CPU (PicoRV32) ROM (1 KB) RAM (128 KB) UART UART GPIO SPI clk rst

start code (clears state)

14

slide-30
SLIDE 30

Gate-level description captures all internal state

RTL (e.g. Verilog): all digital state is explicit

= ⇒ SMT-compatjble format (for symbolic circuit simulatjon)

15

slide-31
SLIDE 31

Verifying deterministic start for Notary’s SoC

16

slide-32
SLIDE 32

Verifying deterministic start for Notary’s SoC

/* no reset code */

16

slide-33
SLIDE 33

Verifying deterministic start for Notary’s SoC

/* no reset code */

error, state not cleared: soc.cpu.latched_rd

16

slide-34
SLIDE 34

Verifying deterministic start for Notary’s SoC

nop nop nop

16

slide-35
SLIDE 35

Verifying deterministic start for Notary’s SoC

nop nop nop

error, state not cleared: soc.cpu.cpuregs[1]

16

slide-36
SLIDE 36

Verifying deterministic start for Notary’s SoC

nop nop nop /* clear registers */ li x1, 0 /* ... */ li x31, 0

16

slide-37
SLIDE 37

Verifying deterministic start for Notary’s SoC

nop nop nop /* clear registers */ li x1, 0 /* ... */ li x31, 0

error, state not cleared: soc.cpu.mem_wdata

16

slide-38
SLIDE 38

Verifying deterministic start for Notary’s SoC

nop nop nop /* clear registers */ li x1, 0 /* ... */ li x31, 0 /* clear buffer */ sw zero, 0(zero)

16

slide-39
SLIDE 39

Verifying deterministic start for Notary’s SoC

nop nop nop /* clear registers */ li x1, 0 /* ... */ li x31, 0 /* clear buffer */ sw zero, 0(zero)

error, state not cleared: soc.ram.data[0]

16

slide-40
SLIDE 40

Verifying deterministic start for Notary’s SoC

nop nop nop /* clear registers */ li x1, 0 /* ... */ li x31, 0 /* clear buffer */ sw zero, 0(zero) /* clear ram */ la t0, _sram_start la t1, _sram_end loop: sw zero, 0(t0) addi t0, t0, 4 bne t0, t1, loop

16

slide-41
SLIDE 41

Verifying deterministic start for Notary’s SoC

nop nop nop /* clear registers */ li x1, 0 /* ... */ li x31, 0 /* clear buffer */ sw zero, 0(zero) /* clear ram */ la t0, _sram_start la t1, _sram_end loop: sw zero, 0(t0) addi t0, t0, 4 bne t0, t1, loop

error, state not cleared: soc.uart.cr0

16

slide-42
SLIDE 42

Verifying deterministic start for Notary’s SoC

nop nop nop /* clear registers */ li x1, 0 /* ... */ li x31, 0 /* clear buffer */ sw zero, 0(zero) /* clear ram */ la t0, _sram_start la t1, _sram_end loop: sw zero, 0(t0) addi t0, t0, 4 bne t0, t1, loop /* clear uart control register */ la t0, _uart0 sw zero, 0(t0)

16

slide-43
SLIDE 43

Verifying deterministic start for Notary’s SoC

nop nop nop /* clear registers */ li x1, 0 /* ... */ li x31, 0 /* clear buffer */ sw zero, 0(zero) /* clear ram */ la t0, _sram_start la t1, _sram_end loop: sw zero, 0(t0) addi t0, t0, 4 bne t0, t1, loop /* clear uart control register */ la t0, _uart0 sw zero, 0(t0)

deterministjc start verifjed! n = 180342 cycles, < 10 ms (mostly spent clearing RAM)

16

slide-44
SLIDE 44

Notary hardware and system software

  • Additjonal hardware: $8

(extra chips)

  • TCB: 4000 LOC

(mostly drivers)

Notary prototype

17

slide-45
SLIDE 45

Notary agent: Bitcoin

Bitcoin app (lefu) and agent (right)

18

slide-46
SLIDE 46

Notary agent: web-app approval

Web app (lefu) and agent (right)

19

slide-47
SLIDE 47

Evaluation summary: Notary is practical

Notary’s design prevents bugs while preserving developer and user experience.

(see paper)

20

slide-48
SLIDE 48

Related work

  • Non-wallet security devices [iOS enclave, Yubikey]
  • Verifjed kernels [SeL4, Hyperkernel, Nickel, CertjKOS]
  • Verifjed hardware [Kami, Hyperfmow]

(see paper)

21

slide-49
SLIDE 49

Conclusion

  • Notary separatjon architecture
  • Reset-based switching: clearing state between switching agents
  • Verifjed deterministjc start: ensuring state clearing is correct
  • Notary prototype
  • RISC-V-based prototype
  • 2 agents: Bitcoin, web-app approval

anish.io/notary

22