Skip to content

Commit

Permalink
algebra: poly: Add DensePolynomialResult type and arithmetic
Browse files Browse the repository at this point in the history
This allows a public polynomial to be allocated within a computation
graph and executed upon asynchronously. Follow ups will build an
authenticated, secret shared type on top of this type
  • Loading branch information
joeykraut committed Oct 11, 2023
1 parent 2418abe commit cdc6611
Show file tree
Hide file tree
Showing 7 changed files with 429 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ path = "src/lib.rs"
benchmarks = []
stats = ["benchmarks"]
test_helpers = ["ark-bn254"]
poly = []
poly = ["ark-poly"]

[[test]]
name = "integration"
Expand Down Expand Up @@ -77,6 +77,7 @@ tokio = { version = "1.12", features = ["macros", "rt-multi-thread"] }
ark-bn254 = { version = "0.4", optional = true }
ark-ec = { version = "0.4", features = ["parallel"] }
ark-ff = "0.4"
ark-poly = { version = "0.4", optional = true }
ark-serialize = "0.4"
ark-std = "0.4"
digest = "0.10"
Expand All @@ -99,7 +100,6 @@ tracing = { version = "0.1", features = ["log"] }
zeroize = "1.3"

[dev-dependencies]
ark-curve25519 = "0.4"
clap = { version = "3.2.8", features = ["derive"] }
colored = "2"
criterion = { version = "0.5", features = ["async", "async_tokio"] }
Expand Down
2 changes: 1 addition & 1 deletion benches/test_stats.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! A simple benchmark for testing that stats collection is properly working
use ark_mpc::{algebra::scalar::Scalar, test_helpers::execute_mock_mpc, PARTY0, PARTY1};
use ark_mpc::{algebra::Scalar, test_helpers::execute_mock_mpc, PARTY0, PARTY1};
use rand::{distributions::uniform::SampleRange, thread_rng};

#[tokio::main]
Expand Down
2 changes: 1 addition & 1 deletion integration/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod mpc_scalar;
/// The amount of time to sleep after sending a shutdown
const SHUTDOWN_TIMEOUT_MS: u64 = 3_000; // 3 seconds

/// The curve used for testing, set to curve25519
/// The curve used for testing, set to bn254
pub type TestCurve = Bn254Projective;
/// The curve point type used for testing
pub type TestCurvePoint = CurvePoint<TestCurve>;
Expand Down
7 changes: 5 additions & 2 deletions src/algebra/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
mod curve;
mod macros;
mod poly;
mod scalar;

pub use curve::*;
#[cfg(feature = "poly")]
mod poly;
#[cfg(feature = "poly")]
pub use poly::*;

pub use curve::*;
pub use scalar::*;
4 changes: 4 additions & 0 deletions src/algebra/poly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
//!
//! Modeled after the `ark_poly` implementation
#![allow(clippy::module_inception)]

mod authenticated_poly;
mod poly;

pub use authenticated_poly::*;
pub use poly::*;
Loading

0 comments on commit cdc6611

Please sign in to comment.