This is the code for our work in CHES 2025, named XBOOT: Free-XOR Gates for CKKS with Applications to Transciphering. Our implementation is based on the Open-sourced FHE library Lattigo v6.0 [1].
Downloading the latest version of go binary distribution:
wget https://go.dev/dl/go1.24.4.linux-amd64.tar.gzDelete the existing Golang, and unzip the downloaded file into the environment:
sudo rm -rf /usr/local/go # delete old version if exists
sudo tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gzEditing the shell file and adding the following command (if not existing):
nano ~/.bashrc
export PATH=$PATH:/usr/local/go/binSaving and enabling:
source ~/.bashrcThis part is located at
# Modified EvalMod function
./circuits/ckks/mod1
# New bootstrapping function added
./circuits/ckks/bootstrapping
# The EvalMod f_bin interpolation function
./utils/cosine/cosine_approx.go
We implement the XBOOT transcipering in ./ckks_cipher/, which contains the following functionalities.
- Evaluation of the AES-CTR in the CKKS scheme
- Evaluation of the Rasta-CTR in the CKKS scheme
We implement the GAWS chisqtest in ./chisqtest/, which contains the following functionalities.
- chisq test scheme (located at (./chisq.go))
An example of Running GWAS chisqtest subsequent XBOOT transciphering is given in ./examples/chisq/main.go.
An example of Running XBOOT-AES transciphering is given in ./examples/transcipher/main.go.
A proof of concept unsecure toy case for AES-CKKS transciphering
cd ./examples/transcipher/main.go
go run main.go --mode=testEnsure you have sufficient RAM (approximately 64GB) and 64 physical CPU cores for improved parallelization.
cd ./examples/transcipher/main.go
go run main.go --mode=benchmarkFor a detailed description of the framework, please refer to our paper:
Chao Niu, Zhicong Huang, Zhaomin Yang, Yi Chen, Liang Kong, Cheng Hong and Tai Wei. 2025. XBOOT: Free-XOR Gates for CKKS with Applications to Transciphering IACR Transactions on Cryptographic Hardware and Embedded Systems, 2025(4), xx-xx. [Link] [DOI]
[1] "Lattigo v6" Online: https://github.com/tuneinsight/lattigo Aug, 2024.
The client-side symmetric encryption function and the FHE key schedule evaluation are not currently included.
Lattigo is licensed under the Apache 2.0 License. See LICENSE.