Towards a Type System for Security APIs

  • Gavin Keighren
  • David Aspinall
  • Graham Steel
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5511)


Security API analysis typically only considers a subset of an API’s functions, with results bounded by the number of function calls. Furthermore, attacks involving partial leakage of sensitive information are usually not covered.

Type-based static analysis has the potential to alleviate these shortcomings. To that end, we present a type system for secure information flow based upon the one of Volpano, Smith and Irvine [1], extended with types for cryptographic keys and ciphertext similar to those in Sumii and Pierce [2]. In contrast to some other type systems, the encryption and decryption of keys does not require special treatment.

We show that a well-typed sequence of commands is non-interferent, based upon a definition of indistinguishability where, in certain circumstances, the adversary can distinguish between ciphertexts that correspond to encrypted public data.


Induction Hypothesis Type System Memory Location Security Level Operational Semantic 
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.
    Volpano, D.M., Smith, G., Irvine, C.E.: A Sound Type System for Secure Flow Analysis. Journal of Computer Security 4(3), 167–187 (1996)CrossRefGoogle Scholar
  2. 2.
    Sumii, E., Pierce, B.C.: Logical Relations for Encryption. In: Proceedings of the 14th IEEE Computer Security Foundations Workshop (CSFW-14 2001), pp. 256–269. IEEE Computer Society Press, Los Alamitos (2001)CrossRefGoogle Scholar
  3. 3.
  4. 4.
  5. 5.
    Cortier, V., Keighren, G., Steel, G.: Automatic Analysis of the Security of XOR-Based Key Management Schemes. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 538–552. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  6. 6.
    Courant, J., Monin, J.F.: Defending the Bank with a Proof Assistant. In: Proceedings of the 6th International Workshop on Issues in the Theory of Security (WITS 2006), pp. 87–98 (2006)Google Scholar
  7. 7.
    Delaune, S., Kremer, S., Steel, G.: Formal Analysis of PKCS #11. In: [19], pp. 331–344Google Scholar
  8. 8.
    Youn, P.: The Analysis of Cryptographic APIs using the Theorem Prover Otter. Master’s thesis, Massachusetts Institute of Technology (May 2004)Google Scholar
  9. 9.
    Youn, P., Adida, B., Bond, M.K., Clulow, J., Herzog, J., Lin, A., Rivest, R.L., Anderson, R.J.: Robbing the Bank with a Theorem Prover. Technical Report 644, University of Cambridge Computer Laboratory (August 2005)Google Scholar
  10. 10.
    Abadi, M., Rogaway, P.: Reconciling Two Views of Cryptography (The Computational Soundness of Formal Encryption). In: Watanabe, O., Hagiya, M., Ito, T., van Leeuwen, J., Mosses, P.D. (eds.) TCS 2000. LNCS, vol. 1872, pp. 3–22. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  11. 11.
    Clulow, J.S.: On the Security of PKCS #11. In: Walter, C.D., Koç, Ç.K., Paar, C. (eds.) CHES 2003. LNCS, vol. 2779, pp. 411–425. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  12. 12.
    Vaughan, J.A., Zdancewic, S.: A Cryptographic Decentralized Label Model. In: Proceedings of the 2007 IEEE Symposium on Security and Privacy, pp. 192–206. IEEE Computer Society Press, Los Alamitos (2007)CrossRefGoogle Scholar
  13. 13.
    Laud, P.: Handling Encryption in an Analysis for Secure Information Flow. In: Degano, P. (ed.) ESOP 2003. LNCS, vol. 2618, pp. 159–173. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  14. 14.
    Focardi, R., Centenaro, M.: Information Flow Security of Multi-threaded Distributed Programs. In: Proceedings of the 3rd ACM SIGPLAN Workshop on Programming Languages and Analysis for Security (PLAS 2008), pp. 113–124. ACM Press, New York (2008)CrossRefGoogle Scholar
  15. 15.
    Bengtson, J., Bhargavan, K., Fournet, C., Gordon, A.D., Maffeis, S.: Refinement Types for Secure Implementations. In: [19], pp. 17–32Google Scholar
  16. 16.
    Abadi, M.: Secrecy by Typing in Security Protocols. In: Ito, T., Abadi, M. (eds.) TACS 1997. LNCS, vol. 1281, pp. 611–638. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  17. 17.
    Laud, P., Vene, V.: A Type System for Computationally Secure Information Flow. In: Liśkiewicz, M., Reischuk, R. (eds.) FCT 2005. LNCS, vol. 3623, pp. 365–377. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  18. 18.
    Volpano, D.M., Smith, G.: A Type-Based Approach to Program Security. In: Bidoit, M., Dauchet, M. (eds.) CAAP 1997, FASE 1997, and TAPSOFT 1997. LNCS, vol. 1214, pp. 607–621. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  19. 19.
    Proceedings of the 21st IEEE Computer Security Foundations Symposium (CSF 2008). IEEE Computer Society Press, Los Alamitos (June 2008)Google Scholar
  20. 20.
    PKCS #11: Cryptographic Token Interface Standard,

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Gavin Keighren
    • 1
  • David Aspinall
    • 1
  • Graham Steel
    • 2
  1. 1.Laboratory for Foundations of Computer Science School of InformaticsThe University of Edinburgh Informatics ForumEdinburghUK
  2. 2.LSVINRIA & CNRS & ENS de CachanCACHAN CedexFrance

Personalised recommendations