akosba / jsnark

A Java library for zk-SNARK circuits
MIT License
207 stars 85 forks source link

Test case to illustrate how to provide input in hexadecimal format for SHA256 gadget, using different settings for bitWidthPerInputElement #14

Open hasinitg opened 5 years ago

hasinitg commented 5 years ago

Hi Ahmed @akosba ,

Thank you for providing a test case at https://github.com/akosba/jsnark/commit/419907a5d63c5ea56a05ba4739bd034523bea1e6, illustrating how to use different settings for bitWidthPerInputElement in SHA256 gadget, when inputs are character strings.

Following that example, I have created a test case to illustrate how to provide same input in hexadecimal format, using different setting for bitWidthPerInputElement, which was a use case that I came across. I have built and tested the code. Feel free to add as appropriate.

Thank you. Best Regards, Hasini.