ku-sldg / copland-avm

Copland Attestation Virtual Machine definition and tools
3 stars 3 forks source link

copland-avm

Copland Attestation Virtual Machine definition and tools. This repository contains formal specifications, implementations, and associated proofs for Copland-based tools that support layered remote attestation. Copland is a domain-specific language for specifying attestation protocols. Over time, this repository has grown to support a larger collection of Copland-based tools called MAESTRO (Measurement and Attestation Execution and Synthesis Toolkit for Remote Orchestration).

Quick Browsing

Using any browser, open the html files in src/html to browse all definitions and theorem statements pretty-printed. All definitions are click-navigable.

Build Instructions

To compile all the proof script dependencies in src/ and step through them interactively, make sure you first install:

  1. Coq (Tested on this fork/branch that supports CakeML code extraction)
    • Note: Make sure this is a LOCAL install (and NOT one installed globally via opam). This should require:
      • gathering dependencies as specified here, then
      • Inside <CoqPath>/coq (top-level of forked Coq repo) run: make world
      • Path Level Configuration
        • Add <CoqPath>/coq/_build/install/default/bin to your PATH environment variable
        • Set the COQLIB environment variable to <CoqPath>/coq/_build/install/default/lib/coq
        • IMPORTANT: hide any previous opam-installed versions. This usually requires deleting a line in your ~/.bashrc (or equivalent) that auto-loads opam tools for each new terminal session.
      • Manual Configuration
        • Alternatively to adding the Coq install to your PATH, you can instead use export COQBIN=<CoqPath>/coq/_build/install/default/bin before running make
  2. VS Code (with VSCoq extension), ProofGeneral, or your favorite Coq IDE

Then type: cd src ; make

Once compilation completes (Some warnings are usually ok, but no errors), open the desired .v file in src/ to step through its definitions and proofs (make will also re-generate the pretty-printed html in src/html for quick browsing).

Source File Descriptions

Preamble.v through Main.v are mostly copies of the original Coq source files from the "Orchestrating Layered Attestations" paper (link), with minor modifications for automation and updates to the Copland language. Those original specs/proofs can be found here.


Questions?

Contact author/maintainer (Adam Petz) at: ampetz@ku.edu