-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Middle of refactor * MIddle of refactor * merkle tree clean * merkle tree clean * gadgets for rescue and mt * commitment * rescue gadgets move * move vdf * refactor * move signature * move pcs * move vid * move bench & fix build error * finalizing * fixed all tests * fix doctest * remove unused deps from jf-primitives * update scripts & github actions * documents * scripts & PR template * fix failed test * move curve_cofactor * addressing comments * move AEAD * elgamal crate * vrf crate * update scripts * comments and test fixes * fix test * CODEOWNERS * use `test-srs` in plonk bench * update README * fix README * break `jf-traits` crate * change PR template * fix test
- Loading branch information
Showing
165 changed files
with
2,384 additions
and
1,854 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Default owners and repository maintainers: | ||
* @alxiong @mrain | ||
|
||
# Owner of `jf-utils` crate | ||
/utilities/ @alxiong @mrain | ||
|
||
# Owner of `jf-relation` crate | ||
/relation/ @alxiong @mrain | ||
|
||
# Owner of `jf-prf` crate | ||
/prf/ @alxiong @mrain | ||
|
||
# Owner of `jf-crhf` crate | ||
/crhf/ @alxiong @mrain | ||
|
||
# Owner of `jf-commitment` crate | ||
/commitment/ @alxiong @mrain | ||
|
||
# Owner of `jf-merkle-tree` crate | ||
/merkle-tree/ @mrain | ||
|
||
# Owner of `jf-pcs` crate | ||
/pcs/ @alxiong | ||
|
||
# Owner of `jf-rescue` crate | ||
/rescue/ @philippecamacho | ||
|
||
# Owner of `jf-vdf` crate | ||
/vdf/ @mrain | ||
|
||
# Owner of `jf-vid` crate | ||
/vid/ @ggutoski @akonring | ||
|
||
# Owner of `jf-signature` crate | ||
/signature/ @alxiong @mrain | ||
|
||
# Owner of `jf-aead` crate | ||
/aead/ @alxiong | ||
|
||
# Owner of `jf-elgamal` crate | ||
/elgamal/ @alxiong @mrain | ||
|
||
# Owner of `jf-vrf` crate | ||
/vrf/ @alxiong @mrain | ||
|
||
# Owner of `jf-plonk` crate | ||
/plonk/ @alxiong @mrain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# CHANGELOG | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## 0.1.0 | ||
|
||
- Initial release. | ||
- AEAD wrapper for `crypto_kx`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[package] | ||
name = "jf-aead" | ||
version = "0.1.0" | ||
description = "Authenticated encryption with associated data (AEAD)." | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
license = { workspace = true } | ||
rust-version = { workspace = true } | ||
homepage = { workspace = true } | ||
documentation = { workspace = true } | ||
repository = { workspace = true } | ||
|
||
[dependencies] | ||
ark-serialize = { workspace = true } | ||
ark-std = { workspace = true } | ||
chacha20poly1305 = { version = "0.10.1", default-features = false, features = [ | ||
"alloc", | ||
"rand_core", | ||
] } | ||
crypto_kx = { version = "0.2.1", features = ["serde"] } | ||
derivative = { workspace = true } | ||
displaydoc = { workspace = true } | ||
serde = { workspace = true } | ||
|
||
[dev-dependencies] | ||
bincode = "1.3" | ||
jf-utils = { path = "../utilities" } | ||
rand_chacha = { workspace = true } | ||
|
||
[features] | ||
default = [] | ||
std = ["ark-serialize/std", "ark-std/std", "chacha20poly1305/std"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "jf-commitment" | ||
version = "0.1.0" | ||
description = "Commitment scheme" | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
license = { workspace = true } | ||
rust-version = { workspace = true } | ||
homepage = { workspace = true } | ||
documentation = { workspace = true } | ||
repository = { workspace = true } | ||
|
||
[dependencies] | ||
ark-std = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) 2022 Espresso Systems (espressosys.com) | ||
// This file is part of the Jellyfish library. | ||
|
||
// You should have received a copy of the MIT License | ||
// along with the Jellyfish library. If not, see <https://mit-license.org/>. | ||
//! Trait definition for cryptographic commitment scheme | ||
#![no_std] | ||
|
||
use ark_std::{borrow::Borrow, fmt::Debug, hash::Hash, UniformRand}; | ||
|
||
/// A glorified [`bool`] that leverages compile lints to encourage the caller to | ||
/// use the result. | ||
/// | ||
/// Intended as the return type for verification of proofs, signatures, etc. | ||
/// Recommended for use in the nested [`Result`] pattern: see <https://sled.rs/errors>. | ||
type VerificationResult = Result<(), ()>; | ||
|
||
pub trait CommitmentScheme { | ||
/// Input to the commitment | ||
type Input; | ||
/// The type of output commitment value | ||
type Output: Clone + Debug + PartialEq + Eq + Hash; | ||
/// The type of the hiding/blinding factor | ||
type Randomness: Clone + Debug + PartialEq + Eq + UniformRand; | ||
/// Error type | ||
type Error: ark_std::error::Error; | ||
|
||
/// Commit algorithm that takes `input` and blinding randomness `r` | ||
/// (optional for hiding commitment schemes), outputs a commitment. | ||
fn commit<T: Borrow<Self::Input>>( | ||
input: T, | ||
r: Option<&Self::Randomness>, | ||
) -> Result<Self::Output, Self::Error>; | ||
|
||
/// Verify algorithm that output `Ok` if accepted, or `Err` if rejected. | ||
fn verify<T: Borrow<Self::Input>>( | ||
input: T, | ||
r: Option<&Self::Randomness>, | ||
comm: &Self::Output, | ||
) -> Result<VerificationResult, Self::Error>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "jf-crhf" | ||
version = "0.1.0" | ||
description = "Collision-resistant hash function (CRHF)" | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
license = { workspace = true } | ||
rust-version = { workspace = true } | ||
homepage = { workspace = true } | ||
documentation = { workspace = true } | ||
repository = { workspace = true } | ||
|
||
[dependencies] | ||
ark-serialize = { workspace = true } | ||
ark-std = { workspace = true } |
Oops, something went wrong.