Commit Graph

47 Commits

Author SHA1 Message Date
dan
6b845fd473 test: add browser benches (#570)
* refactor: modularize server-fixture

* Update crates/server-fixture/server/Cargo.toml

add newline

Co-authored-by: sinu.eth <65924192+sinui0@users.noreply.github.com>

* test: add browser benches

* fix deps

* ci: run ci workflow for all pull requests (#571)

* misc fixes

* fix clippy

* don't log a non-critical error to stderr

* use incognito (mitigates random hangs)

* add notes

* distinguish prover kind when plotting

---------

Co-authored-by: sinu.eth <65924192+sinui0@users.noreply.github.com>
Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
Co-authored-by: Ubuntu <ubuntu@ip-10-35-1-164.eu-central-1.compute.internal>
2024-10-14 13:52:52 +00:00
sinu.eth
b76b8314ad feat(wasm): clone getters (#600)
* feat(wasm): clone getters

* fix(wasm): get rid of move semantics and implement Clone

* disable test feature
2024-10-01 07:17:48 -07:00
sinu.eth
53ff873b3a refactor(core): alpha.7 rewrite (#574)
* refactor(core): alpha.7 rewrite

* allow empty idx

* fix empty assumption

* further encapsulate rangeset

* added presentation, finishing touches

* remove unwrap

* update index naming

* add secp256r1 support

* add attestation to presentation output, and serde derives

* handle k256 in KeyAlgId Display

* unnecessary newline

* refactor(core): integrate rewrite changes (#584)

* refactor(core): alpha.7 rewrite

* allow empty idx

* fix empty assumption

* further encapsulate rangeset

* added presentation, finishing touches

* remove unwrap

* refactor(core): integrate rewrite changes

* remove obsolete tests

* add secp256r1 support

* update index naming

* add secp256r1 support

* add attestation to presentation output, and serde derives

* handle k256 in KeyAlgId Display

* unnecessary newline

* fix variable name

* restore changes from dev to tlsn-prover

* use CryptoProvider in config

* clippy

* more clippy
2024-09-19 07:57:54 -07:00
dan
d179150c39 refactor: modularize server-fixture (#563)
* refactor: modularize server-fixture

* small fixes

* Update crates/server-fixture/server/Cargo.toml

add newline

Co-authored-by: sinu.eth <65924192+sinui0@users.noreply.github.com>

---------

Co-authored-by: Ubuntu <ubuntu@ip-10-35-1-161.eu-central-1.compute.internal>
Co-authored-by: sinu.eth <65924192+sinui0@users.noreply.github.com>
2024-08-21 08:50:08 +00:00
yuroitaki
6eaf4a3d2d feat: add protocol configuration negotiation (#513)
* Add configuration check.

* Fix naming and comments.

* Fix clippy.

* Fix clippy using latest rust.

* Adapt new method to send message.

* Add config validator.

* Split max transcript size.

* Remove unused dependencies and redundant declarations.

* Move protocol_config out of verifier config.

* Implement default for configs.

* Apply fmt.

* Correct dependency format.

* Add ignored flag to integration test.

* Change from String to Version, more debugging.

* Use getter instead of pub.

* Move ot estimate methods to ProtocolConfig.

---------

Co-authored-by: yuroitaki <>
Co-authored-by: sinu.eth <65924192+sinui0@users.noreply.github.com>
2024-08-15 14:40:55 -07:00
sinu.eth
2205cb3b2c feat(tlsn-wasm): wasm bindings (#536)
* feat(tlsn-wasm): wasm bindings

* fix wasm ci

* clippy

* clippy allow

* add build config and remove redundant to_vec
2024-07-25 14:15:11 +09:00
sinu.eth
040608bb6e fix: notary cd (#538) 2024-07-24 18:51:34 +09:00
sinu.eth
e14d0cf563 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
2024-07-23 10:43:31 +09:00
sinu
e76a65ebb4 Partition Workspaces 2023-01-12 12:00:05 -08:00
th4s
d7ff993919 Actor share conversion (#136)
* WIP: Adding actor sender for share conversion...

* WIP: Added actor for share-conversion sender

* Added actor for recevier

* Added state enum to allow verify functionality

* Added tests

* Adapted trait bounds to rebase of async-factory PR

* Added part of feedback

* Added more tests

* Completed feedback

* Simplify code with let-else

* code comments + test

* Introduce additional `Error` state for share-conversion sender/receiver

* Added feedback

* misc comments

* Cherry-picked from 870e4a1 and merged

Added more let-else and changed error handling

* Add critical errors which stop actor when out-of-order messages arrive

* Made setup to be a message handled by handler and added it to the
corresponding control

Co-authored-by: themighty1 <you@example.com>
2023-01-12 17:01:05 +00:00
valpaq
bdb2209e40 BLAKE3 (#154)
* sha256->blake3

switched from sha256 to blake3

* rustfmt

Co-authored-by: Valpaq <viktor.paramonov2000@gmail.com>
2023-01-11 22:00:44 -08:00
sinu.eth
416acec977 OT Actors (#119)
* fix ot split methods in mpc-aio

* OT factory actor impl

* merge fixes

* committed ot

* scope stream futs

* trigger CI

* pr feedback

* alias in test for readability

* misc comments

* error handling and comments

Co-authored-by: themighty1 <you@example.com>
2022-12-29 09:26:10 -08:00
sinu.eth
aba2e194ef Pin tokio to 1.23 2022-12-26 18:10:27 -08:00
th4s
f57e91b640 Maliciously secure M2A/A2M (#131)
* WIP: Refactoring a2m/m2a...

* WIP: Refactor homomorphic subcrate...

* Implemented aio homomorph sender

* Removed integration test for now and renamed things

* Implemented homomorph aio receiver

* Improved API

* Rename crate homomorph -> share_conversion

* Rename errors and traits

* Migrated changes from branch `ghash-refactor-again`

* Improvements to share-conversion

- Renamed share_conversion to share-conversion
- Got rid of PhantomData for aio layer

* Improved variable naming and some doc

* Added aio unit tests and various improvements

- documentation
- variable naming

* Added TODO comment for OT integration test

* Added part of feedback

* Separated share-conversion into {share-converison-core, share-conversion-aio}

* WIP: Added recorder and implemented on sender side

* Implemented recorder on receiver side

* WIP: Added first draft for traits

* Implemented SendTape for Sender

* Removed TapeAccept trait

- implemented shell of TapeVerify for receiver

* WIP: Adapted verify function...

* Added verify trait and implemented it for AddShare and MulShare

* WIP: Refactoring replay functionality...

* Reapply feedback

* WIP: Refactoring and simplifing implementation...

* Tidied up and simplified recorder implementation

* Added unit tests for recorder in share-conversion-aio

* Added some comments

* Added barrier for sender

* Added feedback

* Added feedback

* Added feedback

* misc comments

* Fixed imports

* Added feedback

Co-authored-by: themighty1 <you@example.com>
2022-12-20 10:12:47 +00:00
sinu.eth
c8fb348472 Deprecate Paillier (#134)
* deprecate paillier, temporarily disable tls-2pc-aio

* couple fixes
2022-12-15 21:13:13 -08:00
sinu.eth
3c842f5507 Consolidate utils (#127)
* move utils into dedicated crate

* update dependents

* fix Cargo.toml
2022-12-13 15:37:33 -08:00
sinu
6748c5868f bump curve25519-dalek version and enable rand_core feature 2022-12-13 15:21:05 -08:00
th4s
b6d362ca69 Refactor of gf2_128 crate (#123)
* WIP: Refactoring a2m/m2a...

* WIP: Refactor homomorphic subcrate...

* Implemented aio homomorph sender

* Removed integration test for now and renamed things

* Implemented homomorph aio receiver

* Improved API

* Rename crate homomorph -> share_conversion

* Rename errors and traits

* Migrated changes from branch `ghash-refactor-again`

* Improvements to share-conversion

- Renamed share_conversion to share-conversion
- Got rid of PhantomData for aio layer

* Improved variable naming and some doc

* Added aio unit tests and various improvements

- documentation
- variable naming

* Added TODO comment for OT integration test

* Added part of feedback

* Separated share-conversion into {share-converison-core, share-conversion-aio}

* Sample from NonZeroU128 for `random` in a2m

* misc comments and code simplifications

Co-authored-by: themighty1 <you@example.com>
2022-12-13 11:23:50 +00:00
sinu.eth
6fe6dd9d24 Multiplex Actors (#116)
* minimal muxer impl

* refactor and add MuxChannelControl

* implemented MockMuxer

* rename buffers

* implement yamux using xtra

* disable sink feature

* add unpin bound and test streams

* refactor and impl Mock actor

* more cleanup and tests

* pr feedback

* add comments and fix downcast bug

* comments

* rename substream to stream

Co-authored-by: themighty1 <you@example.com>
2022-12-05 13:47:24 -08:00
th4s
031b22d357 A2M 2PC (#108)
* WIP: Started implementing Mul2PC Protocol

* WIP: Implementing mul-2pc

- various bug fixes
- added comments
- refactored into submodules

* Renamed subcrate and

- bugfix in `receive` method
- improved doc
- added struct for messaging

* Adapted OT receive method to right signature and added ot-mock for test

* add test

* WIP: Adding simplifications

* Rewrote implementation

* WIP: Adding a2m algorithm

* Added basic inverse algorithm

* Repaired rebase

* A2M working with simple inversion

- repaired tests
- added tests for A2M

* Improved variable names

* Added bench for inversion

* misc

* Added feedback

Co-authored-by: themighty1 <you@example.com>
2022-11-02 13:22:19 +00:00
th4s
3c592d9e1b Mul 2PC (#106)
* WIP: Started implementing Mul2PC Protocol

* WIP: Implementing mul-2pc

- various bug fixes
- added comments
- refactored into submodules

* Renamed subcrate and

- bugfix in `receive` method
- improved doc
- added struct for messaging

* Improved some names and doc

* Improved doc

* Adapted OT receive method to right signature and added ot-mock for test

* add test

* Adapt variable namings

* WIP: Adding simplifications

* Rewrote implementation

* Added integration test

* Added feedback

Co-authored-by: themighty1 <you@example.com>
2022-10-31 09:29:58 +00:00
th4s
f3ffd3c141 Use new feature workspace dependencies (#102)
* Use workspace dependencies

- relax version dependencies
- adapt all sub-crates to rust version 2021

* Bump remaining rust versions to 2021
2022-10-07 14:02:16 -07:00
sinu.eth
4807727646 OT mpc-aio + utils (#83)
* WIP: Drafting API for OT

* Added implmentation of new OT API for sender

* WIP: Redesigning OT API

* WIP: added draft

* WIP: Reworking crate architecture

* Readded pa to defaults

* Tidied up and added some signatures

* Removed unnecessary dependencies for now

* Implement ObliviousSend for KOS15IOSender

* Added ObliviousSend for RandSetup

* Added Kos15IOReceiver and implemented ObliviousReceive

* Added first KOS15-aio test

Also added a DuplexStream for testing

* Finished adding KOS15 mpc-aio unit tests

* Removed kos15 aio implementation for standard extended OT

* work on muxer

* more work on muxer

* delete base ot and rename extension to kos

* relocate ot error

* change OT receive trait and add mock

* mock ot send

* rename mocks

* remove Protocol types from ot traits

* refactor duplex channel

* add static bound

* update kos

* Remove unnecessary test implementations due to improvements in
DuplexChannel Error

* Remove pin from channel

* move duplex to utils-aio

* refactor duplex channel to use futures instead of tokio

* move Channel trait to utils-aio

* update mpc-aio

* update kos to use utils-aio

* expose InputLabels constructor

* mock ot and wirelabels

* expose constructor

* delete obsolete examples

* remove dummy mod

* mock feature

* disable muxer test

* cargo cleanup

Co-authored-by: th4s <th4s@metavoid.xyz>
2022-09-24 15:52:30 -07:00
sinu.eth
7e57e213f5 Protocol Circuits (#74)
* adder circuits

* wip protocol circuits

* work on nbit add mod

* work on combine_pms_shares

* combine_pms_shares passes tests

* combine_pms_shares doc

* add assert

* use map_le_bytes

* nbit xor

* c1

* remove unused mod

* c2

* c3

* update docS

* export c3

* move helpers to top level

* test helpers

* doc fix

* redo build script

* fix bench

* c4

* c5

* c6

* c7

* delete outdated specs

* delete bristol fashion

* track compiled circuits

* add circuits for parse tests

* update CI, skip tls-circuits tests and remove verbosity
2022-09-08 12:25:09 -07:00
sinuio
ca28e0807b delete junk 2022-08-17 11:17:10 -07:00
sinu.eth
09f3f5e3ec Refactor msgs + serde support (#60)
* add serde derive to garble msgs

* refactor point_addition

* OT refactor

* serde feature

* exclude mpc-aio

Co-authored-by: sinuio <>
2022-08-17 11:10:58 -07:00
th4s
8708b8f1bf Implement matrix transpose (#50)
* First compiling example using SIMD instructions in WASM

* WIP: Added first implementation of transpose_bytes

* WIP: Matrix transposition

- bugfix in transpose_bytes implementation
- added test case
- return error for N = 1 case

* Added a simple bench

* Improved byte transposition

Now need to only allocate the first half of the matrix

* Improved transpose_bytes to only use one pass per round

* Put pointer alloc before loop

* Now benching both versions

* WIP: Matrix tranpose

- made implementation generic
- improved documentation
- removed slower variant

* WIP: Implementing bit transpose

* Added transpose_bits implementation for wasm architecture

* Improved matrix transpose implementation

- added x86_64 bit-level transpose
- improved api and documentation

* Removed transmute and unused dependencies

* WIP: Various bugfixes

- added test for transpose_bits_unchecked

* Added a bench and removed double implementation of
bitmask_shift_unchecked

* It works

- bugfix in test_transpose_bits

* Renamed crate and made part of tlsn

* Added feature simd-transpose

* Bugfix for row dimension

* Added errors and little bugfix in error-check of transpose_bits function

* WIP: Added non-simd matrix-transpose

* Small bugfix and added doc

* Moved benches to criterion

* Added baseline implementation to criterion benches

* improved non-simd vesion

* Improved simd version

* Reverted changes in mpc-core

* Added feedback
2022-08-10 12:33:46 +00:00
sinuio
90c98c1935 ignore test, and temporarily exclude tls-client from workspace 2022-07-29 09:33:55 -07:00
Dan
ce66d2c419 KOS15 check (#29)
* KOS15 check

* prost->core try_into
misc rename

* add new states
replace unwrap

* fix xor()

* add clmul crate

* remove debug info

* add license file

* replace unwrap with match

* move emptool ref clmul128 into clmul.rs to avoid cfg_if in lib.rs
test all backends from lib.rs

* idiomatic error assert in tests

* 6x speed up with clmul_reuse. add benchmarks

* simplify autodetection logic

* resolve endianness issue

* add a dummy "tests" dir to make mod tests happy

* fix path

* add MIT license and README

Co-authored-by: themighty1 <you@example.com>
Co-authored-by: sinuio <>
2022-06-15 12:27:41 -07:00
sinuio
34ceea075e rename prover to requester 2022-06-14 23:10:50 -07:00
sinuio
a57749a48f small fixes 2022-06-14 22:50:22 -07:00
sinuio
997d41e095 update workspace 2022-06-14 22:50:22 -07:00
sinuio
809cefce59 protocol crates 2022-06-14 22:50:21 -07:00
sinuio
1d7f39afda comment out wasm 2022-04-05 22:08:09 -07:00
sinuio
19f23f16f3 proto feature gates 2022-04-05 21:15:05 -07:00
sinuio
2795c67d5e feature gates 2022-04-05 21:12:49 -07:00
sinuio
927ce8ef9a refactored secret_share 2022-03-30 20:26:16 -07:00
sinuio
6d090820df remove pop- prefix from crate names 2022-03-23 16:36:27 -07:00
sinuio
17d80c5514 created tls-aio crate 2022-03-23 13:35:36 -07:00
sinuio
d98c5d0549 refactored code to use protobuf circuits 2022-02-28 19:39:59 -08:00
sinuio
8fb57b66e8 removed unused 2022-02-24 23:12:54 -08:00
sinuio
b1bc0dcb27 initial work on proto 2022-02-21 19:31:16 -08:00
sinuio
c90830a46f created pop-mpc-aio crate 2022-02-20 17:44:43 -08:00
sinuio
ca5a6f55bd renamed pop-mpc to pop-mpc-core 2022-02-20 16:48:27 -08:00
sinuio
3b33854f90 circuit implementation 2022-01-27 17:15:22 -08:00
sinuio
60328e13fb added sinuio to packages authors 2022-01-19 14:42:36 -08:00
Justin Martin
90f9f52f05 Some initial work 2022-01-13 23:08:06 -08:00