AuraConf: A Unified Approach to Authorization and Confidentiality - - PowerPoint PPT Presentation

auraconf a unified approach to authorization and
SMART_READER_LITE
LIVE PREVIEW

AuraConf: A Unified Approach to Authorization and Confidentiality - - PowerPoint PPT Presentation

AuraConf: A Unified Approach to Authorization and Confidentiality Jeff Vaughan Department of Computer Science University of California, Los Angeles TLDI January 25, 2011 Some attackers dont play fair. playFor: (s: Song) (p: prin )


slide-1
SLIDE 1

AuraConf: A Unified Approach to Authorization and Confidentiality

Jeff Vaughan

Department of Computer Science University of California, Los Angeles

TLDI January 25, 2011

slide-2
SLIDE 2

Some attackers don’t play fair.

playFor: (s: Song) → (p: prin) → pf (RecCo says (MayPlay p s)) → Mp3Of s

1/25

slide-3
SLIDE 3

Some attackers don’t play fair.

playFor: (s: Song) → (p: prin) → pf (RecCo says (MayPlay p s)) → Mp3Of s

1/25

slide-4
SLIDE 4

Some attackers don’t play fair.

playFor: (s: Song) → (p: prin) → pf (RecCo says (MayPlay p s)) → Mp3Of s

1/25

slide-5
SLIDE 5

AURAconf protects confidential data.

Types provide a formal description of confidentiality policy.

2/25

slide-6
SLIDE 6

AURAconf protects confidential data.

Types provide a formal description of confidentiality policy. Encryption provides an enforcement mechanism.

2/25

slide-7
SLIDE 7

AURAconf protects confidential data.

Types provide a formal description of confidentiality policy. Encryption provides an enforcement mechanism. Blame mechanism allows audit of (some) failures.

2/25

slide-8
SLIDE 8

First thought: borrow someone else’s idea!

Direct use of cryptography Applied Crytpo. [Schneier ’96] Language operations supporting cryptography Spi Calculus [Abadi+ ’98], λseal [Sumii+ ’04] Type-based information flow Aura [Jia & Zdancewic ’09] Information flow + explicit cryptography Key-Based DLM [Chothia+ ’03], [Askarov+ ’06] Declarative policy enforcement by automatic encryption SImp [Vaughan & Zdancewic ’06]

3/25

slide-9
SLIDE 9

First thought: borrow someone else’s idea!

Direct use of cryptography Applied Crytpo. [Schneier ’96] Language operations supporting cryptography Spi Calculus [Abadi+ ’98], λseal [Sumii+ ’04] Type-based information flow Aura [Jia & Zdancewic ’09] Information flow + explicit cryptography Key-Based DLM [Chothia+ ’03], [Askarov+ ’06] Declarative policy enforcement by automatic encryption SImp [Vaughan & Zdancewic ’06] None of these are good fits with AURA.

3/25

slide-10
SLIDE 10

New mechanism, for types describe encrypted data.

playForEnc: (s: Song) → (p: prin) → pf (RecCo says MayPlay p s) → (Mp3Of s) for p

4/25

slide-11
SLIDE 11

New mechanism, for types describe encrypted data.

10111001

playForEnc: (s: Song) → (p: prin) → pf (RecCo says MayPlay p s) → (Mp3Of s) for p

4/25

slide-12
SLIDE 12

New mechanism, for types describe encrypted data.

10111001

playForEnc: (s: Song) → (p: prin) → pf (RecCo says MayPlay p s) → (Mp3Of s) for p

4/25

slide-13
SLIDE 13

New mechanism, for types describe encrypted data.

10111001

?

playForEnc: (s: Song) → (p: prin) → pf (RecCo says MayPlay p s) → (Mp3Of s) for p

4/25

slide-14
SLIDE 14

Outline

1

Introduction

2

Overview of for types

3

Feature design

4

Language theory

5

Conclusion

5/25

slide-15
SLIDE 15

Overview of for types

6/25

slide-16
SLIDE 16

AURAconf represents confidentiality monadically: return.

