C-ACES is a C implementation of ACES (Arithmetic Channel Encryption Scheme), a novel cryptosystem constructed using category theory, specifically leveraging the Yoneda Lemma. ACES eliminates the need for bootstrapping techniques, offering a more efficient and secure Fully Homomorphic Encryption (FHE) scheme.
This repository provides a practical and efficient implementation of ACES in C, enabling experimentation and integration into various systems requiring secure computations. It serves as an educational and experimental endeavor for exploring the implementation of ACES.
Please note that a Python implementation of ACES is already available, For additional documentation please refer to the original Python implementation repository. You can find extensive documentation and resources there to aid in understanding and using ACES.
- CMake (version 3.16 or higher)
- A C compiler that supports C11 (e.g., GCC or Clang)
- Clone the Cring repository to your local machine:
git clone https://github.com/your-username/Cring.git - build
cmake -B Release -DCRING_EXAMPLE=ON -DCRING_TEST=ON .
cmake --build ReleaseHere's a simple example of using C-ACES to do FHE operations:
// initialize aces with proper parametersAcesaces;
set_aces(&aces, DIM, memory, MEMORY_SIZE);
init_aces(2/*p*/, 33/*q*/, DIM, &aces);
// encrypt message 1uint64_tmessage_1=4;
CipherMessageencrypted_message_1;
aces_encrypt(&aces, &message_1, 1, &encrypted_message_1);
// encrypt message 2uint64_tmessage_2=3;
CipherMessageencrypted_message_2;
aces_encrypt(&aces, &message_1, 1, &encrypted_message_1);
uint64_tmessage_result;
CipherMessageencrypted_result;
// add encrypted_message_1 and encrypted_message_2aces_add(&encrypted_message_1, &encrypted_message_2, &aces.shared_info, &encrypted_result);
// decrypt resultaces_decrypt(&aces, &encrypted_result, 1, &message_result);
uint64_texpected_result= (message_1+message_2) % 2/*p*/;
assert(expected_result==message_result);For more usage examples, explore the examples folder.
- Rémy Tuyéras. (2024). Constructing a fully homomorphic encryption scheme with the Yoneda Lemma. arXiv preprint arXiv:2401.13255. Link