Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collapsing Towers for Side-Channel Security

We explore multi-stage programming to detect side-channel vulnerabilities in hardware-software systems via the technique of Collapsing Towers of Interpreters. The idea is to specialize an assembly program wrt a hardware processor written as a staged interpreter (including micro-architectural details like speculation and data caching) and produce a residue C program semantically equivalent to the original assembly program but with explicit micro-architectural details, including the side-channel information reified into first-order variables. An off-the-shelf analyzer (like CBMC) can then analyze the residue C file to check whether the first-order timing and secret inputs are noninterfering.

Publications

This work is an adaptation of the work described in PEPM '25 to Scala 3 and ELMS.

The source code corresponding to that paper can be found in src/test/scala/elms.

Running the examples

This generator project requires sbt and Java version >21. We depend on ELMS (vendored).

Running sbt test from the root will run all the tests, generating .actual files and checking them against the .check files in src/out. Failing tests will leave the generated .actual files for inspection. Snapshot files mostly follow the naming convention of [testfile]/[suffix].check.c.

The examples are verified using CBMC as follows:

cbmc -DCBMC --verbosity 4 --slice-formula --unwind 1000 --refine --compact-trace <file.c>

For convenience, we also provide verify, invoked as

./verify <file1.c> <file2.c> ...

Note that not all .check.c files are expected to pass verification -- most are intended to demonstrate that CBMC can detect a vulnerability. We are working on making a comprehensive list of which files are expected to pass and which do not.

CBMC

We use the C Bounded Model Checker (CBMC) as an off-the-shelf analyzer since our residue C programs are ordinary programs where timing is an ordinary first-order variable. Some pointers:

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages