forked from private-attribution/ipa
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
204 lines (183 loc) · 6.71 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
[package]
name = "ipa"
version = "0.1.0"
rust-version = "1.64.0"
edition = "2021"
[features]
default = [
"web-app",
"in-memory-infra",
# by default remove all TRACE, DEBUG spans from release builds
"tracing/max_level_trace",
"tracing/release_max_level_info",
"descriptive-gate",
"aggregate-circuit",
"stall-detection",
"aggregate-circuit",
"ipa-prf",
]
cli = ["comfy-table", "clap"]
enable-serde = ["serde", "serde_json"]
disable-metrics = []
# TODO move web-app to a separate crate. It adds a lot of build time to people who mostly write protocols
# TODO Consider moving out benches as well
web-app = ["axum", "axum-server", "base64", "clap", "comfy-table", "enable-serde", "hyper", "hyper-rustls", "rcgen", "rustls", "rustls-pemfile", "time", "tokio-rustls", "toml", "tower", "tower-http"]
test-fixture = ["enable-serde", "weak-field"]
# Include observability instruments that detect lack of progress inside MPC. If there is a bug that leads to helper
# miscommunication, this feature helps to detect it. Turning it on has some cost.
# If "shuttle" feature is enabled, turning this on has no effect.
stall-detection = []
shuttle = ["shuttle-crate", "test-fixture"]
debug-trace = ["tracing/max_level_trace", "tracing/release_max_level_debug"]
# TODO: we may want to use in-memory-bench and real-world-bench some time after
enable-benches = ["cli", "in-memory-infra", "test-fixture", "criterion", "iai"]
# The following two features are mutually exclusive. In-memory should be enabled by default as the vast majority
# of unit tests use it. Real world infra uses HTTP implementation and is suitable for integration/e2e tests
in-memory-infra = []
real-world-infra = []
dhat-heap = ["cli", "test-fixture"]
# Enable this feature to enable our colossally weak Fp31.
weak-field = []
step-trace = ["descriptive-gate"]
# The following two features are mutually exclusive. Descriptive should be enabled by deafult as the vast majority
# of unit tests use it. Compact uses memory-efficient gates and is suitable for production.
descriptive-gate = []
compact-gate = ["ipa-macros/compact-gate"]
# Standalone aggregation protocol. We use IPA infra for communication
# but it has nothing to do with IPA.
aggregate-circuit = []
# IPA protocol based on OPRF
ipa-prf = []
[dependencies]
aes = "0.8.3"
async-trait = "0.1.68"
axum = { version = "0.5.17", optional = true, features = ["http2"] }
axum-server = { version = "0.5.1", optional = true, features = ["rustls", "rustls-pemfile", "tls-rustls"] }
base64 = { version = "0.21.2", optional = true }
bitvec = "1.0"
bytes = "1.4"
clap = { version = "4.3.2", optional = true, features = ["derive"] }
comfy-table = { version = "7.0", optional = true }
config = "0.13.2"
criterion = { version = "0.5.1", optional = true, default-features = false, features = ["async_tokio", "plotters", "html_reports"] }
curve25519-dalek = "4.1.1"
dashmap = "5.4"
delegate = "0.10.0"
dhat = "0.3.2"
embed-doc-image = "0.1.4"
futures = "0.3.28"
futures-util = "0.3.28"
generic-array = "1.0.0"
hex = { version = "0.4", features = ["serde"] }
hkdf = "0.12.3"
hpke = { version = "0.11.0", default-features = false, features = ["std", "x25519"] }
hyper = { version = "0.14.26", optional = true, features = ["client", "h2", "stream", "runtime"] }
hyper-rustls = { version = "0.24.1", optional = true, features = ["http2"] }
iai = { version = "0.1.1", optional = true }
ipa-macros = { version = "*", path = "./ipa-macros" }
metrics = "0.21.0"
metrics-tracing-context = "0.14.0"
metrics-util = { version = "0.15.0" }
once_cell = "1.18"
pin-project = "1.0"
rand = "0.8"
rand_core = "0.6"
rcgen = { version = "0.11.3", optional = true }
rustls = { version = "0.21", optional = true }
rustls-pemfile = { version = "1", optional = true }
# TODO: https://rustsec.org/advisories/RUSTSEC-2023-0053. tokio-rustls and hyper-rustls need to be upgraded first, before
# we can remove pinning
rustls-webpki = "^0.101.4"
# TODO consider using zerocopy or serde_bytes or in-house serialization
serde = { version = "1.0", optional = true, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
sha2 = "0.10"
shuttle-crate = { package = "shuttle", version = "0.6.1", optional = true }
thiserror = "1.0"
time = { version = "0.3", optional = true }
tokio = { version = "1.28", features = ["rt", "rt-multi-thread", "macros"] }
# TODO: axum-server holds onto 0.24 and we can't upgrade until they do. Or we move away from axum-server
tokio-rustls = { version = "0.24", optional = true }
tokio-stream = "0.1.14"
toml = { version = "0.8", optional = true }
tower = { version = "0.4.13", optional = true }
tower-http = { version = "0.4.0", optional = true, features = ["trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
typenum = "1.16"
# hpke is pinned to it
x25519-dalek = "2.0.0-rc.3"
[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5.0"
[build-dependencies]
cfg_aliases = "0.1.1"
[dev-dependencies]
command-fds = "0.2.2"
hex = "0.4"
permutation = "0.4.1"
proptest = "1"
rustls = { version = "0.21", features = ["dangerous_configuration"] }
tempfile = "3"
[profile.release]
incremental = true
lto = "thin"
[profile.bench]
debug-assertions = true
[profile.bench-dhat]
inherits = "bench"
debug-assertions = false
incremental = true
lto = "thin"
debug = 1
[lib]
name = "ipa"
path = "src/lib.rs"
bench = false
[[bin]]
name = "helper"
required-features = ["web-app", "real-world-infra"]
bench = false
[[bin]]
name = "ipa_bench"
path = "src/bin/ipa_bench/ipa_bench.rs"
required-features = ["cli", "enable-serde"]
bench = false
[[bin]]
name = "report_collector"
required-features = ["cli", "test-fixture", "web-app"]
bench = false
[[bin]]
name = "test_mpc"
required-features = ["cli", "test-fixture", "web-app", "weak-field"]
bench = false
[[bench]]
name = "criterion_arithmetic"
path = "benches/ct/arithmetic_circuit.rs"
harness = false
required-features = ["enable-benches", "descriptive-gate"]
[[bench]]
name = "iai_arithmetic"
path = "benches/iai/arithmetic_circuit.rs"
harness = false
required-features = ["enable-benches", "descriptive-gate"]
[[bench]]
name = "oneshot_arithmetic"
path = "benches/oneshot/arithmetic_circuit.rs"
harness = false
required-features = ["enable-benches", "descriptive-gate"]
[[bench]]
name = "oneshot_sort"
path = "benches/oneshot/sort.rs"
harness = false
required-features = ["enable-benches", "descriptive-gate"]
[[bench]]
name = "oneshot_ipa"
path = "benches/oneshot/ipa.rs"
harness = false
required-features = ["enable-benches", "descriptive-gate"]
[[test]]
name = "helper_networks"
required-features = ["cli", "web-app", "real-world-infra", "test-fixture", "descriptive-gate"]
[[test]]
name = "compact_gate"
required-features = ["cli", "web-app", "real-world-infra", "test-fixture", "compact-gate"]