return Alice 42: int for Alice

N.B.

Monads are a common Haskell design pattern: return: creates an object run: consumes an object bind: composes objects

7/25

slide-17
SLIDE 17

AURAconf represents confidentiality monadically: return.

return Alice 42: int for Alice

  • E (Alice, 42, 0x32A3)

and some metadata

N.B.

Monads are a common Haskell design pattern: return: creates an object run: consumes an object bind: composes objects

7/25

slide-18
SLIDE 18

AURAconf represents confidentiality monadically: run.

run (return Alice 42): int

8/25

slide-19
SLIDE 19

AURAconf represents confidentiality monadically: run.

run (return Alice 42): int

  • 42

8/25

slide-20
SLIDE 20

AURAconf represents confidentiality monadically: run.

run (return Alice 42): int

  • 42

run can fail on “bad” ciphertext.

wrong decryption key ill-formed/ill-typed payload plaintext corrupt ciphertext

run e e′ where e′ blames p.

8/25

slide-21
SLIDE 21

AURAconf represents confidentiality monadically: bind.

bind (int for Alice) (return Alice 21) (λ{ } x: int . return Alice (2∗x)) : int for Alice

9/25

slide-22
SLIDE 22

AURAconf represents confidentiality monadically: bind.

bind (int for Alice) (return Alice 21) (λ{ } x: int . return Alice (2∗x)) : int for Alice

  • E (Alice,

(λ{ } x: int . return 2∗x) (run E (Alice, 21, 0x32A4)) 0x32A3) and some metadata

9/25

slide-23
SLIDE 23

AURAconf represents confidentiality monadically: bind.

bind (int for Alice) (return Alice 21) (λ{ } x: int . return Alice (2∗x)) : int for Alice

  • E (Alice,

(λ{ } x: int . return 2∗x) (run E (Alice, 21, 0x32A4)) 0x32A3) and some metadata ≈ E (Alice, 42, 0x32A5) and some metadata

9/25

slide-24
SLIDE 24

AURAconf represents confidentiality monadically: bind.

bind (int for Alice) (return Alice 21) (λ{ } x: int . return Alice (2∗x)) : int for Alice

  • E (Alice,

(λ{ } x: int . return 2∗x) (run E (Alice, 21, 0x32A4)) 0x32A3) and some metadata ≈ E (Alice, 42, 0x32A5) and some metadata This is mobile code

9/25

slide-25
SLIDE 25

Static and dynamic static coupled by for types

Programs may dynamically load data or code with run

Dynamic type-checking needed to catch errors Ciphertexts may be paired with digitally signed proofs describing their contents In case of emergency, evaluation “blames” such proofs

Well-typed clients create values that don’t cause blame

Typing of bind makes sure mobile expressions can be correctly decrypted by the receiver Receiver’s dynamic resources are modeled by sender’s typechecker

10/25

slide-26
SLIDE 26

Feature design

11/25

slide-27
SLIDE 27

The tension in AURAconf’s design.

Suppose expression e contains secrets. A client analyzing e is:

12/25

slide-28
SLIDE 28

The tension in AURAconf’s design.

Suppose expression e contains secrets. A client analyzing e is:

Good!

Type Theorist

12/25

slide-29
SLIDE 29

The tension in AURAconf’s design.

Suppose expression e contains secrets. A client analyzing e is:

Good!

Type Theorist

Bad!

Cryptographer

12/25

slide-30
SLIDE 30

Challenge 1: Typing is relative.

13/25

slide-31
SLIDE 31

Challenge 1: Typing is relative.

13/25

slide-32
SLIDE 32

Challenge 1: Typing is relative.

13/25

slide-33
SLIDE 33

Challenge 1: Typing is relative.

13/25

slide-34
SLIDE 34

Challenge 1: Typing is relative.

13/25

slide-35
SLIDE 35

Challenge 1: Typing is relative.

13/25

slide-36
SLIDE 36

Challenge 1: Typing is relative.

13/25

slide-37
SLIDE 37

Challenge 1: Typing is relative.

13/25

slide-38
SLIDE 38

Challenge 1: Typing is relative.

13/25

slide-39
SLIDE 39

Challenge 1: Typing is relative.

13/25

slide-40
SLIDE 40

Metadata casts guide typing of ciphertexts.

True cast

cast E (a, e, n) to ( int for Alice): int for Alice Possible if typechecker can statically decrypt E (a,e,n). Also possible if the typechecker has a prerecorded fact, attesting to the form of E (a,e,n).

14/25

slide-41
SLIDE 41

Metadata casts guide typing of ciphertexts.

True cast

cast E (a, e, n) to ( int for Alice): int for Alice Possible if typechecker can statically decrypt E (a,e,n). Also possible if the typechecker has a prerecorded fact, attesting to the form of E (a,e,n).

Justified cast

cast E (a, e, n) to ( int for Alice) blaming p: int for Alice Valid when p: c says (E (a,e,n) isa ( int for Alice)). Proof p can be blamed for decryption or typing failures.

14/25

slide-42
SLIDE 42

Decryption failures may be audited with justified casts.

15/25

slide-43
SLIDE 43

Decryption failures may be audited with justified casts.

Evidence: mentions Mal Action: blame Mal Evidence: ill-formed Action: ignore message Evidence: mentions Alice Action: blame Alice 1111111

15/25

slide-44
SLIDE 44

Decryption failures may be audited with justified casts.

Evidence: mentions Mal Action: blame Mal Evidence: ill-formed Action: ignore message Evidence: mentions Alice Action: blame Alice 1111111

15/25

slide-45
SLIDE 45

Decryption failures may be audited with justified casts.

Evidence: mentions Mal Action: blame Mal Evidence: ill-formed Action: ignore message Evidence: mentions Alice Action: blame Alice 1111111

15/25

slide-46
SLIDE 46

Decryption failures may be audited with justified casts.

Evidence: mentions Mal Action: blame Mal Evidence: ill-formed Action: ignore message Evidence: mentions Alice Action: blame Alice 1111111

15/25

slide-47
SLIDE 47

Decryption failures may be audited with justified casts.

Evidence: mentions Mal Action: blame Mal Evidence: ill-formed Action: ignore message Evidence: mentions Alice Action: blame Alice 1111111

15/25

slide-48
SLIDE 48

Decryption failures may be audited with justified casts.

Evidence: mentions Mal Action: blame Mal Evidence: ill-formed Action: ignore message Evidence: mentions Alice Action: blame Alice 1111111

15/25

slide-49
SLIDE 49

Challenge 2: Keys affect static & dynamic semantics.

Dynamic semantics

Keys are required at runtime to implement run (and say). Type-and-effect analysis tracks these keys. FX [Lucassen+ ’88], foundations [Talpin+ ’92]

Static semantics

True casts need keys at compile time for typechecking. Tracked using ideas from modal type systems. Modal Proofs as Distributed Programs [Jia+ 04], ML5 [Murphy ’08]

Combining these analyses is interesting!

16/25

slide-50
SLIDE 50

Challenge 3: Typing exhibits history-dependence.

1000101

Consider Bob preparing a confidential message for Alice return Alice 3 cast E (−) to int for Alice Naively: Bob lacks Alice’s private key—he can’t typecheck this.

Solution

Evaluation semantics creates new facts to guide the typechecker. This ensures types are preserved at runtime and programs don’t “go wrong.”

17/25

slide-51
SLIDE 51

Language theory

18/25

slide-52
SLIDE 52

Evaluation tracks fact generation and authority.

Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F

19/25

slide-53
SLIDE 53

Evaluation tracks fact generation and authority.

Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F e steps to e′.

19/25

slide-54
SLIDE 54

Evaluation tracks fact generation and authority.

Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F e steps to e′. Randomization seed n is updated to n′.

19/25

slide-55
SLIDE 55

Evaluation tracks fact generation and authority.

Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F e steps to e′. Randomization seed n is updated to n′. Key W is available for signing and decrypting. “The program is running with W’s authority.”

