Skip to content

Formal specification of attestation mechanisms in Confidential Computing

License

Notifications You must be signed in to change notification settings

CCC-Attestation/formal-spec-TEE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Formal Specification and Verification of Architecturally-defined Attestation Mechanisms in Confidential Computing

This repo contains the artifacts for formal specification and verification of architecturally-defined remote attestation in the following groups:

  1. Vendor solutions:

    • Intel TDX
  2. Architecture led solutions:

    • Arm CCA

The groups are based on the level of customization possible.

Motivation

Attestation is one of the most critical mechanisms of Confidential Computing. Unfortunately, the attestation mechanisms provided by TEEs are quite complex and thus these are not well-understood even by those who call themselves "experts". This lack of understanding has led to several exploits (such as SGAxe) and bugs (such as those found by Google).

The project aims at a better understanding of these mechanisms and the underlying trust assumptions via formal specification and verification. These mechanisms can then be composed with transport protocols (e.g., TLS and SPDM) to build attestation frameworks.

Main Challenge

The main challenge is the extraction of the attestation protocol to be formalized, as all the vendors (including Intel, Arm1, AMD and IBM) describe the attestation protocols informally.

  • Challenge 1: Incomplete specs (e.g., see here)
  • Challenge 2: Vague and outdated specs (e.g., see here)

Approach

Our formal models are based on:

  • in-depth reading of Intel and Arm specification documents, mainly:
    • Arm CCA
      • RME System Architecture (Document number ARM DEN 0129, version A.d, release date 12 October 2022)
      • RMM Spec (Document number ARM DEN 0137, version 1.0-eac2, release date 7 June 2023)
    • Intel TDX
      • Intel TDX white paper
      • Architecture Specification: Intel Trust Domain Extensions Module (Order Number: 344425-004US, pp. 1–316, June 2022)
      • Intel SGX PCK Certificate and Certificate Revocation List Profile Specification (Revision 1.5, 6 January 2022)
  • our experience with Intel SGX (on which the attestation architecture of Intel TDX is largely based)
  • extensive discussions with Intel and Arm

Tool

We use state-of-the-art symbolic security analysis tool ProVerif for the specification of the protocols.

Scientific Publication

The work is published at open-access journal IEEE Access and should be cited as follows:

M. U. Sardar, T. Fossati, S. Frost, S. Xiong, Formal Specification and Verification of Architecturally-defined Attestation Mechanisms in Arm CCA and Intel TDX, IEEE Access, 2024.

BibTeX:

@ARTICLE{Sardar2024CcaTdx,
  author={Sardar, Muhammad Usama and Fossati, Thomas and Frost, Simon and Xiong, Shale},
  journal={IEEE Access}, 
  title = {{Formal Specification and Verification of Architecturally-defined Attestation Mechanisms in Arm CCA and Intel TDX}},
  year={2024},
  volume={12},
  number={},
  pages={361-381},
  doi={10.1109/ACCESS.2023.3346501}
}

Technical Specifications

Authors: Muhammad Usama Sardar, Thomas Fossati, Simon Frost and Shale Xiong

  • Draft focusing on TEE-agnostic architecture
  • Paper focusing on formal specification and verification

Important results

  • We formally prove the insecurity of the TCB claimed by Intel for TDX (see here). This was reported to Intel and fixed in the latest specs.
  • We formally prove that architecturally-defined attestation does not provide authentication property.
  • Ambiguities found during the process of formalization in Arm's and Intel's specification of CCA and TDX attestation are summarized in Sections III.H and IV.H (plus Appendix A), respectively, in the paper. These have been reported to the respective vendors.
  • The lead author (Muhammad Usama Sardar) noticed the lack of transparency in Intel's documentation process for TDX where Intel updates all the TDX white papers and specifications on the same URLs (with the older version of specs just disappearing), e.g., Intel TDX white paper and TDX Module base specs. He reported this to Intel privately and later publicly in June 2023.

Use cases

  • See another interesting project where our artifacts for Arm CCA are being used as a foundation for the formal verification of a specific proposal of composition of remote attestation and transport protocols (see corresponding IETF draft).
  • Intel is using our artifacts for Intel TDX for the formal verification of vTPM TD solution for Intel TDX.

Limitations

The symbolic security analysis has the following inherent limitations:

  1. Cryptographic primitives (hash, encryption, MAC, digital signatures) are assumed to be perfect.
  2. Side-channels are out of scope.

Complementary approaches and tools (e.g., CryptoVerif) can be used to tackle these limitations.

Acknowledgments

We would like to thank the following for insightful discussions and helpful feedback.

  • Nikolaus Thümmel (Scontain)
  • Ante Derek (Univeristy of Zagreb)
  • Jiewen Yao (Intel)

Running automatic proofs

Installing ProVerif

