Skip to content

sharkbot1/tfhe-aes-128

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TFHE AES

This repo contatins a fully homomorphic implementation of AES-128 based on TFHE-rs. The design and implementation details can be found in Design and Implemetation.

Setup the environment

  1. install the rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs  > sh.rustup.rs 
bash sh.rustup.rs -y --default-toolchain nightly-2024-11-29
. "$HOME/.cargo/env"
  1. build the project
cargo build --release

Run

Usage:

# `<key>` and `<iv>` are hexadecimal strings corresponding to 128-bit integers
cargo run --release -- --key <key> --iv <iv> --number-of-outputs <n>

Example:

# run the benchmark, takes about ~8 minutes on a vm with 192 vcpus of 4th gen AMD EPYC processors
cargo run --release -- --key 0x2b7e151628aed2a6abf7158809cf4f3c --iv 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff --number-of-outputs 192

The output looks like:

number-of-outputs: 192
key              : "0x2b7e151628aed2a6abf7158809cf4f3c"
iv               : "0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff"
AES key expansion took: 11.502926454s
AES of #192 outputs computed in: 478.098018668s
AES test passed!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages