This repository contains the official code for the paper "Rethinking the Stealthiness of Cryptographically Undetectable Backdoors in Practical RFF Learning", accepted by KDD 2026.
conda create --name cryptobackdoor python=3.9
conda activate cryptobackdoor
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124
pip install numpy scikit-learn scipy matplotlib tqdm cvxpyCIFAR-10 is downloaded automatically. For Covertype, please download and place the data file at:
./dataset/covtype.data
CryptoBackdoor/
├── README.md
├── detect.py
└── src/
├── cifar10_acc.py
├── cifar10_clwe.py
├── covertype_acc.py
└── covertype_clwe.py
Compares accuracy under different preprocessing choices such as raw input, standardization, and scaling on CIFAR-10 and Covertype.
Runs the CLWE/Goldwasser-style backdoor attack on CIFAR-10 and Covertype. It trains an RFF classifier, constructs a malicious feature matrix and trigger vector bk, then reports clean accuracy, triggered accuracy, and prediction flip ratio.
Evaluates a detector for triggered samples. It marks a sample as suspicious when its infinity norm exceeds a threshold and reports detection rate and false positive rate under different preprocessing settings.
mkdir -p dataset figs
python src/cifar10_acc.py
python src/covertype_acc.py
python src/cifar10_clwe.py
python src/covertype_clwe.py
python detect.py