skip to main content
10.1145/1217975.1217977acmotherconferencesArticle/Chapter ViewAbstractPublication Pagesacl2Conference Proceedingsconference-collections
Article

A verifying core for a cryptographic language compiler

Published:15 August 2006Publication History

ABSTRACT

A verifying compiler is one that emits both object code and a proof of correspondence between object and source code.1 We report the use of ACL2 in building a verifying compiler for μCryptol, a stream-based language for encryption algorithm specification that targets Rockwell Collins' AAMP7 microprocessor (and is designed to compile efficiently to hardware, too). This paper reports on our success in verifying the "core" transformations of the compiler -- those transformations over the sub-language of μCryptol that begin after "higher-order" aspects of the language are compiled away, and finish just before hardware or software specific transformations are exercised. The core transformations are responsible for aggressive optimizations. We have written an ACL2 macro that automatically generates both the correspondence theorems and their proofs. The compiler also supplies measure functions that ACL2 uses to automatically prove termination of μCryptol programs, including programs with mutually-recursive cliques of streams. Our verifying compiler has proved the correctness of its core transformations for multiple algorithms, including TEA, RC6, and AES. Finally, we describe an ACL2 book of primitive operations for the general specification and verification of encryption algorithms.

References

  1. H. P. Barendregt. The Lambda Calculus. Number 103 in Studies in Logic and the Foundations of Mathematics. North-Holland, revised edition, 1991.Google ScholarGoogle Scholar
  2. S. Blazy, Z. Dargaye, and X. Leroy. Formal verification of a c compiler front-end. In Proceedings of Formal Methods, 2006. Accepted. Available at http://pauillac.inria.fr/~xleroy/. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Common Criteria for Information Technology Security Evaluation (CCITSE), Mar. 1999. Available at http://www.radium.ncsc.mil/tpep/library/ccitse/ccitse.html.Google ScholarGoogle Scholar
  4. M. A. Dave. Compiler verification: a bibliography. SIGSOFT Software Engineering Notes, 28(6):2--2, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Federal Information Processing Standards Publication. Specification for the advanced encryption standard (AES). Technical Report 197, National Institute of Standards and Technology, Nov. 2001. Available at http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf.Google ScholarGoogle Scholar
  6. R. T. C. for Aeronautics (RTCA). DO-178b: Software considerations in airborne systems and equipment certification, Dec. 1992.Google ScholarGoogle Scholar
  7. A. C. J. Fox. Formal specification and verification of ARM6. In Theorem Proving in Higher-Order Logics (TPHOLs), pages 25--40, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  8. D. Greve, R. Richards, and M. Wilding. A summary of intrinsic partitioning verification. In In Proceedings of the Fifth International Workshop on the ACL2 Theorem Prover and Its Applications (ACL2), Austin, TX, Nov. 2004.Google ScholarGoogle Scholar
  9. D. S. Hardin, E. W. Smith, and W. D. Young. A Robust Machine Code Proof Framework for Highly Secure Applications. In Proceedings of the 2006 ACL2 Workshop, August 2006. Accepted. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. T. Hoare. The verifying compiler: A grand challenge for computing research. Journal of the ACM, 50(1):63--69, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. D. Johnson. Synthesis of Digital Design from Recursive Equations. MIT Press, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Kaufmann, P. Manolios, and J. S. Moore. Computer-Aided Reasoning: An Approach. Kluwer Academic Publishers, June 2000. ISBN 0792377443. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Kaufmann, P. Manolios, and J. S. Moore, editors. Computer Aided Reasoning: ACL2 Case Studies, chapter Chapter 8: High-Speed, Analyzable Simulators. Self-Published, Aug. 2002.Google ScholarGoogle Scholar
  14. X. Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In Principles of Programming Languages (POPL '06), pages 42--54, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. X. Leroy, D. Doligez, J. Garrigue, D. Rémy, and J. Vouillon. The Objective Caml system: Documentation and user's manual. Available at http://caml.inria.fr/pub/docs/manual-ocaml/index.html, 2005.Google ScholarGoogle Scholar
  16. J. R. Lewis and W. B. Martin. Cryptol: High assurance, retargetable crypto development and validation. In Proceedings of the IEEE/AFCEA Conference on Military Communications (MILCOM), Boston, MA, Oct. 2003. Available at http://www.galois.com/files/milcom.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Matthews, J. S. Moore, S. Ray, and D. Vroon. Verification condition generation via theorem proving. Submitted, Mar. 2006.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. S. Moore. A mechanically verified language implementation. Journal of Automated Reasoning, 5(4):461--492, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. S. Moore. A grand challenge proposal for formal methods: A verified stack. In 10th Anniversary Colloquium of UNU/IIST, pages 161--172, 2002.Google ScholarGoogle Scholar
  20. T. Nipkow, L. C. Paulson, and M. Wenzel. Isabelle/HOL --- A Proof Assistant for Higher-Order Logic, volume 2283 of LNCS. Springer, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. S. L. Peyton Jones. Implementing lazy functional languages on stock hardware: The Spineless Tagless G-machine. Journal of Functional Programming, 2(2):127--202, Apr. 1992.Google ScholarGoogle ScholarCross RefCross Ref
  22. S. L. Peyton-Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003. Available at http://www.haskell.org/definition/haskell98-report.ps.gz.Google ScholarGoogle Scholar
  23. R. L. Rivest1, M. J. B. Robshaw, R. Sidney, and Y. L. Yin. The security of the rc6 block cipher. Technical report, RSA Security, 1998.Google ScholarGoogle Scholar
  24. M. Sheeran. Designing regular array architectures using higher order functions. In J.-P. Jouannaud, editor, Proceedings of the International Conference on Functional Programming Languages and Computer Architecture (FPCA), Nancy, France, volume 201 of LNCS, pages 220--237. Springer, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Shields. A language for symmetric-key cryptographic algorithms and its implementation. Available at http://www.cartesianclosed.com/pub/mcryptol/, Jan. 2006.Google ScholarGoogle Scholar
  26. M. B. Shields. μCryptol Reference Manual, Nov. 2005. Available at http://www.galois.com/files/mCryptol_refman-0.9.pdf.Google ScholarGoogle Scholar
  27. K. Slind, G. Li, and S. Owens. A proof-producing software compiler for a subset of higher order logic. Available at http://www.cs.utah.edu/~slind/sw-compiler/, 2006.Google ScholarGoogle Scholar
  28. K. Slind, S. Owens, J. Iyoda, and M. Gordon. Proof producing synthesis of arithmetic and cryptographic hardware. In Seventh International Workshop on Designing Correct Circuits DCC: Participants' Proceedings, 2006. Satellite Event of ETAPS.Google ScholarGoogle Scholar
  29. D. J. Wheeler and R. M. Needham. TEA, a tiny encryption algorithm. In B. Preneel, editor, Proceedings of the 1994 Workshop on Fast Software Encryption (FSE), Belgium, volume 1008 of LNCS, pages 363--366. Springer, 1995.Google ScholarGoogle Scholar

Index Terms

  1. A verifying core for a cryptographic language compiler

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in
                • Published in

                  cover image ACM Other conferences
                  ACL2 '06: Proceedings of the sixth international workshop on the ACL2 theorem prover and its applications
                  August 2006
                  145 pages
                  ISBN:0978849302
                  DOI:10.1145/1217975

                  Copyright © 2006 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 15 August 2006

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • Article

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader