You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The jiffClient object provides methods for sharing, opening, and performing operations on shares.
68
74
69
75
Alternatively, you can use the same code for both Node.js and browser-based clients, using tools
@@ -135,30 +141,34 @@ Each document is an independent tutorial. However, beginners are encouraged to v
135
141
## Running Demos and Examples
136
142
137
143
Run a sample server from one of the demos under `demos` in the following way:
144
+
138
145
```shell
139
146
node demos/<demo-name>/server.js
140
147
```
148
+
141
149
The output from the example server will direct you to open `localhost:8080/demos/<demo-name>/client.html` in a browser (you must open
142
150
an instance in a separate window/tab for every distinct party participating in the protocol).
143
151
You can then proceed with the protocol using the client interfaces.
144
152
145
153
Note that you can run Node.js parties that can also participate in the protocol by executing (e.g., a separate terminal for each party):
154
+
146
155
```shell
147
156
node demos/<demo-name>/party.js <input-value>
148
157
```
149
158
150
159
## Documentation
151
160
152
161
The latest documentation can be viewed on the [project page](https://multiparty.org/jiff/). The documentation can be generated using [JSDoc](http://usejsdoc.org/); you will find these docs in `docs/jsdocs/`:
The documentation for the client side library is separated into the distinct modules, namespaces, and classes:
160
171
161
-
162
172
├─ modules
163
173
│ └─ jiff-client Parent module: represents the exposed JIFFClient global variable
164
174
├─ classes
@@ -174,14 +184,17 @@ The documentation for the client side library is separated into the distinct mod
174
184
## Running Tests
175
185
176
186
All of the JIFF library test cases can be run in the following way:
187
+
177
188
```shell
178
189
npm test
179
190
```
180
191
181
192
Demos are accompanied by test cases. The following command can be used to run the demo servers and test cases:
193
+
182
194
```shell
183
195
npm run-script test-demo -- demos/<demo-name>
184
196
```
197
+
185
198
The command assumes that the server is located at demos/<demo-name>/server.js and the test cases are located at demos/<demo-name>/test.js
186
199
See demos/run-test.sh for instructions on running test cases located in different directories or with different names.
187
200
@@ -190,13 +203,14 @@ See the [testing suite framework documentation](tests/suite/README.md) for more
190
203
## Bundling
191
204
192
205
If you made changes to the library and would like to bundle it again into a single browser-friendly file, you can run this command:
206
+
193
207
```shell
194
208
npm run-script build # will override dist/jiff-client.js
195
209
```
196
210
197
211
## Development
198
212
199
-
The JIFF libraries allow developers to customize or extend their functionality by introducing new *hooks*. Multiple hooks can be combined to form a library *extension*.
213
+
The JIFF libraries allow developers to customize or extend their functionality by introducing new _hooks_. Multiple hooks can be combined to form a library _extension_.
200
214
201
215
### Hooks
202
216
@@ -218,11 +232,13 @@ For examples on how to use an extension, see the following files:
218
232
2.`demos/sum-fixed/client.html`: using fixed point arithmetic extension in the browser.
219
233
220
234
Run the bignumber test suite in the following way:
235
+
221
236
```shell
222
237
npm run-script test-bignumber
223
238
```
224
239
225
240
## How to Contribute
241
+
226
242
Check out our contribution guidelines and resources @ [contributing](CONTRIBUTING.md).
227
243
228
244
# For Cryptographers
@@ -242,33 +258,35 @@ reduces to more traditional models in certain cases. For example, if the computa
242
258
equivalent to 3-party computation with honest majority.
243
259
244
260
## Costs of Operations: [OUTDATED]
245
-
Below is a table of the current costs of operations in the *base* JIFF without extensions:
246
-
247
-
248
-
| Operation | Rounds | Total Messages | Preprocessing Rounds | Preprocessing Total Messages| Dependencies |
1. Exact total number of messages for secret inequalities is: 3\*(parties + parties^2 + (bits+1) \* (2\*parties + parties\*(parties-1))) + 2\*parties + parties\*(parties-1)
266
283
2. Exact total number of messages for constant inequalities is: 2\*(parties + parties^2 + (bits+1) \* (2\*parties + parties\*(parties-1))) + 2\*parties + parties\*(parties-1)
267
284
3. Exact total number of messages for equality checks: 2\*(\*(parties + parties^2 + (bits+1) \* (2\*parties + parties\*(parties-1))) + 2\*parties + parties\*(parties-1)) + 2\*parties + parties\*(parties-1)
268
285
4. Exact total number of messages for division is: bits \* ( 5\*(parties + parties^2 + (bits+1) \* (2\*parties + parties\*(parties-1))) + 2\*parties + parties\*(parties-1) + 2\*parties + parties\*(parties-1) )
269
286
5. Exact total number of messages for constant division is: 1 + 7\*parties + 4\*parties^2 + 8\*(parties + parties^2 + (bits+1) \* (2\*parties + parties\*(parties-1)))
270
287
271
288
Dependencies:
289
+
272
290
1. Multiplication has one message to synchronize beaver triplets and one open in sequence.
273
291
2. inequality tests has 3 less than half primes in parallel, each has an open and as many multiplication in sequence as bits.
274
292
3. constant inequality test has 2 less than half primes in parallel.
@@ -277,7 +295,6 @@ Dependencies:
277
295
6. constant division has one open sequenced with 4 parallel constant inequality checks and two multiplications.
278
296
7. Secret XORs and ORs are equivalent to a single multiplication, constant XORs and ORs are free.
279
297
280
-
281
298
## Information and Collaborators
282
299
283
300
More information about this project, including collaborators and publications, can be found at [multiparty.org](https://multiparty.org/).
0 commit comments