TA-Daniel
Getting started
- Make sure G++ and NVCC is installed in your system
- Follow the instructions here to install G++: https://linuxhint.com/install-g-compiler-on-ubuntu/?__cf_chl_tk=DfyJYl418VFCcW70kYdO2o_bR6jSd2HzEj2e9W91mAg-1681342297-0-gaNycGzNC-U
- Follow the instructions here to install nvcc: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/
How To Code and Run (Serial):
- Put your code in test.cpp
- execute
$ chmod +x test.sh
- execute
$ chmod +x /comptest.sh
- execute
$ chmod +x /src/compile.sh
- Run ./test.sh to automatically compile and run the code
How to Code and Run (Parallel):
- Navigate to /cuda
- Put your code in test.cu
- execute
$ chmod +x run.sh
- Run ./run.sh to automatically compile and run the code
Function and Class Use
- Encoder: Class to encode input into polynom and decode it back to input vector
- Serial: Encoder.cpp
- Parallel: Parallel.cu
- Methods:
- Encode: To encode complex vectors into integer polynom
- Decode: To decode polynom into vector of complex numbers
- PubKey, SecKey, EvalKey: Class to generate and store public, secret and evaluation key
- serial: evalkey.cpp, pubkey.cpp, seckey.cpp
- parallel: evalkey.cu, pubkey.cu, seckey.cu
- Methods:
- Constructors: To instantiate the key objects
- Ciphertext: Class that holds ciphertext
- serial: ciphertext.cpp
- parallel: ciphertext.cu
- Methods:
- Constructor: To create ciphertext
- CKKS: The class containing homomorphic operation of CKKS
- serial: ckks.cpp
- parallel: ckks.cu
- Methods:
- Encrypt: Encrypt polynom into ciphertext
- Decrypt: Decrypt ciphertext back to plaintext
- Mult: To multiply 2 ciphertext homomophically (include relin and rescaling)
- MultNTT: To multiply 2 ciphertext homomophically (include relin and rescaling) with NTT approach
- Add: To add 2 ciphertext homomorphically