zks_proto

Crates.iozks_proto
lib.rszks_proto
version0.1.0
created_at2026-01-06 19:05:03.003058+00
updated_at2026-01-06 19:05:03.003058+00
descriptionProtocol layer for ZK Protocol - handshake and URL parsing
homepagehttps://zks-protocol.org
repositoryhttps://github.com/zks-protocol/zks
max_upload_size
id2026545
size123,629
Wasif Faisal (cswasif)

documentation

https://docs.rs/zks_proto

README

zks_proto

Protocol layer for the ZKS Protocol - handshake and URL parsing.

Overview

This crate implements the ZKS Protocol message layer:

  • 3-Message Handshake - Post-quantum secure key exchange
  • URL Parsing - zk:// and zks:// protocol handlers
  • Message Types - Structured protocol messages
  • Error Handling - Protocol-specific errors

Handshake Flow

Initiator                              Responder
    │                                       │
    │  1. HandshakeInit                     │
    │  ────────────────────────────────►    │
    │  [ephemeral_pk, nonce]                │
    │                                       │
    │  2. HandshakeResponse                 │
    │  ◄────────────────────────────────    │
    │  [ephemeral_pk, ciphertext, sig]      │
    │                                       │
    │  3. HandshakeFinish                   │
    │  ────────────────────────────────►    │
    │  [confirmation_hash]                  │
    │                                       │

Usage

use zks_proto::url::ZksUrl;

let url = ZksUrl::parse("zks://example.com:8443/room123")?;
println!("Protocol: {}", url.protocol());
println!("Host: {}", url.host());

License

AGPL-3.0-only

Commit count: 31

cargo fmt