ASN1☆: Provably Correct Non-malleable Parsing for ASN.1 DER

被引:2
|
作者
Ni, Haobin [1 ]
Delignat-Lavaud, Antoine [2 ]
Fournet, Cedric [2 ]
Ramananandro, Tahina [2 ]
Swamy, Nikhil [2 ]
机构
[1] Cornell Univ, Ithaca, NY USA
[2] Microsoft Res, Cambridge, England
来源
PROCEEDINGS OF THE 12TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON CERTIFIED PROGRAMS AND PROOFS, CPP 2023 | 2023年
关键词
Formal verification; Parsing; Domain-specific Language; ASN.1;
D O I
10.1145/3573105.3575684
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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(star), 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-star 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(star) parsers extracted to OCaml on both positive and negative test cases involving X.509 certificates and Certificate Revocation Lists (CRLs).
引用
收藏
页码:275 / 289
页数:15
相关论文
共 50 条
  • [21] Comparison tool between two ASN.1 specifications
    France Telecom, CNET/DTL/MSV, F-22 307 Lannion Cedex, France
    Ann Telecommun, 11-12 (539-549):
  • [22] MAP的ASN.1编解码实现
    黄艳军
    汤红波
    朱可云
    通信技术, 2007, (12) : 163 - 165
  • [23] ASN.1 specification for ETSI certificates and encoding performance study
    Hammi, Badis
    Monteuuis, Jean Philippe
    Daniel, Eduardo Salles
    Labiod, Houda
    2017 18TH IEEE INTERNATIONAL CONFERENCE ON MOBILE DATA MANAGEMENT (IEEE MDM 2017), 2017, : 291 - 298
  • [24] ASN.1与SDL语言编程方法研究
    谭鹏
    孙栋
    耿登田
    无线电通信技术, 1999, (02) : 38 - 41
  • [25] PERFORMANCE COMPARISON OF ASN.1 ENCODER DECODERS USING FTAM
    BILGIC, M
    SARIKAYA, B
    COMPUTER COMMUNICATIONS, 1993, 16 (04) : 229 - 240
  • [26] ASN.1 solution of asymmetrical data access in isomer systems
    Miao, Xianglin
    Chen, Kai
    Wang, Junmin
    Miao, Yalin
    Sun, Chao
    Hsi-An Chiao Tung Ta Hsueh/Journal of Xi'an Jiaotong University, 2004, 38 (12): : 1224 - 1227
  • [27] Performance Analysis of Existing 1609.2 Encodings v ASN.1
    Kumar, Virendra
    Whyte, William
    SAE INTERNATIONAL JOURNAL OF PASSENGER CARS-ELECTRONIC AND ELECTRICAL SYSTEMS, 2015, 8 (02): : 356 - 363
  • [28] The mechanism of ASN.1 encoding & decoding implementation in network protocols
    Lv, Q
    Huang, BX
    Wang, F
    ITCC 2003: INTERNATIONAL CONFERENCE ON INFORMATION TECHNOLOGY: COMPUTERS AND COMMUNICATIONS, PROCEEDINGS, 2003, : 622 - 626
  • [29] PROGRAMMING WITH ASN.1 USING POLYMORPHIC TYPES AND TYPE SPECIALIZATION
    LAVENDER, RG
    KAFURA, DG
    MULLINS, RW
    UPPER LAYER PROTOCOLS, ARCHITECTURES AND APPLICATIONS, 1994, 25 : 151 - 166
  • [30] Overexpression of the ASN1 gene enhances nitrogen status in seeds of Arabidopsis
    Lam, HM
    Wong, P
    Chan, HK
    Yam, KM
    Chen, L
    Chow, CM
    Coruzzi, GM
    PLANT PHYSIOLOGY, 2003, 132 (02) : 926 - 935