Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open source under MIT license #122

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Espresso Systems (espressosys.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
6 changes: 6 additions & 0 deletions arithmetic/benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

#[macro_use]
extern crate criterion;

Expand Down
6 changes: 6 additions & 0 deletions arithmetic/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Error module.

use ark_std::string::String;
Expand Down
6 changes: 6 additions & 0 deletions arithmetic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

mod errors;
mod multilinear_polynomial;
mod univariate_polynomial;
Expand Down
6 changes: 6 additions & 0 deletions arithmetic/src/multilinear_polynomial.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use crate::{util::get_batched_nv, ArithErrors};
use ark_ff::{Field, PrimeField};
use ark_poly::MultilinearExtension;
Expand Down
6 changes: 6 additions & 0 deletions arithmetic/src/univariate_polynomial.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

// TODO: remove
#![allow(dead_code)]

Expand Down
6 changes: 6 additions & 0 deletions arithmetic/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use ark_ff::PrimeField;
use ark_std::log2;

Expand Down
6 changes: 6 additions & 0 deletions arithmetic/src/virtual_polynomial.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! This module defines our main mathematical object `VirtualPolynomial`; and
//! various functions associated with it.

Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use std::{fs::File, io, time::Instant};

use ark_bls12_381::{Bls12_381, Fr};
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/custom_gate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use ark_std::cmp::max;

/// Customized gate is a list of tuples of
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Error module.

use arithmetic::ArithErrors;
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Main module for the HyperPlonk SNARK.

use ark_ec::PairingEngine;
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/mock.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use arithmetic::identity_permutation;
use ark_ff::PrimeField;
use ark_std::{log2, test_rng};
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

pub use crate::{
custom_gate::CustomizedGates, errors::HyperPlonkErrors, mock::MockCircuit,
selectors::SelectorColumn, witness::WitnessColumn, HyperPlonkSNARK,
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/selectors.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use crate::{build_mle, errors::HyperPlonkErrors};
use ark_ff::PrimeField;
use ark_poly::DenseMultilinearExtension;
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/snark.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use crate::{
errors::HyperPlonkErrors,
structs::{HyperPlonkIndex, HyperPlonkProof, HyperPlonkProvingKey, HyperPlonkVerifyingKey},
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/structs.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Main module for the HyperPlonk PolyIOP.

use crate::{custom_gate::CustomizedGates, prelude::HyperPlonkErrors, selectors::SelectorColumn};
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use crate::{
custom_gate::CustomizedGates, errors::HyperPlonkErrors, structs::HyperPlonkParams,
witness::WitnessColumn,
Expand Down
6 changes: 6 additions & 0 deletions hyperplonk/src/witness.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use crate::{build_mle, errors::HyperPlonkErrors};
use ark_ff::PrimeField;
use ark_poly::DenseMultilinearExtension;
Expand Down
6 changes: 6 additions & 0 deletions subroutines/benches/iop_bench.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use arithmetic::{identity_permutation_mles, VPAuxInfo, VirtualPolynomial};
use ark_bls12_381::{Bls12_381, Fr};
use ark_poly::{DenseMultilinearExtension, MultilinearExtension};
Expand Down
6 changes: 6 additions & 0 deletions subroutines/benches/pcs_bench.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use ark_bls12_381::{Bls12_381, Fr};
use ark_ff::UniformRand;
use ark_poly::{DenseMultilinearExtension, MultilinearExtension};
Expand Down
6 changes: 6 additions & 0 deletions subroutines/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

pub mod pcs;
pub mod poly_iop;

Expand Down
6 changes: 3 additions & 3 deletions subroutines/src/pcs/errors.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the Jellyfish library.
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Error module.

Expand Down
6 changes: 6 additions & 0 deletions subroutines/src/pcs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

mod errors;
mod multilinear_kzg;
mod structs;
Expand Down
6 changes: 6 additions & 0 deletions subroutines/src/pcs/multilinear_kzg/batching.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Sumcheck based batch opening and verify commitment.
// TODO: refactoring this code to somewhere else
// currently IOP depends on PCS because perm check requires commitment.
Expand Down
6 changes: 3 additions & 3 deletions subroutines/src/pcs/multilinear_kzg/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the Jellyfish library.
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Main module for multilinear KZG commitment scheme

Expand Down
6 changes: 3 additions & 3 deletions subroutines/src/pcs/multilinear_kzg/srs.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the Jellyfish library.
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Implementing Structured Reference Strings for multilinear polynomial KZG
use crate::pcs::{
Expand Down
6 changes: 3 additions & 3 deletions subroutines/src/pcs/multilinear_kzg/util.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the Jellyfish library.
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Useful utilities for KZG PCS
use ark_ff::PrimeField;
Expand Down
6 changes: 3 additions & 3 deletions subroutines/src/pcs/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the Jellyfish library.
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Prelude
pub use crate::pcs::{
Expand Down
6 changes: 3 additions & 3 deletions subroutines/src/pcs/structs.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the Jellyfish library.
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use ark_ec::PairingEngine;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Read, SerializationError, Write};
Expand Down
6 changes: 3 additions & 3 deletions subroutines/src/pcs/univariate_kzg/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the Jellyfish library.
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Main module for univariate KZG commitment scheme

Expand Down
6 changes: 3 additions & 3 deletions subroutines/src/pcs/univariate_kzg/srs.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2022 Espresso Systems (espressosys.com)
// This file is part of the Jellyfish library.
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the Jellyfish library. If not, see <https://mit-license.org/>.
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Implementing Structured Reference Strings for univariate polynomial KZG

Expand Down
6 changes: 6 additions & 0 deletions subroutines/src/poly_iop/errors.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Error module.

use crate::pcs::prelude::PCSError;
Expand Down
6 changes: 6 additions & 0 deletions subroutines/src/poly_iop/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

use ark_ff::PrimeField;
use std::marker::PhantomData;

Expand Down
6 changes: 6 additions & 0 deletions subroutines/src/poly_iop/perm_check/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! Main module for the Permutation Check protocol

use self::util::computer_nums_and_denoms;
Expand Down
6 changes: 6 additions & 0 deletions subroutines/src/poly_iop/perm_check/util.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

//! This module implements useful functions for the permutation check protocol.

use crate::poly_iop::errors::PolyIOPErrors;
Expand Down
6 changes: 6 additions & 0 deletions subroutines/src/poly_iop/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Copyright (c) 2023 Espresso Systems (espressosys.com)
// This file is part of the HyperPlonk library.

// You should have received a copy of the MIT License
// along with the HyperPlonk library. If not, see <https://mit-license.org/>.

pub use crate::poly_iop::{
errors::PolyIOPErrors, perm_check::PermutationCheck, prod_check::ProductCheck,
structs::IOPProof, sum_check::SumCheck, utils::*, zero_check::ZeroCheck, PolyIOP,
Expand Down
Loading