refactor: consolidate workspaces (#537)

* move crates

* remove .workspace syntax

* rename crate directories

* normalize manifests

* further normalize manifests

* newlines

* fix dependency issues

* fix import paths

* update CI

* rustfmt

* filter wasm packages

* check in fixtures

* fix rustdoc

* ignore expensive tests
This commit is contained in:
sinu.eth
2024-07-23 10:43:31 +09:00
committed by GitHub
parent 7377eaf661
commit e14d0cf563
495 changed files with 650 additions and 778 deletions

View File

@@ -15,49 +15,31 @@ env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
build_and_test:
name: Build and test
fmt:
name: Check formatting
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- components/cipher
- components/universal-hash
- components/aead
- components/key-exchange
- components/prf
- components/tls
- components/tls/tls-mpc
- notary
- tlsn
- tlsn/tests-integration
include:
- package: components/tls/tls-mpc
ignored: true
release: true
- package: notary
release: true
- package: tlsn
all-features: true
- package: tlsn/tests-integration
release: true
ignored: true
defaults:
run:
working-directory: ${{ matrix.package }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
# We use nightly to support `imports_granularity` feature
- name: Install nightly rust toolchain with rustfmt
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
- name: "Check formatting"
- name: Use caching
uses: Swatinem/rust-cache@v2.7.3
- name: Check formatting
run: cargo +nightly fmt --check --all
build-and-test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@stable
@@ -65,32 +47,52 @@ jobs:
toolchain: stable
components: clippy
- name: "Clippy"
- name: Clippy
run: cargo clippy --all-features --all-targets -- -D warnings
- name: Use caching
uses: Swatinem/rust-cache@v2.7.3
with:
workspaces: ${{ matrix.package }}
- name: "Build"
run: cargo build ${{ matrix.release && '--release' }}
- name: Build
run: cargo build --all-targets
- name: Test
run: cargo test
build-wasm:
name: Build for target wasm32-unknown-unknown
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
toolchain: stable
- name: Use caching
uses: Swatinem/rust-cache@v2.5.0
- name: Build
run: cargo build -p tlsn-tls-client -p tlsn-tls-core -p tlsn-core --target wasm32-unknown-unknown
tests-integration:
name: Run tests release build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Use caching
uses: Swatinem/rust-cache@v2.7.3
- name: Add custom DNS entry to /etc/hosts for notary TLS test
if: matrix.package == 'notary'
run: echo "127.0.0.1 tlsnotaryserver.io" | sudo tee -a /etc/hosts
- name: "Test ${{ matrix.release && '--release' || '' }} ${{ matrix.all-features && '--all-features' || '' }}"
env:
RELEASE_OPTION: ${{ matrix.release && '--release' || '' }}
# Includes tests marked as `ignore`.
IGNORED_OPTION: ${{ matrix.ignored && '--include-ignored' || '' }}
ALL_FEATURES_OPTION: ${{ matrix.all-features && '--all-features' || '' }}
# Run all tests (bins, examples, lib, integration and docs)
# https://doc.rust-lang.org/cargo/commands/cargo-test.html#target-selection
run: |
echo "Running command: cargo test $RELEASE_OPTION $ALL_FEATURES_OPTION -- $IGNORED_OPTION"
cargo test $RELEASE_OPTION $ALL_FEATURES_OPTION -- $IGNORED_OPTION
- name: "Check that benches compile"
run: cargo bench --no-run
- name: Run integration tests
run: cargo test --release --workspace --exclude tlsn-tls-client --exclude tlsn-tls-core -- --include-ignored

View File

@@ -22,18 +22,18 @@ jobs:
toolchain: stable
- name: "rustdoc"
run: cd tlsn; cargo doc -p tlsn-core -p tlsn-prover -p tlsn-verifier --no-deps --all-features
run: cargo doc -p tlsn-core -p tlsn-prover -p tlsn-verifier --no-deps --all-features
# --target-dir ${GITHUB_WORKSPACE}/docs
# https://dev.to/deciduously/prepare-your-rust-api-docs-for-github-pages-2n5i
- name: "Add index file -> tlsn_prover"
run: |
echo "<meta http-equiv=\"refresh\" content=\"0; url=tlsn_prover\">" > tlsn/target/doc/index.html
echo "<meta http-equiv=\"refresh\" content=\"0; url=tlsn_prover\">" > target/doc/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/dev' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: tlsn/target/doc/
publish_dir: target/doc/
# cname: rustdocs.tlsnotary.org

View File

@@ -1,47 +0,0 @@
name: wasm-build
on:
push:
branches:
- dev
tags:
- "[v]?[0-9]+.[0-9]+.[0-9]+*"
pull_request:
branches:
- dev
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
build_and_test:
name: Build for target wasm32-unknown-unknown
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- tlsn/tlsn-core
- tlsn/tlsn-prover
- components/tls/tls-client
defaults:
run:
working-directory: ${{ matrix.package }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
toolchain: stable
- name: Use caching
uses: Swatinem/rust-cache@v2.5.0
with:
workspaces: ${{ matrix.package }} -> ../target
- name: "Build"
run: cargo build --target wasm32-unknown-unknown

122
Cargo.toml Normal file
View File

@@ -0,0 +1,122 @@
[workspace]
members = [
"crates/benches",
"crates/common",
"crates/components/aead",
"crates/components/block-cipher",
"crates/components/hmac-sha256",
"crates/components/hmac-sha256-circuits",
"crates/components/key-exchange",
"crates/components/stream-cipher",
"crates/components/universal-hash",
"crates/core",
"crates/examples",
"crates/formats",
"crates/notary/client",
"crates/notary/server",
"crates/prover",
"crates/server-fixture",
"crates/tests-integration",
"crates/tls/backend",
"crates/tls/client",
"crates/tls/client-async",
"crates/tls/core",
"crates/tls/mpc",
"crates/tls/server-fixture",
"crates/verifier",
]
resolver = "2"
[workspace.dependencies]
notary-client = { path = "crates/notary/client" }
notary-server = { path = "crates/notary/server" }
tls-server-fixture = { path = "crates/tls/server-fixture" }
tlsn-aead = { path = "crates/components/aead" }
tlsn-block-cipher = { path = "crates/components/block-cipher" }
tlsn-common = { path = "crates/common" }
tlsn-core = { path = "crates/core" }
tlsn-formats = { path = "crates/formats" }
tlsn-hmac-sha256 = { path = "crates/components/hmac-sha256" }
tlsn-hmac-sha256-circuits = { path = "crates/components/hmac-sha256-circuits" }
tlsn-key-exchange = { path = "crates/components/key-exchange" }
tlsn-prover = { path = "crates/prover" }
tlsn-server-fixture = { path = "crates/server-fixture" }
tlsn-stream-cipher = { path = "crates/components/stream-cipher" }
tlsn-tls-backend = { path = "crates/tls/backend" }
tlsn-tls-client = { path = "crates/tls/client" }
tlsn-tls-client-async = { path = "crates/tls/client-async" }
tlsn-tls-core = { path = "crates/tls/core" }
tlsn-tls-mpc = { path = "crates/tls/mpc" }
tlsn-universal-hash = { path = "crates/components/universal-hash" }
tlsn-utils = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "45370cc" }
tlsn-utils-aio = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "45370cc" }
tlsn-verifier = { path = "crates/verifier" }
mpz-circuits = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-common = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-core = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-garble = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-garble-core = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-ole = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-ot = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-share-conversion = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
serio = { version = "0.1" }
spansy = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "45370cc" }
uid-mux = { version = "0.1", features = ["serio"] }
aes = { version = "0.8" }
aes-gcm = { version = "0.9" }
anyhow = { version = "1.0" }
async-trait = { version = "0.1" }
async-tungstenite = { version = "0.25" }
axum = { version = "0.7" }
bincode = { version = "1.3" }
bytes = { version = "1.4" }
chrono = { version = "0.4" }
cipher = { version = "0.4" }
criterion = { version = "0.5" }
ctr = { version = "0.9" }
derive_builder = { version = "0.12" }
digest = { version = "0.10" }
elliptic-curve = { version = "0.13" }
enum-try-as-inner = { version = "0.1" }
env_logger = { version = "0.10" }
futures = { version = "0.3" }
futures-rustls = { version = "0.26" }
futures-util = { version = "0.3" }
generic-array = { version = "0.14" }
hex = { version = "0.4" }
hmac = { version = "0.12" }
http = { version = "1.1" }
http-body-util = { version = "0.1" }
hyper = { version = "1.1" }
hyper-util = { version = "0.1" }
log = { version = "0.4" }
opaque-debug = { version = "0.3" }
p256 = { version = "0.13" }
rand = { version = "0.8" }
rand_chacha = { version = "0.3" }
rand_core = { version = "0.6" }
regex = { version = "1.10" }
ring = { version = "0.17" }
rs_merkle = { version = "1.4" }
rstest = { version = "0.17" }
rustls = { version = "0.21" }
rustls-pemfile = { version = "1.0" }
sct = { version = "0.7" }
serde = { version = "1.0" }
serde_json = { version = "1.0" }
sha2 = { version = "0.10" }
signature = { version = "2.2" }
thiserror = { version = "1.0" }
tokio = { version = "1.38" }
tokio-rustls = { version = "0.24" }
tokio-util = { version = "0.7" }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3" }
uuid = { version = "1.4" }
web-time = { version = "0.2" }
webpki = { version = "0.22" }
webpki-roots = { version = "0.26" }
ws_stream_tungstenite = { version = "0.13" }

