Commit Graph

356 Commits

Author SHA1 Message Date
sinu
e05417d1fb add banner image 2022-12-13 20:23:54 -08:00
sinu
41c49673fa remove outdated diagram 2022-12-13 20:05:44 -08:00
sinu
40de62dbc5 remove old docs 2022-12-13 20:05: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.eth
69eea10b79 GC Refactor + Docs (#126)
* refactor gc state and add summary state

* more clean up and refactor

* rename encoding to decoding

* fix mpc-aio

* comments/documentation

* implement methods for summary state

* fix module doc

* comment fixes

Co-authored-by: themighty1 <you@example.com>
2022-12-13 15:28:45 -08:00
sinu
6748c5868f bump curve25519-dalek version and enable rand_core feature 2022-12-13 15:21:05 -08:00
sinu.eth
3e85a4970c Refactor output commitments + Dualex (#125)
* refactor output commitments and tidy up dualex

* relocate impl block

* remove duplication

* remove redundant tests

* reverse order in hash commitment
2022-12-13 13:48:25 -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
themighty1
fb604e5973 fix test https://github.com/tlsnotary/tlsn/actions/runs/3684476475/jobs/6234257879#step:6:210 2022-12-13 13:13:19 +02:00
sinu.eth
6e3032ff51 Garble Circuit Consistency Check + Compression (#124)
* update gc validation and api

* extract label functions into label module

* more work on validation + input label reconstruction

* consolidate validation functionality

* aio traits, and testing

* comments and test

* PR feedback

Co-authored-by: themighty1 <you@example.com>
2022-12-09 10:33:25 -08: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
1e0b5fcdd9 OT: Add sender input for the number of OTs to generate (#117)
* Sender now needs to input `count` as his input for the number of OTs

- added test
- improved variable namings and doc

* Fix typo in error message

* comments

Co-authored-by: themighty1 <you@example.com>
2022-11-17 11:54:25 +00:00
sinu.eth
34f7e867c9 Rayon Garbler (#115)
* rayon garbler

* comment RayonGarbler

* rename some things, fix import

* remove redundant ref

* move and rename mock backend

* rename error
2022-11-16 10:02:07 -08:00
Dan
c559b6083e dualex comment (#114)
Co-authored-by: themighty1 <you@example.com>
2022-11-11 09:44:59 -08:00
sinu.eth
b958a53ea8 Semi-honest GC (#109)
* implement semi-honest gc

* output label validation test

* use ok_or instead of match

* remove output decoding from message

* implement output label commitments

* update comment

* always shuffle output commitments

* comments

* revert dualex comment

Co-authored-by: themighty1 <you@example.com>
2022-11-10 11:01:05 -08:00
th4s
79e2e725da Fix clippy lints for tls-2pc-core (#113) 2022-11-10 10:06:53 +00:00
sinu.eth
3ca47aec5b Update C6 (#110)
* rename input mask to plaintext

* update naming and docs for c6

* touch ups
2022-11-05 13:40:04 -07: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
themighty1
83340f5ab3 adaptive_barrier test fix 2022-10-24 13:36:13 +03:00
themighty1
ed322e67cc correct the probability comment 2022-10-21 14:52:18 +03:00
themighty1
aa336d9c0e rename rand_receive 2022-10-21 14:45:43 +03:00
themighty1
c160558742 fix probability comment 2022-10-21 14:21:45 +03:00
Dan
41f3734d28 Merge pull request #104 from tlsnotary/PR86comments
misc comments
2022-10-10 09:18:41 +00:00
themighty1
65101b2db1 change decommitted 2022-10-10 08:07:20 +03: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
a86eb42018 Ci/cache build (#101)
* update rust ci

* remove bench test from ci
2022-10-07 09:58:30 -07:00
themighty1
d7318c6f05 misc comments 2022-10-07 18:21:57 +03:00
sinu.eth
9f6f92eb06 Async compute for garbled circuits (#99)
* Async compute for garbled circuits

* misc comments

Co-authored-by: themighty1 <you@example.com>
2022-10-07 00:19:08 -07:00
sinu.eth
3a23feabb6 Ignore expensive tls-circuits tests (#100) 2022-10-06 14:08:27 -07:00
th4s
4151527ecd Introduce macro for extracting enum variants in messaging (#95)
* Introduce macro for extracting enum variants in messaging

* Change braces to parentheses
2022-10-06 09:39:36 +00:00
th4s
582301d3ac Committed OT (#86)
* Added new APIs to create sender/receiver from seed

* Adapted KOS sender for OT commitments

* Added de-/commitments for sender

* Removed seed for receiver

* Removed committed OT functionality for standard KOS15

* Added core logic for committed OT

- Receiver can now invoke verify-function
- Tracking of offsets should work

* Bugfix in core logic

* First test for committed OT works

* Added another test for committed ot

* Added test for committed OT on split OTs

* Added traits for committed OT in mpc-aio

* Added mpc-aio test for committed OT and improved traits

* Added comments and improved API

* Added feedback for 1,3 and 5

1. Return OT cleartext values
3. Rename `decommit` -> `reveal`
5. Message is again consumed instead of passed by reference

* Added feedback for 2 and 4

- remove commitment type from traits
- salt sender commitment

* Remove old mutex approach

* Added AdaptiveBarrier

- made function `reveal` unsafe
- tidied up left-overs

* Added improvments for committed OT

- increment rng seed
- sender does not send cleartext values

* Splitting now works with committed OT

* Fixed sender offset when splitting
2022-10-04 08:14:59 +00:00
sinu.eth
1e1f87e90f 2PC PRF aio (#89)
* initial work on hs

* export P256SecretShare

* move deps out of constructor

* reexport Circuit

* rename follower msgs

* session key shares

* initial work on prf

* more work on prf

* more work on prf

* reorder and rename c3 io

* P256Secretshare constructor and types

* more work on prf

* rename test

* remove test

* prf verify_data

* multithread test + bench

* delete obsolete handshake mod

* remove ref to hs mod

* cleaner error handling

* update error handling in circuits

* use input_value convenience function

* rebuild c3 and fix test
2022-10-03 12:08:53 -07:00
sinu.eth
67ee7fe78f Convenience function for circuit input values (#91) 2022-10-02 23:46:10 -07:00
sinu.eth
763be1556a Return error for missing circuit io (#90) 2022-10-02 23:29:01 -07:00
sinu.eth
19a62500a9 Send constant wires to evaluator (#88) 2022-09-26 10:09:16 -07:00
sinu.eth
8404e481f7 Refactor point addition in mpc-aio (#85) 2022-09-26 09:50:50 -07:00
sinu.eth
f92b735225 DualEx mpc-aio (#84)
* move dualex state into module and expose pub

* relocate output commit/check and add msg models

* dual execution works

* expose exec

* add extension trait

* return evaluated circuit instead of decoded output

* mock dualex

* update dualex doc

* update dualex doc again
2022-09-26 09:47:05 -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
themighty1
2812992b0b derandomization comment 2022-09-22 15:23:43 +03:00
th4s
33176118cb Repair test_masked_xtable (#82)
* Repaired test

* Repaired test better than before
2022-09-20 15:58:12 +00:00
sinu.eth
ff35a85798 Refactor point addition to typestates (#77)
* refactor point addition to typestates

* impl Add for secretshares

* updated docs as per feedback

* fixed var name
2022-09-19 22:55:27 -07:00
sinu.eth
842186cd75 PRF rename and docs (#78)
* rename to prf

* docs and expose state in prf

* more docs

* add link to docs
2022-09-19 22:29:51 -07:00
sinu.eth
fb33f5abbb Refactor 2pc-handshake to typestates (#76)
* typestate refactor and renaming

* cleanup

* expose state structs
2022-09-19 09:33:45 -07:00
th4s
d8b9f05a92 Readded OT splitting after KOS refactor (#73)
* Readded OT splitting after KOS refactor

* Removed unused seeds fields

* Added unit tests for ot splitting

* Removed derandomization splitting
2022-09-16 10:59:59 +00: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
sinu.eth
2322b38613 Circuit Builder API (#72)
* WIP value types

* WIP gate specs

* visibility and dep

* update bin

* bytes type

* tidying

* update proto model

* update circuits

* parse bits

* update mpc-core

* scrap unused circuits

* change nonce and counter to 16 bits

* more work on circuit specs

* remove redundant sub circuit from c4

* gitignore bins

* drop invariant and add error diff

* gate invariant and comments

* topological sorting algorithm

* disable build specs

* reinclude circuit bins

* ignore dead_code

* disable bench while crate is wip

* wip builder

* builder tests pass

* export CircuitBuilder

* export BuilderError

* tidying

* remove result from connect

* add gate wire getters

* fan out and rename fn

* format to string

* make builder module public

* rename constructors

* docs

* add constant value types

* rename error

* remove todo

* unwrap err

* test invariants

* update error in mpc-core

* restore bristol-circuits

* Revert "restore bristol-circuits"

This reverts commit dcb491c435.

* cleaner constant check

* invert diff

* remove gate invariant

* parse bf and save as yml

* fix value type parsing

* update circ binaries

* sha256 tests

* new unchecked

* map bytes

* rename to map_le_bytes

* use and_then

* tidy comment

* refactor out Arc

* remove debug assert

* typos
2022-09-07 10:16:45 -07:00
th4s
237adc3b36 Kos15 refactor (#65)
* Added new module structure for sender and receiver

* WIP: Refactoring KOS15 receiver

* WIP: Refactoring KOS15 receiver...

* Refactored KOS15 receiver

* WIP: Refactoring KOS15 sender

* WIP: Refactoring KOS15 sender...

* Added extension setup for sender and some minor improvements in utils.rs

* Refactored KOS15 sender

* Added tests for ByteMatrix

* WIP: Refactoring KOS15 tests

* Streamlined imports and moved KosMatrix module

* Refactored KOS15 unit tests

* Refactored benches and examples

* Bugfix for padding

* Fixed remaining bugs

* Padding more flexible and uses LANE_COUNT as input

* Apply clippy hints and improve padding

* Removed old KOS implementation and streamlined api

* Kos15Sender now generic over Setup and RandSetup

* Kos15 receiver now generic over Setup and RandSetup

* Add feedback 1/2

* Added feedback 2/2

* Added feedback
2022-08-30 07:40:58 +00:00
sinu.eth
ad486755e9 Circuit value conversions (#66)
* WIP value types

* WIP gate specs

* visibility and dep

* update bin

* bytes type

* tidying

* update proto model

* update circuits

* parse bits

* update mpc-core

* scrap unused circuits

* change nonce and counter to 16 bits

* more work on circuit specs

* remove redundant sub circuit from c4

* gitignore bins

* drop invariant and add error diff

* gate invariant and comments

* topological sorting algorithm

* disable build specs

* reinclude circuit bins

* ignore dead_code

* disable bench while crate is wip
2022-08-29 14:26:25 -07:00
th4s
92f0ea0f33 Improvements for padding in KOS15 (#64)
* Improvements for padding in KOS15

- Remove `self.padding` of KOS15Receiver
- Remove the entire padding after transposition for both sender and
  receiver

* Adapted comment
2022-08-19 12:40:42 +00:00