Encrypted Digital Circuit Evaluator using OpenFHE’s FHEW/TFHE to execute digital circuits described in various formats. Check it out at GitHub - openfheorg/openfhe-boolean-circuit-evaluator: Encrypted Digital Circuit Evaluator using OpenFHE's FHEW/TFHE to execute digital circuits described in various formats. Contributed by @dcousins
I’m trying to run some of the complicated examples of the Boolean Circuit Evaluator, e.g.: sha256.
The execution does not finish the “generating netlist” step, even after several hours.
Does this make sense?
If so, will binary serialization and deserialization of the Circuit.inputGates and Circuit.allGates as whole to files can help?
Also, is there performance difference between Bristol Fashion and Bristol Format circuits, or it’s just a representation difference?
Thank you in advance.
Hi, Thanks for your interest in running this, it has been a while since I ran these.
there are a few steps, and they generate intermediate files (like the netlist etc) that can be saved and skipped over later. make sure you have appropriate permissions for directories etc – I do not think there is a lot of error checking at that stage. Review the steps in the readme.
Checking the read me it does say:
TB_sha256
runs thesha-256.txt
test case from the crypto directory. Note: this takes a long time to run typically.*
is it still running , i.e can you see the process consuming cpu time? memory? etc? or is it just frozen?
- What environment are you using, we only test with linux?
- Does it run with the simpler examples?
and does it run with TOY settings? though it does not have any security, it will have the fastest execution.
If those work and the SHA does not, are you running it with the version of openfhe that is cited in the readme 1.10.3.? I don’t think anyone verifies operation of this repo when they update openFHE occasionally “things” happen that break these auxiliary repos.
As for the bristol files they come direct from their repos, and were developed initially for garbled ckt implementation (so they favor X(n)OR) otherwise I do not know much about them – they are not supported in electrical engineering design tool chains that I am aware of.
There is almost a one to one correspondence between # lines and # gates so I suppose you could count gates with a simple linux script. The links to their source repos are provided in the README.md so there may be more description there.
The original bristol ckts had i/o restrictions IIRC. I think the later ones added more I/O and gate features, and they may have regenerated some of the codes (like AES) to give smaller circuits.
We are really looking for someone to port a much more universal format such as BLIF which can be output by many digital design tool suites.
Finally how much memory do you have? that may be an issue, especially if things just stop.
Also the code parallelizes over all available cores in your machine, so running on a bigger machine is almost linearly faster, though you may be stuck before that.
I can try running this again with the newest openfhe and see what happens but it will take a while to get to.
-Dave