mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-05 20:10:32 +00:00
Merge pull request #109 from zcash/fix-book-tests
book: Fix book tests by adding missing definitions to SHA-256 page
This commit is contained in:
commit
d47c83febf
1 changed files with 9 additions and 0 deletions
|
|
@ -18,6 +18,15 @@ gadget to consume input in 32-bit chunks.
|
||||||
The SHA-256 gadget requires a chip with the following instructions:
|
The SHA-256 gadget requires a chip with the following instructions:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
# extern crate halo2;
|
||||||
|
# use halo2::plonk::Error;
|
||||||
|
# use std::fmt;
|
||||||
|
#
|
||||||
|
# trait Chip: Sized {}
|
||||||
|
# trait Layouter<C: Chip> {}
|
||||||
|
const BLOCK_SIZE: usize = 16;
|
||||||
|
const DIGEST_SIZE: usize = 8;
|
||||||
|
|
||||||
pub trait Sha256Instructions: Chip {
|
pub trait Sha256Instructions: Chip {
|
||||||
/// Variable representing the SHA-256 internal state.
|
/// Variable representing the SHA-256 internal state.
|
||||||
type State: Clone + fmt::Debug;
|
type State: Clone + fmt::Debug;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue