Abstract
Hand-optimized assembly language code is often difficult to formally verify. This paper combines Hoare logic with verified code transformations to make it easier to verify such code. This approach greatly simplifies existing proofs of highly optimized OpenSSL-based AES-GCM cryptographic code. Furthermore, applying various verified transformations to the AES-GCM code enables additional platform-specific performance improvements.
This is a preview of subscription content, access via your institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
Almeida, J.B., et al.: Jasmin: high-assurance and high-speed cryptography. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (2017). https://doi.org/10.1145/3133956.3134078
Almeida, J.B., et al.: The last mile: high-assurance and high-speed cryptographic implementations. CoRR abs/1904.04606 (2019)
Appel, A.W.: Verified software toolchain. In: ESOP: 20th European Symposium on Programming (2011)
Appel, A.W.: Verification of a cryptographic primitive: SHA-256. ACM Trans. Program. Lang. Syst. 37(2), 7:1–7:31 (2015)
Bond, B., et al.: Vale: verifying high-performance cryptographic assembly code. In: Proceedings of the USENIX Security Symposium (2017)
Erbsen, A., Philipoom, J., Gross, J., Sloan, R., Chlipala, A.: Simple high-level code for cryptographic arithmetic - with proofs, without compromises. In: Proceedings of the IEEE Symposium on Security and Privacy (2019)
Fromherz, A., Giannarakis, N., Hawblitzel, C., Parno, B., Rastogi, A., Swamy, N.: A verified, efficient embedding of a verifiable assembly language. In: Proceedings of the ACM Symposium on Principles of Programming Languages (POPL) (2019)
Gueron, S., Krasnov, V.: The fragility of AES-GCM authentication algorithm. In: Proceedings of the Conference on Information Technology: New Generations (2014)
Gueron, S.: Intel® advanced encryption standard (AES) new instructions set (2012). https://software.intel.com/sites/default/files/article/165683/aes-wp-2012-09-22-v01.pdf
Klein, G., et al.: Comprehensive formal verification of an OS microkernel. ACM Trans. Comput. Syst. 32(1), 2:1–2:70 (2014)
Leroy, X., Blazy, S., Kästner, D., Schommer, B., Pister, M., Ferdinand, C.: CompCert - a formally verified optimizing compiler. In: Embedded Real Time Software and Systems (ERTS). SEE (2016)
Massalin, H.: Superoptimizer - a look at the smallest program. In: Architectural Support for Programming Languages and Operating Systems (ASPLOS) (1987)
McKeeman, W.M.: Peephole optimization. Commun. ACM 8, 7 (1965)
Mozilla: Measurement dashboard (2018). https://mzl.la/2ug9YCH
Mullen, E., Zuniga, D., Tatlock, Z., Grossman, D.: Verified peephole optimizations for CompCert. In: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (2016)
Pnueli, A., Siegel, M., Singerman, E.: Translation validation. In: Steffen, B. (ed.) TACAS 1998. LNCS, vol. 1384, pp. 151–166. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0054170
Protzenko, J., et al.: EverCrypt: a fast, verified, cross-platform cryptographic provider. In: Proceedings of the IEEE Symposium on Security and Privacy (2020)
Recoules, F., Bardin, S., Bonichon, R., Mounier, L., Potet, M.L.: Get rid of inline assembly through verification-oriented lifting. In: Proceedings of the 34th IEEE/ACM International Conference on Automated Software Engineering (ASE 2019) (2019)
Sewell, T.A.L., Myreen, M.O., Klein, G.: Translation validation for a verified OS kernel. In: Proceedings of ACM PLDI (2013)
Swamy, N., et al.: Dependent types and multi-monadic effects in F*. In: Proceedings of the ACM Conference on Principles of Programming Languages (POPL), pp. 256–270. ACM (2016)
Wheeler, D.A.: SLOCCount. Software Distribution. http://www.dwheeler.com/sloccount/
Acknowledgements
We thank the anonymous reviewers for valuable feedback. Work at Carnegie Mellon University was supported in part by the Department of the Navy, Office of Naval Research under Grant No. N00014-18-1-2892, and grants from the Intel Corporation and the Alfred P. Sloan Foundation.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Bosamiya, J., Gibson, S., Li, Y., Parno, B., Hawblitzel, C. (2020). Verified Transformations and Hoare Logic: Beautiful Proofs for Ugly Assembly Language. In: Christakis, M., Polikarpova, N., Duggirala, P.S., Schrammel, P. (eds) Software Verification. NSV VSTTE 2020 2020. Lecture Notes in Computer Science(), vol 12549. Springer, Cham. https://doi.org/10.1007/978-3-030-63618-0_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-63618-0_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-63617-3
Online ISBN: 978-3-030-63618-0
eBook Packages: Computer ScienceComputer Science (R0)