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.
Install Nix using the Determinate Nix installer:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- installBuild the presentation PDFs:
nix buildOutput is available in ./result/ with PDFs at:
result/presentation.pdf- slide deckresult/presentation-handout.pdf- handout version
Enter the development environment:
nix developThe 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-presentationWatch mode for live rebuilding:
watch-presentationBuilt PDFs are placed in build/.
The presentation contains executable FHE C programs and Solidity smart contracts. Code is automatically extracted from the presentation source and compiled.
Extract and compile C programs with the top-level Makefile:
makeThis 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 artifactsExtract and build contracts:
contracts build # Extract and compile with forge
contracts test # Extract and test with forgeThe contracts script extracts Solidity contracts from the presentation and compiles/tests them using Foundry. Compiled artifacts are placed in build/foundry/.