introduction
play

Introduction we consider the problem of complexity analysis for - PowerPoint PPT Presentation

Implicit Computational Complexity of Subrecursive Functional Programs, with Applications to Cryptographic Proofs Patrick Baillot LIP, CNRS & ENS de Lyon joint work with Gilles Barthe and Ugo Dal Lago gdt Gomtrie du Calcul (GEOCAL)


  1. Implicit Computational Complexity of Subrecursive Functional Programs, with Applications to Cryptographic Proofs Patrick Baillot LIP, CNRS & ENS de Lyon joint work with Gilles Barthe and Ugo Dal Lago gdt Géométrie du Calcul (GEOCAL) & Logique, Algèbre, Calcul (LAC) journées 2016 du gdr IM 1

  2. Introduction ✤ we consider the problem of complexity analysis for higher-order functional programs with references ✤ implicit computational complexity has designed restricted languages with guaranteed complexity bounds, in particular polynomial time ✤ however here we aim at: ✤ an analysis covering a larger class of programs ✤ allowing to extract concrete complexity bounds ✤ our motivation is the analysis of complexity bounds on adversaries built by cryptographic reductions 2

  3. Modular complexity analysis? String String String S 1 S 2 3

  4. Modular complexity analysis? String String String S 1 S 2 T(S 1 ; S 2 ) ≤ T(S 1 )+ T(S 2 )o|S 1 | 4

  5. String -> String String S 2 String 5

  6. String -> String S 1 String S 2 String 6

  7. String -> String S 1 String S 2 String Which information from S 1 and S 2 is sufficient to bound T(S 1 ;S 2 ) ? 7

  8. N ->N S 1 N S 2 N 8

  9. F : N ->N S 1 N return F(F(n)); n : N 9

  10. F : N ->N S 1 N return F(F(n)); n : N T(S 1 ; S 2 ) ≤ T(S 1 )+ T(S 1 )o|S 1 | 10

  11. F : N ->N S 1 r:=1; N for i=0 to n n : N {r:= F(r)}; return r; 11

  12. F : N ->N S 1 let F n = n+3; r:=1; N for i=0 to n n : N {r:= F(r)}; return r; 12

  13. F : N ->N S 1 let F n = n+3; r:=1; N for i=0 to n n : N {r:= F(r)}; return r; ... leads to linear output growth: 3n 13

  14. F : N ->N S 1 let F n = 3n; r:=1; N for i=0 to n n : N {r:= F(r)}; return r; ... leads to exponential output growth: 3 n 14

  15. F : N ->N S 1 let F n = 3n; r:=1; N for i=0 to n n : N {r:= F(r)}; return r; ... leads to exponential output growth: 3 n hence exponential time if the output is used to drive another for-loop 15

  16. (N ->N)-> ( N ->N) S 1 N S 2 N 16

  17. (N ->N)-> ( N ->N) S 1 N S 2 N T(S 1 ; S 2 ) ?? 17

  18. Motivation for modular complexity analysis N ->N N S 2 N Analysis with partial information, e.g. S 1 coming from a library 18

  19. Motivation for modular complexity analysis N ->N ? N S 2 N Guide the choice/design of S 1 in order to satisfy some global complexity property 19

  20. Motivation for cryptographic reductions we consider security proofs of cryptographic primitives, in the computational model 20

  21. Motivation for cryptographic reductions we consider security proofs of cryptographic primitives, in the computational model their correction can be verified formally with tools such as e.g. Cryptoverif or Easycrypt 21

  22. Motivation for cryptographic reductions we consider security proofs of cryptographic primitives, in the computational model computational security property reduction assumption of a scheme proof 22

  23. Motivation for cryptographic reductions we consider security proofs of cryptographic primitives, in the computational model computational security property reduction assumption of a scheme proof by contraposition: ∃ feasible adversary A 1 ∃ feasible adversary A 2 reduction for security property for the computational proof of the scheme assumption 23

  24. Motivation for cryptographic reductions A 1 A 2 reduction program 24

  25. Motivation for cryptographic reductions A 1 A 2 reduction program If A 1 is PPT, is A 2 also PPT ? 25

  26. Motivation for cryptographic reductions A 1 A 2 reduction program If A 1 is PPT, is A 2 also PPT ? If A 1 is in DTIME(n k ), is A 2 is in DTIME(n g(k) ), for some g? 26

  27. Ideas for complexity analysis ideas steming from implicit complexity, for higher-order complexity analysis: • linearity discipline for functional variables • time bounds can be derived from the combination of: • a size analysis • structural recursion ( for loops) • to analyse the size, use an enriched type systems: indexed types 27

  28. Towards indexed types N ->N S 1 let F n = n+3; 28

  29. Towards indexed types N a ->N a+3 S 1 let F n = n+3; 29

  30. Towards indexed types N a ->N 3a S 1 let F n = 3n; 30

  31. Towards indexed types N a ->N 3a S 1 let F n = 3n; •in which language write the type indexes? polynomials ? 31

  32. Towards indexed types N a ->N 3a S 1 let F n = 3n; •in which language write the type indexes? polynomials ? •however if we fix the language: • some programs will not be typable • some polynomial time programs may have exponential subprocedures 32

  33. Towards indexed types N a ->N 3a S 1 let F n = 3n; Therefore we choose an open index language: first-order language with as many function symbols as needed 33

  34. Source language : l T ✤ Terms a higher order calculus with references 34

  35. Source language : l T iteration ✤ Terms a higher order calculus with references 35

  36. Source language : l T ✤ Terms read and write operations a higher order calculus with references 36

  37. Source language : l T ✤ Terms a higher order calculus with references sufficient to embed a simple imperative for-language 37

  38. Source language : l T ✤ Terms a higher order calculus with references sufficient to embed a simple imperative for-language but also functional combinators such as fold, map 38

  39. Source language : l T ✤ Terms ✤ Types 39

  40. Source language : l T ✤ Terms ✤ Types type-and-effects effect: a = set {r 1,..., r k} of references read 40

  41. Source language : l T ✤ Terms ✤ Types type-and-effects data-type of binary strings: L(B) 41

  42. Source language : l T ✤ Terms ✤ Types ✤ Typing judgements ✤ Terms 42

  43. T yping rules for l T programs (selection) 43

  44. T yping rules for l T programs (selection) typability ensures linear use of functional variables and termination of execution 44

  45. Index terms ✤ An «open» language of indexes: first-order terms I := a| f(I 1, ..., I k ) for f in a set IF and a system of equations ε defining I F will contain such functions as 0, +, s ... { ✤ example: ε containing e(0) = 1 e(s(a))=2 e(a) defines exponentiation. 45

  46. d l T type system ✤ Indexed types: ✤ Effects: ✤ Judgements: 46

  47. d l T type system: typing rules (selection) we omit subtyping conditions here... 47

  48. d l T type system: examples 48

  49. Weight of a derivation ✤ we associate to each derivation π an index term W ( π ), its weight , defined by induction on π . example: 49

  50. Complexity soundness Theorem (Complexity soundness) : If π is derivation of then the execution of M on the abstract machine is done in time bounded by W ( π ) . 50

  51. Example: hardcore predicate ✤ If f : {0,1} n -> {0,1} n is a one-way function, then g f : {0,1} 2n -> {0,1} 2n defined by g f (x,y)=(f(x),y) is also one-way. ✤ A hardcore predicate p for a one-way function f : {0,1} n -> {0,1} n is a function which is efficiently computable from {0,1} n to {0,1} such that it is difficult to guess p(x), when one only knows f(x). 51

  52. Example: hardcore predicate A 1 adversary for A 2 adversary for reduction g f is a one-way function program is a hardcore predicate for g f If A 1 is PPT, is A 2 also PPT ? . 52

  53. Example: reduction for hardcore predicate [KatzLindell] 53

  54. Example: reduction, written in l T 54

  55. Example: reduction for hardcore predicate [KatzLindell] 55

  56. Example: reduction for hardcore predicate [KatzLindell] L a (B) 56

  57. Example: reduction for hardcore predicate [KatzLindell] N a L a (B) 57

  58. Example: reduction for hardcore predicate [KatzLindell] N a L a (B) N log(r(a)) 58

  59. Example: reduction for hardcore predicate [KatzLindell] N a L a (B) N log(r(a)) L log(r(a)) (B) 59

  60. Example: reduction for hardcore predicate [KatzLindell] ✤ in this example we obtain for the type derivation of the inverter A ’ the weight W ( π )=O(n 2 f A (1+2n)), where f A is a function bounding the complexity of adversary A . ✤ the bound given by the soundness thm for the complexity of A ’ corresponds with the one obtained by a complexity analysis by hand . 60

  61. T ype inference Theorem (Inference) : There is a type inference algorithm CTI , taking as input typed l T terms, such that: ✤ CTI is total, ✤ if CTI(M)=( π , ε ) then π is a correct type derivation for M . Theorem (Termination) : If M is an l T term and CTI(M)=( π , ε ) , then So, type inference never fails... ε is terminating. 61

  62. T ype inference Theorem (Inference) : There is a type inference algorithm CTI , taking as input typed l T terms, such that: ✤ CTI is total, ✤ if CTI(M)=( π , ε ) then π is a correct type derivation for M . So, type inference never fails... Theorem (Termination) : If M is an l T term and CTI(M)=( π , ε ) , then But ... what do we know about the equational program ε ? ε is terminating. 62

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend