zkboo 0.1.0

An implementation of the ZKBoo protocol.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: LGPL-3.0-or-later

//! Trait for ZKBoo circuits.

use crate::backend::{Backend, Frontend};

/// Trait to define ZKBoo circuits generic in the [Backend] choice.
///
/// The [Circuit::exec] method encapsulates the full circuit execution lifecycle, featuring:
///
/// - Input allocation via [Frontend::input].
/// - Constant allocation via [Frontend::alloc].
/// - Execution via [WordRef](crate::backend::WordRef) methods/operations.
/// - Output production via [Frontend::output].
///
pub trait Circuit {
    fn exec<B: Backend>(&self, frontend: &Frontend<B>);
}