Abhiroop / HasTEE

HasTEE⁺ - Haskell DSL for programming TEEs
Other
3 stars 1 forks source link

HasTEE⁺

A Haskell DSL for programming Trusted Execution Environments (TEEs).

See app/Main.hs and the examples directory for sample programs.

Papers on HasTEE⁺:

HasTEE: Programming Trusted Execution Environments with Haskell - Version 1 of the DSL.

HasTEE⁺: Confidential Cloud Computing and Analytics with Haskell - Submitted to ESORICS 2024. Current version of the DSL.

Building

SGX Machine Dependencies

For running on Intel SGX-enabled machines there are two complex dependencies. Note the DSL can be run without these two dependencies on standard machines (but not on SGX). Read past the two bullets for standard non-SGX setup.

NOTE: The current cabal.project expects the trusted GHC at a particular location. For building this on your local machine that doesn't have SGX or the custom GHC, use - cabal build --project-file=cabal-nosgx.project.

The program is compiled n times for n binaries

Using cabal

-- For the enclave
cabal run -f enclave

-- For the client
-- `runAppRA "client1"...` should match the type-level string captured by the Client monad
cabal run

Follow the above order - run enclave first and then the client. The enclave is stateful and can be tested by running the enclave first and then calling the client repeatedly for the program in Main.hs.

Installed Binary Location

cabal exec which EnclaveIFC-exe

Client integrity check

Enabled with -fintegrity-check. Disabled by default. Works with the mbed-tls-based Remote Attestation protocol.