Relating Cryptography and Polymorphism

Cryptography is information hiding. Polymorphism is also information hiding. So is cryptography polymorphic? Is polymorphism cryptographic? To investigate these questions, we define the cryptographic ‚-calculus, a simply typed ‚calculus with shared-key cryptographic primitives. Although this calculus is simply typed, it is powerful enough to encode recursive functions, recursive types, and dynamic typing. We then develop a theory of relational parametricity for our calculus as Reynolds did for the polymorphic ‚-calculus. This theory is useful for proving equivalences in our calculus; for instance, it implies a non-interference property: values encrypted by a key cannot be distinguished from one another by any function ignorant of the key. We close with an encoding of the polymorphic ‚-calculus into the cryptographic calculus that uses cryptography to protect type abstraction. Our results shed a new light upon the relationship between cryptography and polymorphism, and oer a first step toward extending programming idioms based on type abstraction (such as modules and packages) from the civilized world of polymorphism, where only well-typed programs are allowed, to the unstructured world of cryptography, where friendly programs must cohabit with malicious attackers.

[1]  Jon G. Riecke,et al.  The SLam calculus: programming with secrecy and integrity , 1998, POPL '98.

[2]  Martín Abadi,et al.  Authentication primitives and their compilation , 2000, POPL '00.

[3]  John C. Mitchell,et al.  Abstract types have existential type , 1988, TOPL.

[4]  Martín Abadi,et al.  Dynamic typing in a statically-typed language , 1989, POPL '89.

[5]  Cédric Fournet,et al.  The reflexive CHAM and the join-calculus , 1996, POPL '96.

[6]  Martín Abadi,et al.  A calculus for cryptographic protocols: the spi calculus , 1997, CCS '97.

[7]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[8]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

[9]  Robert D. Tennent,et al.  Semantics of programming languages , 1991, Prentice Hall International Series in Computer Science.

[10]  Martín Abadi,et al.  Dynamic typing in polymorphic languages , 1995, Journal of Functional Programming.

[11]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[12]  C PierceBenjamin,et al.  Behavioral equivalence in the polymorphic pi-calculus , 2000 .

[13]  Dan Grossman,et al.  Principals in programming languages: a syntactic proof technique , 1999, ICFP '99.

[14]  Martín Abadi,et al.  Secure Implementation of Channel Abstractions , 2002, Inf. Comput..

[15]  Davide Sangiorgi,et al.  Behavioral equivalence in the polymorphic pi-calculus , 2000, JACM.

[16]  Andrew M. Pitts,et al.  Process Calculus Based Upon Evaluation to Committed Form , 1996, Theor. Comput. Sci..

[17]  J. Y. Girard,et al.  Interpretation fonctionelle et elimination des coupures dans l'aritmetique d'ordre superieur , 1972 .

[18]  Didier Rémy,et al.  Type inference for records in natural extension of ML , 1994 .

[19]  Claudio V. Russo Types for Modules , 2004, Electronic Notes in Theoretical Computer Science.

[20]  John C. Mitchell,et al.  Theoretical aspects of object-oriented programming: types, semantics, and language design , 1994, Choice Reviews Online.

[21]  John C. Mitchell,et al.  Abstract types have existential types , 1985, POPL.

[22]  John C. Mitchell,et al.  On the Equivalence of Data Representations , 1991, Artificial and Mathematical Theory of Computation.

[23]  Jean-Jacques Lévy,et al.  A Calculus of Mobile Agents , 1996, CONCUR.

[24]  Martín Abadi,et al.  A Top-Down Look at a Secure Message , 1999, FSTTCS.

[25]  Martín Abadi,et al.  Secrecy by typing in security protocols , 1999, JACM.

[26]  James H. Morris Protection in programming languages , 1973, CACM.

[27]  Andrew M. Pitts Existential Types: Logical Relations and Operational Equivalence , 1998, ICALP.

[28]  Moni Naor,et al.  Non-malleable cryptography , 1991, STOC '91.

[29]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[30]  Mitchell Wand,et al.  Type inference for record concatenation and multiple inheritance , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[31]  Rocco De Nicola,et al.  Proof techniques for cryptographic processes , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).