View File

@@ -1,30 +0,0 @@
[workspace]
members = ["stream-cipher", "block-cipher"]
resolver = "2"
[workspace.dependencies]
# tlsn
mpz-circuits = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-garble = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
tlsn-utils = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "45370cc" }
# crypto
aes = "0.8"
ctr = "0.9.2"
cipher = "0.4.3"
# async
async-trait = "0.1"
futures = "0.3"
tokio = { version = "1", default-features = false }
# testing
rstest = "0.17"
criterion = "0.5"
# error/log
thiserror = "1"
tracing = "0.1"
# misc
derive_builder = "0.12"

View File

@@ -1,22 +0,0 @@
[workspace]
members = ["hmac-sha256-circuits", "hmac-sha256"]
resolver = "2"
[workspace.dependencies]
# tlsn
mpz-circuits = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-common = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-ot = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-garble = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
# async
async-trait = "0.1"
futures = "0.3"
tokio = "1"
# error/log
thiserror = "1"
tracing = "0.1"
# testing
criterion = "0.5"

View File

@@ -1,58 +0,0 @@
[workspace]
members = [
"tls-client",
"tls-backend",
"tls-core",
"tls-mpc",
"tls-client-async",
"tls-server-fixture",
]
resolver = "2"
[workspace.dependencies]
# rand
rand = "0.8"
rand_chacha = "0.3"
# crypto
aes = "0.8"
aes-gcm = "0.9"
sha2 = "0.10"
hmac = "0.12"
sct = "0.7"
digest = "0.10"
webpki = "0.22"
webpki-roots = "0.26"
ring = "0.17"
p256 = "0.13"
rustls-pemfile = "1"
rustls = "0.20"
futures-rustls = "0.26"
# async
async-trait = "0.1"
futures = "0.3"
tokio = "1"
tokio-util = "0.7"
http-body-util = "0.1"
hyper = { version = "1.1", features = ["client", "http1"] }
hyper-util = { version = "0.1", features = ["full"] }
# serialization
bytes = "1"
serde = "1"
# error/log
tracing = "0.1"
tracing-subscriber = "0.3"
thiserror = "1"
log = "0.4"
env_logger = "0.10"
# testing
rstest = "0.12"
# misc
derive_builder = "0.12"
enum-try-as-inner = "0.1"
web-time = "0.2"

