20
L C S AEGIS Secure Processor G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas

AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

L C S

AEGIS Secure Processor

G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas

Page 2: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Cases for Physical Security

• Applications on untrusted hosts with untrusted owners– Digital Rights Management (DRM), Software licensing– Distributed computation on Internet– Mobile agents

• New challenges– Untrusted OS – Physical attacks

Make Illegal Copies Incorrect Results;

Break the System

Music/Movie

Software

Program

Distributed Computing,Peer-to-Peer Network

Page 3: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Conventional Tamper-Proof Packages

• Processing system in a tamper-proof package (IBM 4758)– Expensive: many detecting sensors– Inflexible: cannot upgrade the system in the package

$2,690in 2001

Memory

99MHz 486

Source: IBM website

Page 4: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Single-Chip Secure Processors

Trusted Environment

Memory

I/O

Check Integrity,Encrypt

• Only trust a single chip: tamper-resistant– Off-chip memory: verify the integrity and encrypt– Untrusted OS: identify a core part or protect against OS attacks

• Cheap, Flexible, High Performance

Identify orProtect against

UntrustedOS

Page 5: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

L C S

AEGIS: High-Level Architecture

Page 6: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Secure Execution Environments

• Tamper-Evident (TE) environment – Guarantees a valid execution and the identity of a program; no privacy– Any software or physical tampering to alter the program behavior

should be detected

• Private Tamper-Resistant (PTR) environment– TE environment + privacy– Encrypt instructions and data– Assume programs do not leak information via memory access patterns

• Implementation– Either have a trusted part of the OS or completely untrust the OS– Secure context manager, encryption and integrity verification

Page 7: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Page 8: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Program Start-Up

• ‘enter_aegis’: TE mode– Start protecting the integrity

of a program – Compute and store the hash

of the stub code: H(Prog)Tampering of a program

results in a different hash– Stub code verifies the rest

of the code and data

• ‘set_aegis_mode’– Start PTR mode on top of

the TE mode

.textenter_aegisEKey1 = 0xA4523BC2E435D;EKey2 = 0xB034D2C654F32;E1Msg = …Secret=GetSecret(Challenge);Key1=Decrypt(EKey1, Secret);Key2=Decrypt(EKey2, Secret);CheckMAC(Key1, Key2, MAC);Msg = Decrypt(E1Msg, Key1);E2Msg = Encrypt(Msg, Key2);Output(E2Msg);

Secret=GetSecret(Challenge);Key1=Decrypt(EKey1, Secret);Key2=Decrypt(EKey2, Secret);CheckMAC(Key1, Key2, MAC);Msg = Decrypt(E1Msg, Key1);E2Msg = Encrypt(Msg, Key2);Output(E2Msg);

enter_aegis code_end

H(Prog)

Protected Table

SHA-1

Stub Segment

Program

Page 9: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

On-Chip Protection

• Registers on interrupts– SCM saves Regs on interrupts,

and restore on resume

• On-chip caches– Need to protect against

software attacks– Use SPID tags and virtual

memory address – Allow accesses from the cache

only if both SPID and the virtual address match

Standard Processor

L1Instruction

cache

On-Chip L2Cache

Processor Core

L1Datacache

Regs

…Regs

…H(Prog)

…SPIDSPID

Tags

SPID Tags

SPID Tags

Interrupt

Resume

SCM

Off-Chip Memory

Page 10: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Memory Encryption

write

read

Processor

Trusted State

Fast hardware encryption based onone-time pads

Hides decryption latency

ENCRYPT

DECRYPT

Untrusted RAM

program

Page 11: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

write

read

Processor

Trusted State

Untrusted RAM

program

Memory Encryption

ENCRYPT

DECRYPT

VERIFY

Can’t simply encrypt and MAC on writes,and check MAC’s on reads

Replay attacks

0x45: E(124), MAC(124, 0x45)

Hash-tree and log schemes to verify integrity

E(120), MAC(120, 0x45)

Page 12: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Message Authentication

• Processor Other systems– The processor signs a message for a program

