This is the official implementation of the paper "Breaking the Layer Barrier: Remodeling Private Transformer Inference with Hybrid CKKS and MPC".
./setup_env_and_build.sh
clone phantom from https://github.com/encryptorion-lab/phantom-fhe.git
apply 0001-.patch for phantom
build phantom in SCI/extern/phantom
cd SCI/tests
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=./install .. -DNO_REVEAL_OUTPUT=ON
cmake --build . --target install --parallel
./bin/ckks_bert_large_main r=1 p=1234 && ./bin/ckks_bert_large_main ip=127.0.0.1 r=2 p=1234
Important test data in BLB paper is in /SCI/output/