44
crates/benches/Cargo.toml Normal file
View File

@@ -0,0 +1,44 @@
[package]
edition = "2021"
name = "tlsn-benches"
publish = false
version = "0.0.0"
[dependencies]
anyhow = { workspace = true }
charming = { version = "0.3.1", features = ["ssr"] }
csv = "1.3.0"
futures = { workspace = true }
serde = { workspace = true }
tlsn-core = { workspace = true }
tlsn-prover = { workspace = true }
tlsn-server-fixture = { workspace = true }
tlsn-tls-core = { workspace = true }
tlsn-verifier = { workspace = true }
tokio = { workspace = true, features = [
"rt",
"rt-multi-thread",
"macros",
"net",
"io-std",
"fs",
] }
tokio-util = { workspace = true }
toml = "0.8.11"
tracing-subscriber = { workspace = true, features = ["env-filter"] }
[[bin]]
name = "bench"
path = "bin/bench.rs"
[[bin]]
name = "prover"
path = "bin/prover.rs"
[[bin]]
name = "verifier"
path = "bin/verifier.rs"
[[bin]]
name = "plot"
path = "bin/plot.rs"

View File

@@ -8,11 +8,11 @@ edition = "2021"
default = []
[dependencies]
mpz-garble.workspace = true
mpz-ot.workspace = true
mpz-common.workspace = true
mpz-common = { workspace = true }
mpz-garble = { workspace = true }
mpz-ot = { workspace = true }
futures.workspace = true
futures = { workspace = true }
serio = { workspace = true, features = ["codec", "bincode"] }
uid-mux = { workspace = true, features = ["serio"] }
tracing.workspace = true
tracing = { workspace = true }
uid-mux = { workspace = true, features = ["serio"] }

