957 Commits

Author SHA1 Message Date
yuroitaki
c157c2d3ea Use sync mutex for store in notary server (#482)
* Fix clippy error.

* Use sync mutex for store.
2024-05-06 12:09:29 +08:00
yuroitaki
dc0b887966 Fix clippy error from rust toolchain 1.78.0. (#481) 2024-05-03 18:52:54 +08:00
dan
c431865aea docs: fix style in components (except tls) (#477)
* docs: fix style in components (except tls)

* Update components/cipher/stream-cipher/src/lib.rs

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

* Update components/universal-hash/src/ghash/ghash_core/mod.rs

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

---------

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
2024-04-30 10:08:53 +00:00
dan
9fc0d9162d docs: fix style (#476) 2024-04-25 12:37:40 +00:00
dan
f63a74efe8 docs: misc fixups (#475) 2024-04-24 13:47:21 +00:00
Hendrik Eeckhaut
f558d5bc44 Update rust cache in github action (#453)
ci: Update rust cache in GitHub action and do not skip draft PRs
2024-04-24 14:12:40 +02:00
sinu.eth
68b9474015 fix: drop connection instead of manual close, enable deferred decryption (#472) v0.1.0-alpha.5 2024-04-09 08:47:53 -08:00
Christopher Chong
b4334ad17d chore: Bump versions for release alpha.5. (#470)
Co-authored-by: sinu.eth <65924192+sinui0@users.noreply.github.com>
2024-04-08 08:42:51 -08:00
Hendrik Eeckhaut
d53203e276 docs: List interative example in the examples README (#471)
#451
2024-04-08 08:31:25 -08:00
Christopher Chong
5c0a0309e9 Add api key whitelist hot reloading and small touch-up (#458)
* Add hot reload of api key, remove prover ip, move html static text.

* Add documentation.

* Toggle back config, add comments.

* Edit comment and html info.

* Edit comment.

* Change to sync mutex.
2024-04-04 17:02:22 +08:00
Christopher Chong
a4c7760aec Correct branch links in readme. (#469)
* Add branches info in readme.

* Correct branch links.
2024-03-29 14:46:58 +08:00
Christopher Chong
9e041b81e8 Add branches info in readme. (#467) 2024-03-29 11:23:43 +08:00
ntampakas
173945dd0a Deployment of multiple stable versions (#459)
* Remove cargo/bin from PATH

* Modify script to run only in nightly env

* Modify script to stop the oldest version in stable env

* Modify script to support dir preparation for the 3 latest stable versions

* Modify script to start service for the 3 latest stable versions

* Modify sercice validation script

* Create proxy modification script

* Add step in workflow to enable ssm execution against proxy + aux script

* Add running state filter when fetching InstanceID

* Enhancement of validation script

* Modify bash behavior

* Point tags/deployment to new AWS resources

* Change GH owner to production one

* Point tags to new EC2 v1

* Move all cd scripts to a new folder

* Add comment

* Add comment

* Add comment

* Add comment

* Modify scripts to support exit on error

* Check if all stable ports are in use and terminate
2024-03-29 11:10:18 +08:00
Hendrik Eeckhaut
aa264a90cb perf: Docker container for running benches + manual GitHub action (#460)
+ Plot runtime vs latency graph  and bandwidth
2024-03-26 08:44:08 +01:00
sinu.eth
3e29a5bfe5 feat: record layer preprocessing (#455)
* feat: implement record layer preprocessing

* fix ke test

* fix pa tests

* fix aead tests

* fix integration test

* Apply suggestions from code review

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

* add mode sanity check

---------

Co-authored-by: dan <themighty1@users.noreply.github.com>
2024-03-25 08:58:52 -08:00
sinu.eth
9a081c6cbc feat: automated network benches (#457)
* feat: automated network benches

* Update tlsn/benches/src/metrics.rs

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

* remove explicit drops

* remove unnecessary sudo

---------

Co-authored-by: dan <themighty1@users.noreply.github.com>
2024-03-20 09:01:40 -08:00
sinu.eth
19e9c50f35 fix(tlsn-formats): fix commitment error caused by empty headers (#452) 2024-02-29 21:46:42 -08:00
Hendrik Eeckhaut
d7bc0e5cae feat: interactive verifier example (#451)
#440

Co-authored-by: Christopher Chong <t.kleinchong@gmail.com>
2024-02-29 22:18:41 +01:00
Christopher Chong
eec93101bc Update repo readme. (#450)
* Update repo readme.

* Doc: Added minor improvements + a link to other repos

#353

---------

Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org>
2024-02-28 11:37:11 -08:00
sinu.eth
2372403d38 feat: separate transcript size limits (#435)
* feat(tls-mpc): separate transcript size limits

* feat: separate transcript limits

* feat(tlsn-server-fixture): configurable length byte payload

* refactor(tls-mpc): use defaults in ghash setup

* fix OT estimates

* feat(notary-server): separate transcript limits

* remove dep patch

* fix notary server test
2024-02-21 12:24:42 -08:00
Hendrik Eeckhaut
be24f58364 Show basic html info response for notary server's root endpoint (#439)
feat: basic html info response for notary server's root endpoint

Co-authored-by: Christopher Chong <t.kleinchong@gmail.com>
2024-02-15 14:48:14 +01:00
Christopher Chong
1e99db879a Update notary server README for frequent q&a. (#441) 2024-02-15 16:27:41 +08:00
sinu.eth
309c37fdec chore: v0.1.0-alpha.4 release prep (#437)
* bump version to v0.1.0-alpha.4

* set package version for tlsn-formats
v0.1.0-alpha.4
2024-02-13 10:15:25 -08:00
sinu.eth
c7abc8cecd chore: bump deps (#430)
* chore: bump tlsn-utils version

* chore: bump mpz version

* bump mpz
2024-02-13 09:37:13 -08:00
sinu.eth
0d269ed023 refactor(tlsn-examples): update hyper and use http prover (#434)
* add notary function to examples lib

* use hyper 1.1 version in examples

* update twitter example to use HTTP prover

* use deferred decryption in twitter example
2024-02-13 06:50:30 -08:00
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