sign_msg M: {H(Prog), M}SKproc

– Unique for each program because H(Prog) is always included

• Other systems Processor– Embed the user’s public key in a program– Incoming messages are signed with the user’s private key

Program with Puser

{Message}Suser

{H(Prog), Message}Sproc

Page 13: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

L C S

Applications

Page 14: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Certified Execution

• Execution certified by the secure processor– Dispatcher provides a program and data– Processor returns the results with the signature

• Requires the TE environment

Job Dispatcher Processor

Program, Data,PKm

① Compute H(Program)

⑦ Verify signature⑧ Verify hash

SKp, PKp, {PKp}SKm

③ Start: enter_aegis: Processor computes H(Program)

④ Execute Out

⑤ Sign: sign_msg

② Program

program executes

⑥ {H(Program), Out}SKp, {PKp}SKm

Page 15: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Digital Rights Management

• Protects digital contents from illegal copying– Trusted software (player) on untrusted host– Content provider only gives contents to the trusted player

• Requires the PTR environment

Content Provider Customer’s Processor

Secure Player, Content,

PKm

SKp, PKp, {PKp}SKm

① Compute H(Player)

⑩ Verify signatures and hash

③ Start: enter_aegis, set_aegis_mode PTR Compute h=H(Player)

⑫ Decode and play

④ seed=random(…)⑦ nonce⑥ Pick random nonce

⑧ sign_msg(nonce)⑨ {h, nonce}SKp, {PKp}SKm

⑪ Order / deliver content

② Secure Player

⑤ Set up SSL connection

Analog Output

Page 16: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Related Research

• XOM (eXecution Only Memory): David Lie et al– Stated goal: Protect integrity and privacy of code and data– Operating system is completed untrusted– Memory integrity checking does not prevent replay attacks– Memory encryption only provides partial privacy– Privacy is expensive but not necessary for all applications

• Palladium/NGCSG: Microsoft– Stated goal: Protect from software attacks– Combination of hardware and software mechanisms– Adds "curtained" memory to avoid DMA attacks– Uses a security kernel (Nexus)– Memory integrity and privacy are assumed (only software attacks).

Page 17: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Summary

• Physical attacks are becoming more prevalent– DRM, software licensing, distributed computing, etc.

• Single-chip secure processors provide trusted execution environments with acceptable overhead– Tamper-Evident environment, Private Tamper-Resistant environment– Simulation results show 5-15% overhead for TE, 10-25% overhead for

PTR processing

• Significant development effort underway– Complete AEGIS architecture description (ICS’03)– FPGA/ASIC implementation of AEGIS processor

Page 18: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

L C S

Performance

Page 19: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Performance Implication: TE processing

gcc gzip mcf twolf vortex vpr applu art swim 0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Nor

mal

ized

IPC

CHTreeLHash

• Major performance degradation is from off-chip integrity checking– Start-up and context switches are infrequent– no performance overhead for on-chip tagging

Log Hash w/ infrequent checks:Worst case 15% degradationMost cases < 5% degradation

Hash Trees:Worst case 45% degradationMost cases < 25% degradation

1MB L2 Cachewith 64B blocks

Page 20: AEGIS Secure Processor - People | MIT CSAILpeople.csail.mit.edu/suh/slides/oxygen03.pdf · G. Edward Suh, Dwaine Clarke, Blaise Gassend, Marten van Dijk, Srinivas Devadas. G. Edward

Oxygen Alliance Annual Meeting — June 11-12, 2003G. Edward Suh — MIT Lab for Computer Science

Performance Implication: PTR processing

• Major performance degradation is from off-chip integrity checking and encryption

gcc gzip mcf twolf vortex vpr applu art swim 0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

Nor

mal

ized

IPC

CHTree+DirectLHash+OTP

Hash Trees w/ CBC encryption:Worst case 55% degradationMost cases < 40% degradation

Log Hash w/ OTP encryption:Worst case 25% degradationMost cases < 15% degradation

1MB L2 Cachewith 64B blocks