View File

@@ -16,24 +16,26 @@ default = ["mock"]
mock = ["mpz-common/test-utils", "dep:mpz-ot"]
[dependencies]
tlsn-block-cipher = { path = "../cipher/block-cipher" }
tlsn-stream-cipher = { path = "../cipher/stream-cipher" }
tlsn-universal-hash = { path = "../universal-hash" }
tlsn-block-cipher = { workspace = true }
tlsn-stream-cipher = { workspace = true }
tlsn-universal-hash = { workspace = true }
mpz-common = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-core = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-garble = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-ot = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac", optional = true, features = [
"ideal",
] }
mpz-garble = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
mpz-common = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
serio = "0.1"
async-trait = "0.1"
derive_builder = "0.12"
thiserror = "1"
futures = "0.3"
serde = "1"
tracing = "0.1"
serio = { workspace = true }
async-trait = { workspace = true }
derive_builder = { workspace = true }
futures = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
aes-gcm = "0.10"
aes-gcm = { workspace = true }

View File

@@ -429,10 +429,7 @@ mod tests {
aes_gcm::{mock::create_mock_aes_gcm_pair, AesGcmConfigBuilder, Role},
Aead,
};
use ::aes_gcm::{
aead::{AeadInPlace, KeyInit},
Aes128Gcm, Nonce,
};
use ::aes_gcm::{aead::AeadInPlace, Aes128Gcm, NewAead, Nonce};
use error::ErrorKind;
use mpz_common::executor::STExecutor;
use mpz_garble::{protocol::deap::mock::create_mock_deap_vm, Memory};
@@ -518,6 +515,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_aes_gcm_encrypt_private() {
let key = vec![0u8; 16];
let iv = vec![0u8; 4];
@@ -541,6 +539,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_aes_gcm_encrypt_public() {
let key = vec![0u8; 16];
let iv = vec![0u8; 4];
@@ -564,6 +563,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_aes_gcm_decrypt_private() {
let key = vec![0u8; 16];
let iv = vec![0u8; 4];
@@ -584,6 +584,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_aes_gcm_decrypt_private_bad_tag() {
let key = vec![0u8; 16];
let iv = vec![0u8; 4];
@@ -620,6 +621,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_aes_gcm_decrypt_public() {
let key = vec![0u8; 16];
let iv = vec![0u8; 4];
@@ -641,6 +643,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_aes_gcm_decrypt_public_bad_tag() {
let key = vec![0u8; 16];
let iv = vec![0u8; 4];
@@ -677,6 +680,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_aes_gcm_verify_tag() {
let key = vec![0u8; 16];
let iv = vec![0u8; 4];

View File

@@ -16,15 +16,15 @@ default = ["mock"]
mock = []
[dependencies]
mpz-circuits.workspace = true
mpz-garble.workspace = true
tlsn-utils.workspace = true
async-trait.workspace = true
thiserror.workspace = true
derive_builder.workspace = true
tracing.workspace = true
mpz-circuits = { workspace = true }
mpz-garble = { workspace = true }
tlsn-utils = { workspace = true }
async-trait = { workspace = true }
thiserror = { workspace = true }
derive_builder = { workspace = true }
tracing = { workspace = true }
[dev-dependencies]
aes.workspace = true
cipher.workspace = true
aes = { workspace = true }
cipher = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] }

View File

@@ -98,6 +98,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_block_cipher_blind() {
let leader_config = BlockCipherConfig::builder().id("test").build().unwrap();
let follower_config = BlockCipherConfig::builder().id("test").build().unwrap();
@@ -134,6 +135,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_block_cipher_share() {
let leader_config = BlockCipherConfig::builder().id("test").build().unwrap();
let follower_config = BlockCipherConfig::builder().id("test").build().unwrap();
@@ -171,6 +173,7 @@ mod tests {
}
#[tokio::test]
#[ignore = "expensive"]
async fn test_block_cipher_preprocess() {
let leader_config = BlockCipherConfig::builder().id("test").build().unwrap();
let follower_config = BlockCipherConfig::builder().id("test").build().unwrap();

View File

@@ -12,8 +12,8 @@ edition = "2021"
name = "hmac_sha256_circuits"
[dependencies]
mpz-circuits.workspace = true
tracing.workspace = true
mpz-circuits = { workspace = true }
tracing = { workspace = true }
[dev-dependencies]
ring = "0.17"
ring = { workspace = true }

View File

@@ -17,21 +17,22 @@ rayon = ["mpz-common/rayon"]
mock = []
[dependencies]
tlsn-hmac-sha256-circuits = { path = "../hmac-sha256-circuits" }
mpz-garble.workspace = true
mpz-circuits.workspace = true
mpz-common.workspace = true
tlsn-hmac-sha256-circuits = { workspace = true }
async-trait.workspace = true
futures.workspace = true
thiserror.workspace = true
tracing.workspace = true
derive_builder = "0.12"
mpz-garble = { workspace = true }
mpz-circuits = { workspace = true }
mpz-common = { workspace = true }
async-trait = { workspace = true }
derive_builder = { workspace = true }
futures = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
[dev-dependencies]
criterion = { workspace = true, features = ["async_tokio"] }
mpz-common = { workspace = true, features = ["test-utils"] }
mpz-ot = { workspace = true, features = ["ideal"] }
criterion = { workspace = true, features = ["async_tokio"] }
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] }
[[bench]]

View File

@@ -25,22 +25,21 @@ mpz-share-conversion = { git = "https://github.com/privacy-scaling-explorations/
] }
mpz-circuits = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac" }
p256 = { version = "0.13", features = ["ecdh", "serde"] }
async-trait = "0.1"
thiserror = "1"
serde = "1"
futures = "0.3"
serio = "0.1"
derive_builder = "0.12"
tracing = "0.1"
rand = "0.8"
p256 = { workspace = true, features = ["ecdh", "serde"] }
async-trait = { workspace = true }
thiserror = { workspace = true }
serde = { workspace = true }
futures = { workspace = true }
serio = { workspace = true }
derive_builder = { workspace = true }
tracing = { workspace = true }
rand = { workspace = true }
[dev-dependencies]
mpz-share-conversion = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac", features = [
"ideal",
] }
rand = "0.8"
rand_chacha = "0.3"
rand_core = "0.6"
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
rand_chacha = { workspace = true }
rand_core = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] }

View File

@@ -14,20 +14,20 @@ rayon = ["mpz-garble/rayon"]
mock = []
[dependencies]
mpz-circuits.workspace = true
mpz-garble.workspace = true
tlsn-utils.workspace = true
aes.workspace = true
ctr.workspace = true
cipher.workspace = true
async-trait.workspace = true
thiserror.workspace = true
derive_builder.workspace = true
tracing.workspace = true
opaque-debug = "0.3"
mpz-circuits = { workspace = true }
mpz-garble = { workspace = true }
tlsn-utils = { workspace = true }
aes = { workspace = true }
ctr = { workspace = true }
cipher = { workspace = true }
async-trait = { workspace = true }
thiserror = { workspace = true }
derive_builder = { workspace = true }
tracing = { workspace = true }
opaque-debug = { workspace = true }
[dev-dependencies]
futures.workspace = true
futures = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] }
rstest = { workspace = true, features = ["async-timeout"] }
criterion = { workspace = true, features = ["async_tokio"] }

