Skip to content

SeddonShen/zktls

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zkTLS

ZkTLS: Acces anys web2 data in web3 world trustless.

What is zkTLS

TLS is a widely used foundational internet protocol that ensures the security and integrity of data transmission. Additionally, TLS uses PKI to enable entity authentication. By combining zero-knowledge (zk) with TLS, we construct the zkTLS protocol. The zkTLS can prove the connection process of a TLS connection. This proof enables trustless access for Web3 to any endpoint that supports TLS.

Dependencies

Usage

  1. Clone the repo
git clone https://github.com/the3cloud/zktls.git
  1. Compile the project
cargo b --release --no-default-features -F sp1-backend,r0-backend
  1. Run zktls in command listens
RUST_LOG=info ./target/release/zktls prove -i ./testdata/input.json --mock -t evm -p r0
RUST_LOG=info ./target/release/zktls prove -i ./testdata/input.json --mock -t evm -p sp1
  1. Export verifier contract
cargo run --bin zktls -- export-verifier --target-chain <target-chain>
  • target-chain: evm, solana, sui, aptos, ton

Future Work

  • Use mbedtls instead of rustls.
  • Support batch proof submitted.

Benchmark

see benchmark.md

For development

This is a monorepo. It means all code are in a single repo. We don't use any other build system, just cargo. You can use cargo build and cargo test for all codebase, include contract code.

Project Structure

  • contracts: solidity contract. other chain contract in future.
  • crates
    • recordable-tls: simulate TLS record, and record all messages.
    • contracts: contracts warp crate.
    • kms: store encrypted key.
    • listens: pull TLS request event.

About

zkTLS demo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%