932 Commits

Author SHA1 Message Date
sinu.eth
98a3c4d754 feat(tlsn-formats): default commit to entire http request/response (#433)
* feat(tlsn-formats): default commit to entire http request/response

* refactor(tlsn-formats): avoid duplicate HTTP commitments, add test fixtures
2024-02-13 06:49:52 -08:00
sinu.eth
82b95821e3 fix(tlsn-formats): prevent duplicate json array commitment (#432) 2024-02-12 10:39:44 -08:00
sinu.eth
a439838a22 docs(tlsn-formats): remove dead argument docs (#429)
* remove dead argument doc

* remove another dead argument doc
2024-02-09 09:47:09 -08:00
sinu.eth
e19fb006a3 docs(tlsn-core): update Direction docs (#427) 2024-02-09 09:46:47 -08:00
Christopher Chong
de4d0240ab Use logging filter, remove otel. (#422)
* Use env var for logging filter, remove otel.

* Fix directives.

* Revert to using config for logging filter.

* Modify default logging strategy and make filter optional.

* Revert formatting of other crates.

* Update README.

* Update notary-server/README.md

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>

---------

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
2024-02-09 22:20:21 +08:00
sinu.eth
29fb409409 fix(tls-core): use non_exhaustive instead of private zst (#428) 2024-02-08 20:04:13 -08:00
sinu.eth
bb50e3dacf refactor: selective disclosure api (#380)
* refactor: selective disclosure api

* remove incomplete substring proof API

* remove unnecessary type annotation

* simplify tests

* switch from unit structs to empty structs

* skip committing empty strings

* fix notary server test

* rename RecordKind to MessageKind

* update json commit error doc

* commits -> commits to

* update commit_array doc

* function argument doc styling

* Update tlsn/tlsn-core/src/proof/substrings.rs

Co-authored-by: dan <themighty1@users.noreply.github.com>

---------

Co-authored-by: dan <themighty1@users.noreply.github.com>
2024-02-08 13:52:15 -08:00
sinu.eth
f9f4a08b6e refactor: tlsn-common mux module (#420)
* add tlsn-common crate with mux module

* add tlsn-common as a workspace dep

* use tlsn-common for mux setup

* add tracing feature to tlsn-common

* naming consistency

* remove duplicate workspace member

* Apply suggestions from code review

Co-authored-by: dan <themighty1@users.noreply.github.com>

---------

Co-authored-by: dan <themighty1@users.noreply.github.com>
2024-02-01 11:55:06 -08:00
sinu.eth
9d095b904b feat: network simulation benches (#417)
* add network simulation benches

* update README clean up section

* update comment

* log span events

* Update tlsn/benches/README.md

Co-authored-by: th4s <th4s@metavoid.xyz>

---------

Co-authored-by: th4s <th4s@metavoid.xyz>
2024-02-01 11:46:56 -08:00
sinu.eth
e93c42e603 feat: deferred decryption (#416)
* finalize committed messages

* add backend notify

* refactor tls-client-async

* commit to transcript when server closes

* add prover control

* fix various edge cases and get test working

* dead code

* removed accidental cargo expand output

* add default impl for notifier

* fix unset committed flag

* Comment suggestions from review

Co-authored-by: dan <themighty1@users.noreply.github.com>

* document 'accepting_messages'

* clarify get_notify comment

* comment record_layer zk functions

* Apply suggestions from code review

Co-authored-by: dan <themighty1@users.noreply.github.com>

* remove unused is_decrypting method

---------

Co-authored-by: dan <themighty1@users.noreply.github.com>
2024-02-01 11:37:52 -08:00
ntampakas
b984b074be Deployment of notary-server using GH Actions & AWS CodeDeploy (#419)
* Add CodeDeploy appspec file + hooks

* Add workflow + build/deploy aux scripts

* Decrease timeout

* Remove sleep

* Replace testing repo -> prod

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>

* Rename appspec scripts folder name

* Rename workflow / change workflow event triggers / wait for ci success run

* Rename aux script names

* Install stable rust / use caching

* Add PR URL

* Move .git dir copy to S3 before cargo build

* Remove swp file

* Modify concurrency group

* Manipulate environment on push

* Fix typo

---------

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
2024-01-31 00:57:32 +08:00
sinu.eth
ee17919d9c perf: adjust mux config (#418)
* perf: adjust mux config

* limit max streams to 40

* add reference for mux config
2024-01-25 13:13:33 -08:00
sinu.eth
84bd7966fe refactor: add AEAD prove/verify + tag methods (#415)
* refactor: add prove/verify + tag methods

* Update components/aead/src/aes_gcm/mod.rs

Co-authored-by: dan <themighty1@users.noreply.github.com>

---------

Co-authored-by: dan <themighty1@users.noreply.github.com>
2024-01-17 15:32:02 -08:00
sinu.eth
c4bf57fdbf feat: tls-client backend buffer (#414)
* add buffer methods to backend

* update tls-mpc
2024-01-17 15:23:40 -08:00
sinu.eth
5c4da33e59 refactor: use tls prf from tls-core in rc backend (#413)
* refactor: use tls prf from tls-core in rc backend

* clippy
2024-01-17 15:15:39 -08:00
dan
6bf4e87a72 style: change the name to NotarySigningKeyProperties (#410) 2024-01-17 12:43:36 +00:00
dan
43a05c2d0e docs: add style guide (#411) 2024-01-17 10:43:05 +00:00
sinu.eth
3c82a1a894 add RustCrypto TLS prf to tls-core (#408) 2024-01-15 11:16:37 -08:00
sinu.eth
e1bfb563b6 MPC-TLS actor refactor (#405)
* encapsulate record layer

* decouple commitment from decryption

* use record layer byte counts

* actor refactor

* shutdown follower on finalize, not close

* rustfmt

* re-enable lints

* fix lint errors

* flatten ifelse block

* Apply suggestions from code review

Co-authored-by: dan <themighty1@users.noreply.github.com>

* stick to leader/follower semantics in comment

Co-authored-by: dan <themighty1@users.noreply.github.com>

* rustfmt

* update follower shutdown error

---------

Co-authored-by: dan <themighty1@users.noreply.github.com>
2024-01-15 11:11:05 -08:00
Hendrik Eeckhaut
099737cbfc docs: Updated examples based on the Progcrypto workshop (#399)
docs: Updated examples based on the Progcrypto workshop

+ improved READMEs
+ proof creation in Twitter example
2024-01-11 12:40:22 +01:00
dan
1735b9c399 feat: Interactive verifier (#379) (#401)
* Added necessary state and state transitions

* Move Prover future into its own module

* Put phase-specific prover code into its own modules

* Make `ProverFuture` public again

* Added `Into` from `Closed` to `Verify` for `Prover` state transition

* Added first part of finalize method for `Prover<Verify>`

* Rename `SessionData` to `NotarizedSessionData` and introduce
`SessionData` for interactive verifier flow

* Added first sketches for HttpProver and Prover with Verifier state

* Introduced wrapper `ServerInfo`

`ServerInfo` is generated by `SessionData` and is the non-notarization
version of `SessionProof`

* Crate `ServerInfo` from `SessionData` in Prover<Verify> flow

* Introduced another module for direct substring proofs.

* WIP: Added dirty first version of prover flow...

* Move `RangeCollector` and restore substring module

* Tidy up tlsn-core and finish first version of prover flow for dealing
with a verifier

* Refactored verifier

* Added `Verify` state for `Verifier`

* WIP: Added first draft for verify flow...

* Added more parts of verifier flow

* Adapt tests to new api changes

* Add some logging and improve code here and there

* Added `ProofBuilder` trait and started implementing it for `SubstringsProofBuilder`

* WIP: Tinkering with lifetimes...

* Resolved lifetime issues

* Refactor module `proof` to support another implementor of `SubstringProofBuilder`

* WIP: Adding `LabelProofBuilder`...

* Streamlined api

* Improved decoding flow

* Include lengths in `LabelProof`

* Improved structure of `LabelProof` and finished `verify`

* Added integration test for verify flow

* Add tests for `LabelProof`

* Improve test for `LabelProof::verify`

* Make tlsn compile without `tlsn-formats`

* Restore `tlsn-formats` from `dev` and temporarily remove from workspace

* Add first batch of feedback

* Add further feedback

* Separated decoding from finalization

* Add warning comment to `Verifier::receive`

* Remove unnecessary traits

* Adapt test

* Repair notarize integration test

* Add `decode` call to prover for verify integration test

* Simplified `LabelProof` and renamed to `TranscriptProof`

* Add range check to `reconstruct`

* Roll back changes to `tlsn-prover/src/http`

* Rename `Verify` to `Prove`

* Added more feedback

* Various code improvements

* Remove `SessionData`

* Restore naming of `TlsProof` and `SessionData`

* Improve error handling

* Adapt prove-verify flow to new API

* Finalize VM first

* Fix prover closing connection too early

* Add correct server certificate and assert correct redactions

* Fix imports after rebase

* Fix api test in `tlsn-core`

* Add feedback

* Fix linting in integration test

Co-authored-by: th4s <th4s@metavoid.xyz>
2024-01-10 11:50:18 +00:00
sinu.eth
9169088258 Add verify tag and zk to aead (#390)
* add verify tag and zk to aead

* move local decryption into stream cipher

* fix arg name

* return plaintext

* truncate tag in zk methods
2023-12-29 14:06:16 -08:00
sinu.eth
3cb59ebf83 chore(tls-client): clippy fix (#400) 2023-12-28 15:24:11 -08:00
Christopher Chong
f355ef581c Update README following successful release of notary server docker in gcr. (#398) 2023-12-22 01:42:27 +08:00
Christopher Chong
bfc707858f Bump version. (#397) v0.1.0-alpha.3 2023-12-21 11:37:39 +08:00
Hendrik Eeckhaut
2d205f66fe Add ci build for WASM target for specific packages (#394)
Build tlsn-core, tlsn-prover and tls-client for wasm
2023-12-18 15:30:16 +01:00
Hendrik Eeckhaut
69a4f56968 Use ring 0.17 in prf tests too (#395)
#391
2023-12-18 10:56:44 +01:00
Christopher Chong
3d40995347 Optimise test to use release profile to speed up notary server integration test (#393)
* Optimise test.

* Restrict release profile to notary server tests.
2023-12-13 15:19:14 +08:00
Kevin Mai-Husan Chia
5fcae878c3 Use ring v0.17 (#391)
* feat: use ring v0.17

* fix: broken tests due to API changes

* change type of `f` in `KeyExchange.complete`

* fix: code in comment failed to build

* refactor: `to_vec` to `as_ref` to avoid copy
2023-12-12 09:15:01 -08:00
Christopher Chong
52d6bb20db Add git commit hash and timestamp to info endpoint (#392)
* Add commit hash and timestamp

* Fixed Docker build problem

#392

* Fix error message and docker build.

* Update README and openapi yaml.

* Formatting.

---------

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
2023-12-12 11:55:40 +08:00
Christopher Chong
31708c0805 Make tls optional between prover and notary. (#387)
* Make tls optional between prover and notary.

* Parameterize test, flatten code.
2023-12-11 11:29:50 +08:00
sinu.eth
61528833cd fix: unused doc comment (#386) 2023-11-18 14:07:37 +03:00
sinu.eth
786195b1a4 feat: stream cipher zk (#384)
* feat: stream cipher zk

* bump mpz version to ecb8c54
2023-11-18 11:50:54 +03:00
Kevin Mai-Husan Chia
6270dd8b0e Make CORS permissive (#385)
* fix: make cors permissive

* style: format
2023-11-15 20:20:47 +08:00
Christopher Chong
022b2bd916 Add auth middleware, info endpoint to notary server (#368)
* Init auth middleware.

* Add auth module and info endpoint.

* Modify comment.

* Make failure to load auth list fallible.

* Uses hashmap for whitelist, remove expired session, and other fixes.

* Turn off auth.

* Fix argument type.
2023-11-14 21:48:20 +08:00
Kevin Mai-Husan Chia
2fa4f50b50 Replace std::time::SystemTime::now to support wasm32 (#383)
* feat: use web-time to support wasm32

* remove unused import
2023-11-13 16:31:19 +03:00
th4s
4be88ea7a7 Adapted readme for docker image (#382)
* Adapted readme for docker image

* Fix command

* Change the other urls for docker image.

---------

Co-authored-by: Christopher Chong <t.kleinchong@gmail.com>
2023-11-08 15:46:31 +08:00
sinu.eth
cd0289f78b perf: pre-garble key exchange and PRF (#371)
* prf pre-garble

* fix

* update mpz version to 7669232

* fix ValueId dependency

* PR feedback

* bump mpz to 1ac6779
2023-10-26 12:23:59 -07:00
Hendrik Eeckhaut
f031a5b34e Enable clippy for examples in ci build (#373)
Enable clippy for examples in ci build

#372
2023-10-25 00:06:57 +02:00
Hendrik Eeckhaut
bfcb308c40 Also redact some received data in simple_prover (#370)
Also redact some received data in simple_prover
2023-10-23 09:14:15 +02:00
sinu.eth
ce80e75461 refactor: tlsn-verifier (#360)
* rename tlsn-notary crate to tlsn-verifier

* move to tls module, encapsulate notary functionality

* remove unused future

* Add comment to `notarize` function

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

* update notary-server

* remove redundant fuse, fix comment

* fix rustdocs action

* fix tlsn-prover fut

---------

Co-authored-by: th4s <th4s@metavoid.xyz>
2023-10-18 11:54:36 -07:00
sinu.eth
b515c49a7a feat: selective disclosure tooling (#335)
* tlsn-formats minimal

* initial work on verifiers

* decouple proof builder from SessionData

* add commit remaining fn

* unit tests passing for commit and prove

* remove wip verify modules

* remove unused

* serde derives, fix test

* move tls prover into module and implement http prover

* docs

* rebase fixes

* remove dead code

* update integration test

* remove unwrap

* handle invalid json path commitment

* fix body proof build, and add commit all methods

* fix http comments

* add extra check to range

* rename GarbleRole to DEAPRole

* add gf2 comment

* comment unused body_built field

* fix notary-server integration test
2023-10-18 11:14:32 -07:00
Christopher Chong
8783a62ea1 Modify notary url parsing to make it generic for both ip and domain (#366)
* Modify url parsing and readme.

* Modify README.
2023-10-17 16:34:45 +08:00
Christopher Chong
3e0dcc77d5 Tidy up examples folder. (#362)
* Tidy up examples folder.

* Remove clone.
2023-10-16 16:02:40 +08:00
0xvon
1a9fc7ea6f fix: PRF bench (#363) 2023-10-14 15:13:22 -07:00
Christopher Chong
4408dfa316 Migrate notary-server repo (#358)
* Migrate notary-server repo in, merge in github actions, update dockerfile and readme.

* Correct formatting.

* Move clippy back to original order.

* Fix clippy warning.

* The notary server was moved to this repo

#358

* Modify comments.

* Add session id query param PR changes.

* Fix cd issue and client bug.

---------

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
2023-10-13 15:08:00 +08:00
sinu.eth
b603460116 chore: restore cert tests (#361) 2023-10-11 23:06:12 -07:00
sinu.eth
1c7273143e tlsn-core fixtures (#359)
* move fixtures back into tlsn-core crate

* add --all-features tests

* limit --all-features tests to tlsn workspace

* satisfy clippy

* fix eph key fixture

* Update tlsn/tlsn-core/src/fixtures/cert.rs

Co-authored-by: dan <themighty1@users.noreply.github.com>

* remove webpki tests, and factor out cert verifier

* fix unused import

---------

Co-authored-by: dan <themighty1@users.noreply.github.com>
2023-10-10 13:13:40 -07:00
sinu.eth
b6a8cf1af5 axum server fixture (#356)
* tlsn-server-fixture

* Update tlsn/tlsn-server-fixture/src/data/.gitignore

* Update tlsn/tlsn-server-fixture/src/tls/domain.ext

* Update tlsn/tlsn-server-fixture/src/data/4kb.html
2023-10-04 20:29:53 -07:00
Christopher Chong
a8f9a56bd7 Yamux send tls closenotify (#355)
* Add shutdown control.

* Merge in dev.

* Send CloseNotify from prover.

* Add missing files.

* Change caller of close and formatting.

* Correct formatting.

* Change triggering logic.

* Modify comment.

* Bump mpz version.

* Add missing import,.
2023-10-03 09:58:17 +08:00