CoolFace
Datasetpublic

yifeiz29/fhe-challenge-data

FHE Challenge Benchmark 20 FHE challenges from FHERMA for evaluating AI agents. Directory Structure fhe_challenge/ ├── black_box/ # Pre-encrypted test cases (3) │ ├── challenge_relu/ │ ├── challenge_sigmoid/ │ └── challenge_sign/ ├── white_box/ │ ├── openfhe/ # OpenFHE C++ challenges (11) │ ├── ml_inference/ # ML model challenges (4) │ └── non-OpenFHE/ # Other libraries (2) └── README.md Challenge Types… See the full description on the dataset page: https://huggingface.co/datasets/yifeiz29/fhe-challenge-data.

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes6downloads
Dataset Card

FHE Challenge Benchmark

20 FHE challenges from FHERMA for evaluating AI agents.

Directory Structure

fhe_challenge/
├── black_box/              # Pre-encrypted test cases (3)
│   ├── challenge_relu/
│   ├── challenge_sigmoid/
│   └── challenge_sign/
├── white_box/
│   ├── openfhe/            # OpenFHE C++ challenges (11)
│   ├── ml_inference/       # ML model challenges (4)
│   └── non-OpenFHE/        # Other libraries (2)
└── README.md

Challenge Types

TypeCountKey GenEncryptDecryptAgent Task
Black Box3Pre-donePre-doneValidatorImplement eval()
White Box17ValidatorValidatorValidatorImplement full solution

Black Box (3 challenges)

Agent receives pre-encrypted inputs and keys. Implements eval() function.

ChallengeSchemeFunctionInput RangeDepth
reluCKKSmax(0, x)[-1, 1]12, 4
sigmoidCKKS1/(1+e^-x)[-25, 25]7, 4
signCKKSsign(x)[-1, 1]10

White Box - OpenFHE (11 challenges)

ChallengeSchemeTask
array_sortingCKKSSort array ascending
geluCKKSGELU activation function
invertible_matrixCKKSMatrix invertibility check
knnCKKSK-nearest neighbors (k=10)
lookup_tableBFVTable lookup by index
matrix_multiplicationCKKS64x64 matrix multiply
maxCKKSFind maximum element
parityCKKSCompute parity bit
shlBFVShift left operation
softmaxCKKSSoftmax function
svdCKKSSVD decomposition

White Box - ML Inference (4 challenges)

ChallengeModelTaskTemplate
cifar10CNNImage classification (10 classes)C++
house_predictionLinearPrice regressionPython
sentiment_analysisClassifierText sentiment (3 classes)Python
svmSVMFraud detectionC++

White Box - Non-OpenFHE (2 challenges)

ChallengeLibrarySchemeLanguage
string_searchIBM HElayersCKKSPython
swiftApple swift-homomorphic-encryptionBFVSwift

Running Challenges

Black Box

bash
cd black_box/challenge_relu
docker build -t relu .
docker run --rm -v $(pwd)/tests/testcase1:/data relu

White Box

bash
cd white_box/openfhe/challenge_max
./verify.sh

CLI Arguments

All challenges use consistent CLI args:

  • --cc - CryptoContext
  • --key_pub - Public key
  • --key_mult - Multiplication/relinearization key
  • --key_rot - Rotation keys
  • --output - Output ciphertext path
  • Challenge-specific input args (--input, --sample, --array, etc.)

Resources