octra-labs/pvac_hfhe_cpp — reverse-engineered prompt
Reverse engineered prompt
Build me a small C++17 proof of concept crypto library that lets me do simple arithmetic on encrypted numbers in a 127 bit prime field. I want it to feel like a header only library that I can drop into another project, generate keys, encrypt a couple of values, do add, subtract, and multiply on the ciphertexts, then decrypt and confirm the results come back correctly.
Please include a very simple example program that shows something like 42 and 17 being encrypted, combined on the server side, and checked after decryption. Add tests and a few benchmark or demo commands so I can build and run everything with make and quickly see that it works. If there are depth or recryption style demos that matter for this proof of concept, include those too.
Keep it practical and easy to compile with common C++17 compilers, and optimize for a normal modern CPU if helpful. You can look up current docs or references online if you need to.
Want more depth? Deep Reverse