Install the latest version (2.05 at the moment) of ProVerif: see https://bblanche.gitlabpages.inria.fr/proverif/ for details. See Section 1.4 of manual for installation options:

  • via OPAM: Section 1.4.1
  • from sources: Section 1.4.2 or simply try the provided script
  • from binaries: Section 1.4.3

Formal Analysis of Attestation

  1. Run as follows:

proverif <filename>.pv

For TDX: proverif TDX/TDX.pv

For CCA: proverif CCA/ArmCCA_RA.pv

  1. Generation of traces for failing properties: In order to additionally generate a trace for each property which results in "false", create a subfolder for results before executing.

Then to execute: run as follows: proverif -graph <subfolderNameForResults> <filename>.pv

Subfolder will contain the traces in .dot as well as .PDF.

  1. Horn clauses: To additionally see the Horn clauses generated in ProVerif:

3a. use command-line option -test as follows: proverif <filename>.pv -test

OR

3b. add one of the following two settings inside the input (*.pv) file:

  • set verboseClauses = short. to display the Horn clauses

  • set verboseClauses = explained. to additionally display a sentence after each clause it generates to explain where this clause comes from.

  1. Interactive mode: To run in interactive mode: proverif_interact <filename>.pv

ProVerif Tutorial

Vincent Cheval recently gave a nice tutorial on ProVerif at EuroProofNet event.

Talks and Research Visits

Here is a list of talks and research visits (in reverse chronological order) on the project.

Event/Host Venue Date(s) Funding Material
NSA Symposium on Hot Topics in the Science of Security (HotSoS) 2024 Virtual 3 April, 2024 - slides video
Program Analysis and Verification on Trusted Platforms (PAVeTrust) 2023 Austin, Texas, USA (virtual) 5 December, 2023 TBTL slides
24th International Conference on Formal Engineering Methods (ICFEM 2023) Brisbane, Australia 21-24 November, 2023 Partly by TBTL; looking for sponsors slides
IETF 118 Prague, Czechia 4-10 November, 2023 CPEC (Mini-project) slides
Hardware and Architectural Support for Security and Privacy (HASP) 2023 Toronto, Canada (Virtual) 29 October, 2023 Flashbots slides
Formal Methods in Computer-Aided Design (FMCAD) 2023 Ames, Iowa, USA 23-27 October, 2023 FMCAD Association Visa delayed
Confidential Computing Mini Summit (co-located with OSS EU) Bilbao, Spain 18 September, 2023 CCC slides video
CCC SIG Progress update Virtual 12 September, 2023 - slides video
Research visit at University of Edinburgh and Heriot-Watt University Edinburgh, UK 11-13 September, 2023 EuroProofNet -
16th Conference on Intelligent Computer Mathematics (CICM) Cambridge, UK (Virtual) 6 September, 2023 slides
Highlights of Logic, Games and Automata Kassel, Germany 28 July, 2023 Secretarium slides
Output Dresden, Germany 29 June, 2023 - slides
Invited talk at Formal Methods for Security Network and Cyber Security & Privacy Seminar Series Virtual 28 June, 2023 - slides video
16th Interaction and Concurrency Experience (ICE) Lisbon, Portugal 19 June, 2023 CPEC slides
OCP Security Virtual 13 June, 2023 - slides video
CCC SIG Progress update Virtual 6 June, 2023 - slides video
IEEE Symposium on Security and Privacy (SnP) San Francisco, USA 22-24 May, 2023 TBTL, Flashbots and konVera slides
Invited talk at Heriot-Watt University: Joining details Edinburgh, UK 17 May, 2023 EuroProofNet slides
Invited talk at University of Edinburgh: Joining details Edinburgh, UK 16 May, 2023 EuroProofNet slides video
2023 OCP Regional Summit Prague, Czech Republic 20 April, 2023 CPEC slides video
NSA Symposium on Hot Topics in the Science of Security (HotSoS) Virtual 3-5 April, 2023 - slides
2023 Annual Meeting of the WG "Formal Methods for Security" Roscoff, France 28-30 Mar, 2023 CPEC slides
Invited talk at CISPA Helmholtz Center for Information Security Saarbrücken, Germany 15 Mar, 2023 CPEC slides
Invited talk at University of Luxembourg Luxembourg 13-14 Mar, 2023 CritiX @ University of Luxembourg slides
WG3 Program Verification Meeting of EuroProofNet Timisoara, Romania 8-9 Feb, 2023 EuroProofNet slides

Feedback/Comments/Critique/Contributions

We would love to have your feedback (especially critique! yes, this is how the science progresses, but please be genuine!) and contributions. Contact Muhammad Usama Sardar on CCC Slack Workspace, or by email, or open an issue.

Notes

Footnotes

  1. Arm has internally verified the security and safety properties of both the specification and a prototype implementation of the RMM using HOL4 theorem prover and CBMC model checker. However, this work does not cover attestation mechanisms.

About

Formal specification of attestation mechanisms in Confidential Computing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages