FHE Average Computation Demo

Compute the average of encrypted numbers without ever decrypting them.

How it works

  1. Generate keys locally using the client-tools CLI
  2. Encrypt your data locally — numbers become a ciphertext file
  3. Upload the ciphertext to this platform
  4. Compute — the server computes the average on encrypted data (GPU-accelerated)
  5. Download the encrypted result
  6. Decrypt the result locally with your secret key

Quick Start with Demo Keys

# Install client-tools
cd fhe-tools-and-demos/client-tools
bash init/setup-venv.sh && source venv.sh

# Create test data
echo -e "1.5\n2.3\n3.1\n4.7" > data.txt

# Encrypt with demo keys
python -m client_tools encrypt --input data.txt --output ct.bin \
  --public-dir ./demo_keys/publickeys

# Upload ct.bin on the Upload page, then download the result

# Decrypt the result
python -m client_tools decrypt --input result.bin --output result.json \
  --secret-dir ./demo_keys/secretkey -n 4