Formally verified AES-XTS: The first AES algorithm to join s2n-bignum
Summary
Amazon Web Services (AWS) has formally verified an optimized Arm64 assembly implementation of AES-XTS decryption, making it the first AES algorithm to join the s2n-bignum library and ensuring mathematical certainty for critical data-at-rest encryption in services like EBS and DynamoDB. This complex undertaking involved simplifying the 5x-unrolled assembly code to enable automated optimization with SLOTHY and utilizing the HOL Light interactive theorem prover for proof-driven development, resulting in the largest proof within the s2n-bignum library. The methodology yielded slight performance gains on AWS Graviton processors and established a cleaner, more maintainable control flow, while also developing and testing a HOL Light specification that accurately mirrors the IEEE Standard 1619. Formal verification provides continuous assurance of correctness, memory safety, and constant-time properties at the assembly level, overcoming the limitations of traditional testing by proving correctness for all possible symbolic inputs. This achievement not only enhances the security and performance of AWS's cryptographic primitives but also paves the way for rigorous verification of more AES-based algorithms within the s2n-bignum framework.
Key takeaway
AWS formally verified an optimized Arm64 assembly implementation of AES-256-XTS decryption, integrating it into s2n-bignum with HOL Light. This involved simplifying complex 5x-unrolled code for automated optimization, maintaining performance for typical 512-byte inputs and proving correctness for all possible inputs across variable data lengths. This rigorous, proof-driven development ensures mathematically guaranteed security for critical data-at-rest encryption in AWS services, paving the way for more verified AES algorithms.
Topics
- Formal Verification
- AES-XTS
- Cryptographic Algorithms
- Arm64 Assembly
- s2n-bignum
Code references
Best for: CTO, VP of Engineering/Data, Security Engineer, Software Engineer, Research Scientist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Amazon Science homepage.