Type Checking Cryptography Implementations

  • Manuel Barbosa
  • Andrew Moss
  • Dan Page
  • Nuno F. Rodrigues
  • Paulo F. Silva
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7141)


Cryptographic software development is a challenging field: high performance must be achieved, while ensuring correctness and compliance with low-level security policies. CAO is a domain specific language designed to assist development of cryptographic software. An important feature of this language is the design of a novel type system introducing native types such as predefined sized vectors, matrices and bit strings, residue classes modulo an integer, finite fields and finite field extensions, allowing for extensive static validation of source code. We present the formalisation, validation and implementation of this type system.


Type System Residue Class Elliptic Curve Cryptography Typing Rule Semantic Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barbosa, M., Moss, A., Page, D., Rodrigues, N.F., Silva, P.F.: Type checking cryptography implementations. Tech. Rep. DI-CCTC-11-01, CCTC, Univ. Minho (2011)Google Scholar
  2. 2.
    Bernstein, D.J.: The Poly1305-AES Message-Authentication Code. In: Gilbert, H., Handschuh, H. (eds.) FSE 2005. LNCS, vol. 3557, pp. 32–49. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  3. 3.
    Bernstein, D.J.: Cryptography in NaCl (2009),
  4. 4.
    Jonsson, J., Kaliski, B.: Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specification Version 2.1 (2003)Google Scholar
  5. 5.
    Lewis, J.: Cryptol: specification, implementation and verification of high-grade cryptographic applications. In: FMSE 2007, p. 41. ACM (2007)Google Scholar
  6. 6.
    Menezes, A.J., Vanstone, S.A., Oorschot, P.C.V.: Handbook of Applied Cryptography. CRC Press, Inc., Boca Raton (1996)CrossRefGoogle Scholar
  7. 7.
    Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Silva, P.F., Oliveira, J.N.: ’Galculator’: functional prototype of a Galois-connection based proof assistant. In: PPDP 2008, pp. 44–55. ACM (2008)Google Scholar
  9. 9.
    Xi, H.: Imperative programming with dependent types. In: LICS 2000, pp. 375–387. IEEE Computer Society (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Manuel Barbosa
    • 1
  • Andrew Moss
    • 2
  • Dan Page
    • 3
  • Nuno F. Rodrigues
    • 1
    • 4
  • Paulo F. Silva
    • 1
  1. 1.Departamento de InformáticaUniversidade do MinhoPortugal
  2. 2.School of ComputingBlekinge Institute of TechnologySweden
  3. 3.Department of Computer ScienceUniversity of BristolUnited Kingdom
  4. 4.DIGARCInstituto Politécnico do Cávado e do AvePortugal

Personalised recommendations