Browse files

Encryption Example: Key Exchange + Symmetric Enc

Updated readme
  • Loading branch information...
akosba committed Jun 9, 2016
1 parent 03a2e75 commit f690b577870c4de9f1802342a15d21aa288c4a73
Showing with 2 additions and 1 deletion.
  1. +2 −1
@@ -77,7 +77,8 @@ Note: An IDE, e.g. Eclipse, or possibly the ant tool can be used instead to buil
- __Gadgets with witness computations done outside the circuit__: ``, ``. This way of writing circuits is useful when verification is more efficient than computation, and when the prover witness value can be inferred automatically in the circuit. Note the usage of `specifyProverWitnessComputation(..)`. This must be positioned before the steps where the witness is used.
- __SHA256 Gadget__: This is a manually-optimized SHA256 Gadget for variable-length input with a padding option. The code is written to be similar to how SHA256 is written in C, except for three main things: keeping track of bitwidth, manual optimizations for computation of ch and maj, and the explicit handling of overflows. Making use of jsnark's optimizations, our implementation for the SHA256 gadget costs __26196 constraints for one block__. If padding is applied within the block, the cost can be even lower.
- __Pinocchio Integration__: `` and ``. The Pinocchio gadget can be used to use compiled circuits by the Pinocchio compiler as gagdets. `` shows how to use a compiled Auction circuit by Pinocchio, and augment it with other manually-developed gadgets. This can help in the cases where the programmer needs to take care only of the bottleneck parts of the circuits.
-- __JUnit Tests__: Some JUnit tests are included for primitive operations and for SHA-256. This can illustrate how to write gadgets and test them.
+- __Hybrid Encryption Example__: The circuit main file is in ``. The circuit uses the gadgets defined in `examples/gadgets/encrypt/`, which are for key exchange (using field extension) and symmetric encryption using the speck cipher. Other variants will be added in the future.
+- __JUnit Tests__: Some JUnit tests are included for primitive operations, SHA-256 and the encryption gadgets. This can illustrate how to write gadgets and test them.
### Writing Circuits using jsnark

0 comments on commit f690b57

Please sign in to comment.