Implementation of fundamental circuitry and primitive Jubjub curve arithmetic.

This commit is contained in:
Sean Bowe
2017-11-22 21:57:00 -07:00
parent 35314c8771
commit 86619c7334
11 changed files with 4088 additions and 5 deletions

21
src/circuit/mod.rs Normal file
View File

@@ -0,0 +1,21 @@
#[cfg(test)]
pub mod test;
pub mod boolean;
pub mod uint32;
pub mod blake2s;
use bellman::SynthesisError;
trait Assignment<T> {
fn get(&self) -> Result<&T, SynthesisError>;
}
impl<T> Assignment<T> for Option<T> {
fn get(&self) -> Result<&T, SynthesisError> {
match *self {
Some(ref v) => Ok(v),
None => Err(SynthesisError::AssignmentMissing)
}
}
}