ASN1*: Provably Correct, Non-Malleable Parsing for ASN.1 DER (bibtex)
by Ni, Haobin, Delignat-Lavaud, Antoine, Fournet, Cédric, Ramananandro, Tahina and Swamy, Nikhil
Abstract:
Abstract Syntax Notation One (ASN.1) is a language for structured data exchange between computers, standardized by both ITU-T and ISO/IEC since 1984. The Distinguished Encoding Rules (DER) specify its non-malleable binary format: for a given ASN.1 data type, every value has a distinct, unique binary representation. ASN.1 DER is used in many security-critical interfaces for telecommunications and networking, such as the X.509 public key infrastructure, where non-malleability is essential. However, due to the expressiveness and flexibility of the general-purpose ASN.1 language, correctly parsing ASN.1 DER data formats is still considered a serious security challenge in practice. We present ASN1*, the first formalization of ASN.1 DER with a mechanized proof of non-malleability. Our development provides a shallow embedding of ASN.1 in the F* proof assistant and formalizes its DER semantics within the EverParse parser generator framework. It guarantees that any ASN.1 data encoded using our DER semantics is non-malleable. It yields verified code that parses valid binary representations into values of the corresponding ASN.1 data type while rejecting invalid ones. We empirically confirm that our semantics models ASN.1 DER usage in practice by evaluating ASN1* parsers extracted to OCaml on both positive and negative test cases involving X.509 certificates and Certificate Revocation Lists (CRLs).
Reference:
ASN1*: Provably Correct, Non-Malleable Parsing for ASN.1 DER (Ni, Haobin, Delignat-Lavaud, Antoine, Fournet, Cédric, Ramananandro, Tahina and Swamy, Nikhil), In Proceedings of the 12th ACM SIGPLAN International Conference on Certified Programs and Proofs, Association for Computing Machinery, 2023.
Bibtex Entry:
@inproceedings{asn1star,
author = {Ni, Haobin and Delignat-Lavaud, Antoine and Fournet, C\'{e}dric and Ramananandro, Tahina and Swamy, Nikhil},
title = {ASN1*: Provably Correct, Non-Malleable Parsing for ASN.1 DER},
year = {2023},
isbn = {9798400700262},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3573105.3575684},
doi = {10.1145/3573105.3575684},
abstract = {Abstract Syntax Notation One (ASN.1) is a language for structured data exchange between computers, standardized by both ITU-T and ISO/IEC since 1984. The Distinguished Encoding Rules (DER) specify its non-malleable binary format: for a given ASN.1 data type, every value has a distinct, unique binary representation. ASN.1 DER is used in many security-critical interfaces for telecommunications and networking, such as the X.509 public key infrastructure, where non-malleability is essential. However, due to the expressiveness and flexibility of the general-purpose ASN.1 language, correctly parsing ASN.1 DER data formats is still considered a serious security challenge in practice. We present ASN1*, the first formalization of ASN.1 DER with a mechanized proof of non-malleability. Our development provides a shallow embedding of ASN.1 in the F* proof assistant and formalizes its DER semantics within the EverParse parser generator framework. It guarantees that any ASN.1 data encoded using our DER semantics is non-malleable. It yields verified code that parses valid binary representations into values of the corresponding ASN.1 data type while rejecting invalid ones. We empirically confirm that our semantics models ASN.1 DER usage in practice by evaluating ASN1* parsers extracted to OCaml on both positive and negative test cases involving X.509 certificates and Certificate Revocation Lists (CRLs).},
booktitle = {Proceedings of the 12th ACM SIGPLAN International Conference on Certified Programs and Proofs},
pages = {275–289},
numpages = {15},
keywords = {Formal verification, ASN.1, Parsing, Domain-specific Language},
location = {Boston, MA, USA},
series = {CPP 2023}
}
Powered by bibtexbrowser