Commit Graph

7 Commits

Author SHA1 Message Date
therealyingtong 9b47bd0db4 sinsemilla::tests: Use separate constants columns for chips.
To be replaced by the public inputs API.
2021-06-25 15:07:27 +08:00
therealyingtong bdcdb8ac13 Move witness_message() and witness_message_piece_bitstring() to gadget level
These instructions were not making any assignments; instead, they
were calling through to witness_message_piece_field().

This PR also renames the witness_message_piece_field() instruction
to witness_message_piece().
2021-06-25 15:07:27 +08:00
Jack Grigg a01c2ee829 test: Print layout for Sinsemilla test circuit 2021-06-20 11:51:33 +01:00
therealyingtong 158ab865f8 gadget::sinsemilla.rs: Add Sinsemilla test. 2021-06-19 18:17:11 +08:00
therealyingtong ebb7dae063 sinsemilla::chip.rs: Add Sinsemilla chip.
The chip that will implement SinsemillaInstructions.
2021-06-19 18:14:22 +08:00
therealyingtong e2859df4eb sinsemilla::message.rs: Add message module.
This defines a Sinsemilla message in terms of pieces and subpieces.
This is useful when decomposing field elements and packing them
into K-bit messages.
2021-06-19 18:14:22 +08:00
therealyingtong af2ac762f4 gadget::sinsemilla.rs: Add Sinsemilla instructions.
SinsemillaInstructions has two const generic parameters: K, which
is the number of bits in each word of the hash, and MAX_WORDS,
which is the maximum number of words the hash can process.

For Orchard, K = 10, MAX_WORDS = 253.
2021-06-19 18:14:22 +08:00