19/25

slide-56
SLIDE 56

Evaluation tracks fact generation and authority.

Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F e steps to e′. Randomization seed n is updated to n′. Key W is available for signing and decrypting. “The program is running with W’s authority.” Signature Σ, facts context F0, and key W are available for dynamic type-checking.

19/25

slide-57
SLIDE 57

Evaluation tracks fact generation and authority.

Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F e steps to e′. Randomization seed n is updated to n′. Key W is available for signing and decrypting. “The program is running with W’s authority.” Signature Σ, facts context F0, and key W are available for dynamic type-checking. New facts F are produced during encryptions.

19/25

slide-58
SLIDE 58

Evaluation tracks fact generation and authority.

Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F e steps to e′. Randomization seed n is updated to n′. Key W is available for signing and decrypting. “The program is running with W’s authority.” Signature Σ, facts context F0, and key W are available for dynamic type-checking. New facts F are produced during encryptions.

19/25

slide-59
SLIDE 59

Anatomy of the typing relation.

Σ;F;W;Γ;U;V ⊢ e : t

20/25

slide-60
SLIDE 60

Anatomy of the typing relation.

Σ;F;W;Γ;U;V ⊢ e : t e has type t w.r.t. Γ’s free variables and Σ’s type definitions.

20/25

slide-61
SLIDE 61

Anatomy of the typing relation.

Σ;F;W;Γ;U;V ⊢ e : t e has type t w.r.t. Γ’s free variables and Σ’s type definitions. Facts in F summarize knowledge about ciphertexts.

20/25

slide-62
SLIDE 62

Anatomy of the typing relation.

Σ;F;W;Γ;U;V ⊢ e : t e has type t w.r.t. Γ’s free variables and Σ’s type definitions. Facts in F summarize knowledge about ciphertexts. Statically available key W indicates keys available for typechecking.

20/25

slide-63
SLIDE 63

Anatomy of the typing relation.

Σ;F;W;Γ;U;V ⊢ e : t e has type t w.r.t. Γ’s free variables and Σ’s type definitions. Facts in F summarize knowledge about ciphertexts. Statically available key W indicates keys available for typechecking. Soft decryption limit U specifies a subset of W safe to use currently.

20/25

slide-64
SLIDE 64

Anatomy of the typing relation.

Σ;F;W;Γ;U;V ⊢ e : t e has type t w.r.t. Γ’s free variables and Σ’s type definitions. Facts in F summarize knowledge about ciphertexts. Statically available key W indicates keys available for typechecking. Soft decryption limit U specifies a subset of W safe to use currently. Effects label V summarizes the keys needed to run e.

20/25

slide-65
SLIDE 65

Anatomy of the typing relation.

Σ;F;W;Γ;U;V ⊢ e : t e has type t w.r.t. Γ’s free variables and Σ’s type definitions. Facts in F summarize knowledge about ciphertexts. Statically available key W indicates keys available for typechecking. Soft decryption limit U specifies a subset of W safe to use currently. Effects label V summarizes the keys needed to run e.

20/25

slide-66
SLIDE 66

Anatomy of the typing relation.

Σ;F;W;Γ;U;V ⊢ e : t e has type t w.r.t. Γ’s free variables and Σ’s type definitions. Facts in F summarize knowledge about ciphertexts. Statically available key W indicates keys available for typechecking. Soft decryption limit U specifies a subset of W safe to use currently. Effects label V summarizes the keys needed to run e. soft decryption limit ∼ modal-logic world effects label ∼ standard type-and-effects label

20/25

slide-67
SLIDE 67

Soundness requires handling fact contexts explicitly.

Definition (validΣ F)

validΣ F holds when

1 Σ is well formed: Σ ⊢ ⋄. 2 Facts are true: E (a,e,n) : t for b ∈ F implies

a = b and Σ;·;b;·;b;b ⊢ e : t.

21/25

slide-68
SLIDE 68

Soundness requires handling fact contexts explicitly.

Definition (validΣ F)

validΣ F holds when