View File

@@ -244,6 +244,7 @@ mod tests {
#[rstest]
#[timeout(Duration::from_millis(10000))]
#[tokio::test]
#[ignore = "expensive"]
async fn test_stream_cipher_public() {
let key = [0u8; 16];
let iv = [0u8; 4];
@@ -297,6 +298,7 @@ mod tests {
#[rstest]
#[timeout(Duration::from_millis(10000))]
#[tokio::test]
#[ignore = "expensive"]
async fn test_stream_cipher_private() {
let key = [0u8; 16];
let iv = [0u8; 4];
@@ -351,6 +353,7 @@ mod tests {
#[rstest]
#[timeout(Duration::from_millis(10000))]
#[tokio::test]
#[ignore = "expensive"]
async fn test_stream_cipher_share_key_block() {
let key = [0u8; 16];
let iv = [0u8; 4];
@@ -389,6 +392,7 @@ mod tests {
#[rstest]
#[timeout(Duration::from_millis(10000))]
#[tokio::test]
#[ignore = "expensive"]
async fn test_stream_cipher_zk() {
let key = [0u8; 16];
let iv = [0u8; 4];
@@ -420,6 +424,7 @@ mod tests {
#[case::extra(128)]
#[timeout(Duration::from_millis(10000))]
#[tokio::test]
#[ignore = "expensive"]
async fn test_stream_cipher_preprocess(#[case] len: usize) {
let key = [0u8; 16];
let iv = [0u8; 4];

View File

@@ -25,18 +25,13 @@ mpz-share-conversion = { git = "https://github.com/privacy-scaling-explorations/
ghash_rc = { package = "ghash", version = "0.5", optional = true }
# async
async-trait = "0.1"
futures = "0.3"
futures-util = "0.3"
# error/log
thiserror = "1"
opaque-debug = "0.3"
tracing = "0.1"
# misc
derive_builder = "0.12"
async-trait = { workspace = true }
futures = { workspace = true }
futures-util = { workspace = true }
thiserror = { workspace = true }
opaque-debug = { workspace = true }
tracing = { workspace = true }
derive_builder = { workspace = true }
[dev-dependencies]
mpz-common = { git = "https://github.com/privacy-scaling-explorations/mpz", rev = "b8ae7ac", features = [
@@ -47,9 +42,9 @@ mpz-share-conversion = { git = "https://github.com/privacy-scaling-explorations/
] }
ghash_rc = { package = "ghash", version = "0.5" }
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
criterion = "0.5"
rstest = "0.17"
rand_chacha = "0.3"
rand = "0.8"
generic-array = "0.14"
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] }
criterion = { workspace = true }
rstest = { workspace = true }
rand_chacha = { workspace = true }
rand = { workspace = true }
generic-array = { workspace = true }

View File

@@ -14,33 +14,30 @@ fixtures = ["dep:hex"]
[dependencies]
tlsn-tls-core = { workspace = true, features = ["serde"] }
tlsn-utils = { workspace = true }
tlsn-utils.workspace = true
mpz-core.workspace = true
mpz-garble-core.workspace = true
mpz-circuits.workspace = true
thiserror.workspace = true
serde.workspace = true
p256 = { workspace = true, features = ["serde"] }
webpki-roots.workspace = true
rs_merkle.workspace = true
rstest = { workspace = true, optional = true }
hex = { workspace = true, optional = true }
bytes = { workspace = true, features = ["serde"] }
opaque-debug.workspace = true
mpz-circuits = { workspace = true }
mpz-core = { workspace = true }
mpz-garble-core = { workspace = true }
bimap = { version = "0.6.3", features = ["serde"] }
web-time.workspace = true
bytes = { workspace = true, features = ["serde"] }
hex = { workspace = true, optional = true }
opaque-debug = { workspace = true }
p256 = { workspace = true, features = ["serde"] }
rs_merkle = { workspace = true }
rstest = { workspace = true, optional = true }
serde = { workspace = true }
thiserror = { workspace = true }
web-time = { workspace = true }
webpki-roots = { workspace = true }
[dev-dependencies]
rstest.workspace = true
hex.workspace = true
rand_core.workspace = true
rand_chacha.workspace = true
bincode.workspace = true
bincode = { workspace = true }
hex = { workspace = true }
rand_chacha = { workspace = true }
rand_core = { workspace = true }
rstest = { workspace = true }
[[test]]
name = "api"

Some files were not shown because too many files have changed in this diff Show More