Skip to content

Repository files navigation

Private Voting with FHE

C Compilation Solidity Compilation Presentation Build Nix Flake

Download Presentation PDF Download Handout PDF

Presentation about private voting using Fully Homomorphic Encryption. This project combines presentation slides with executable code examples, including FHE C programs and Solidity smart contracts.

Prerequisites

Install Nix using the Determinate Nix installer:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

Building

Build the presentation PDFs:

nix build

Output is available in ./result/ with PDFs at:

  • result/presentation.pdf - slide deck
  • result/presentation-handout.pdf - handout version

Development

Enter the development environment:

nix develop

The development shell includes Sunscreen's LLVM toolchain with clang for FHE compilation, Foundry for Solidity, and Pandoc with LaTeX for presentation building. Upon entering the shell, available commands are displayed.

Build manually:

build-presentation

Watch mode for live rebuilding:

watch-presentation

Built PDFs are placed in build/.

Working with Code

The presentation contains executable FHE C programs and Solidity smart contracts. Code is automatically extracted from the presentation source and compiled.

FHE Programs

Extract and compile C programs with the top-level Makefile:

make

This extracts C code from the presentation and compiles it using Sunscreen's LLVM toolchain targeting the parasol architecture. Compiled binaries are placed in fhe-programs/compiled/.

Individual targets:

make extract  # Extract C code only
make build    # Compile extracted code
make clean    # Remove build artifacts

Solidity Contracts

Extract and build contracts:

contracts build     # Extract and compile with forge
contracts test      # Extract and test with forge

The contracts script extracts Solidity contracts from the presentation and compiles/tests them using Foundry. Compiled artifacts are placed in build/foundry/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors