An approach to formal verification of arithmetic functions in assembly

  • Authors:
  • Reynald Affeldt;Nicolas Marti

  • Affiliations:
  • Research Center for Information Security, National Institute of Advanced Industrial Science and Technology;Department of Computer Science, University of Tokyo

  • Venue:
  • ASIAN'06 Proceedings of the 11th Asian computing science conference on Advances in computer science: secure software and related issues
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

It is customary to write performance-critical parts of arithmetic functions in assembly: this enables finely-tuned algorithms that use specialized processor instructions. However, such optimizations make formal verification of arithmetic functions technically challenging, mainly because of many bit-level manipulations of data. In this paper, we propose an approach for formal verification of arithmetic functions in assembly. It consists in the implementation in the Coq proof assistant of (1) a Hoare logic for assembly programs augmented with loops and (2) a certified translator to ready-to-run assembly with jumps. To properly handle formal verification of bit-level manipulations of data, we propose an original encoding of machine integers. For concreteness, we use the SmartMIPS assembly language, an extension of the MIPS instruction set for smartcards, and we explain the formal verification of an optimized implementation of the Montgomery multiplication, a de facto-standard for the implementation of many cryptosystems.