1 Σ is well formed: Σ ⊢ ⋄. 2 Facts are true: E (a,e,n) : t for b ∈ F implies

a = b and Σ;·;b;·;b;b ⊢ e : t.

Lemma (New Fact Validity)

Assume validΣ F0 and Σ;F0;W;Γ;U;V ⊢ e : t. Then Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F implies validΣ F.

21/25

slide-69
SLIDE 69

Soundness requires handling fact contexts explicitly.

Definition (validΣ F)

validΣ F holds when

1 Σ is well formed: Σ ⊢ ⋄. 2 Facts are true: E (a,e,n) : t for b ∈ F implies

a = b and Σ;·;b;·;b;b ⊢ e : t.

Lemma (New Fact Validity)

Assume validΣ F0 and Σ;F0;W;Γ;U;V ⊢ e : t. Then Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F implies validΣ F.

Slogan

Preservation + Progress + New Fact Validity = Soundness

21/25

slide-70
SLIDE 70

Soundness requires handling fact contexts explicitly.

Definition (validΣ F)

validΣ F holds when

1 Σ is well formed: Σ ⊢ ⋄. 2 Facts are true: E (a,e,n) : t for b ∈ F implies

a = b and Σ;·;b;·;b;b ⊢ e : t.

Lemma (New Fact Validity)

Assume validΣ F0 and Σ;F0;W;Γ;U;V ⊢ e : t. Then Σ;F0;W ⊢ {|e,n|} → {|e′,n′|} learning F implies validΣ F.

Slogan

Preservation + Progress + New Fact Validity = Soundness Soundness results mechanized in Coq

21/25

slide-71
SLIDE 71

Noninterference: Secrets don’t affect public outputs. b ⊢ Aura Program

22/25

slide-72
SLIDE 72

Noninterference: Secrets don’t affect public outputs. b ⊢ Aura Program (Alice, "toaster", 0x0399) : string for Alice

22/25

slide-73
SLIDE 73

Noninterference: Secrets don’t affect public outputs. b ⊢ Aura Program (Alice, "toaster", 0x0399) : string for Alice

22/25

slide-74
SLIDE 74

Noninterference: Secrets don’t affect public outputs. 15 b ⊢ Aura Program (Alice, "toaster", 0x0399) : string for Alice

22/25

slide-75
SLIDE 75

Noninterference: Secrets don’t affect public outputs. b ⊢ Aura Program (Alice, "toaster", 0x0399) : string for Alice

22/25

slide-76
SLIDE 76

Noninterference: Secrets don’t affect public outputs. (Alice, "lambda", 0x0312) : string for Alice b ⊢ Aura Program

22/25

slide-77
SLIDE 77

Noninterference: Secrets don’t affect public outputs. (Alice, "lambda", 0x0312) : string for Alice b ⊢ Aura Program

22/25

slide-78
SLIDE 78

Noninterference: Secrets don’t affect public outputs. 15 (Alice, "lambda", 0x0312) : string for Alice b ⊢ Aura Program

22/25

slide-79
SLIDE 79

Noninterference: Secrets don’t affect public outputs. 15 (Alice, "lambda", 0x0312) : string for Alice b ⊢ Aura Program

Noninterference [Denning+ ’77], Termination Insensitive Noninterference [Askarov+ ’08]

22/25

slide-80
SLIDE 80

Conclusion

23/25

slide-81
SLIDE 81

Summary

Type specification + cryptographic enforcement confidentiality Type-and-effects analysis + modal-type theory precise resource tracking AURAconf unifies mechanisms for confidentiality, audit and access control.

24/25

slide-82
SLIDE 82

Acknowledgments

Thank you to all my collaborators on Aura project! Limin Jia Karl Mazurak Joseph Schorr Luke Zarko Steve Zdancewic Jianzhou Zhao

25/25

slide-83
SLIDE 83

Acknowledgments

Thank you to all my collaborators on Aura project! Limin Jia Karl Mazurak Joseph Schorr Luke Zarko Steve Zdancewic Jianzhou Zhao Questions?

25/25