Skip to content

AgorismLabs/pg-13

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PG-13 Lite Privacy Gadget

The following is the finalized Research Report and Implementation Plan.

It's mostly AI slop to just show the shape of this idea.

I have updated the Future Roadmap to include Phase 4, which specifically details the integration with Privacy Pools and Railgun to build the "Complete Privacy Stack." This closes the loop between hiding the sender (Stealth) and hiding the fund history (Mixing).

The Python PoC remains minimal and functional—a strictly "2-hour build" design using standard modern libraries to demonstrate the core ratchet mechanics.


Research Report: The Silent Channel Protocol

Off-Chain Cryptographic Ratchets for Steganographic Ethereum Privacy

Date: February 8, 2026 Target Ecosystem: Kohaku (@kohaku-eth) Keywords: Steganography, Hybrid Post-Quantum, Cryptographic Ratchet, Privacy Pools, Railgun

1. Abstract

Current Ethereum privacy standards (e.g., ERC-5564) suffer from a "Privacy Trilemma": trading off gas costs, metadata leakage, and scanning latency. This report introduces the Silent Channel, a wallet-side gadget that shifts discovery off-chain using cryptographic ratchets. We propose a four-phase roadmap to evolve this gadget from a simple stealth derivation tool into a Complete Privacy Stack, integrating Post-Quantum security, Compact Key Storage, and automated shielding via Railgun/Privacy Pools to prevent heuristic clustering.

2. Core Mechanics: The "No-Scan" Paradigm

Unlike "Silent Payments" (which require scanning every transaction) or standard Stealth Addresses (which require scanning a registry), the Silent Channel utilizes Deterministic Look-Ahead.

  1. Off-Chain Sync: Sender and Receiver exchange a Root Secret once via a side channel (e.g., Signal, Waku).
  2. Local Derivation: The Sender calculates the stealth address for Transaction locally.
  3. Targeted Watching: The Receiver, sharing the same ratchet state, pre-calculates the address for Transaction . They only need to watch this specific address.

3. Future Roadmap: The "Kohaku" Integration

The production gadget (@kohaku-eth/silent-channel) will implement four critical upgrades to ensure long-term resilience and usability.

Phase 1: Hybrid Post-Quantum Security

Status: Architecture Defined (Mikic et al., 2025) To prevent "Harvest Now, Decrypt Later" attacks, the system will utilize a Hybrid Architecture:

  • Handshake (Kyber-768): Secures the initial relationship establishment.
  • Ratchet (HKDF-SHA256): Provides quantum-resistant state advancement.
  • Address (secp256k1): Maintains steganographic indistinguishability from standard EOAs.

Phase 2: Compact Key Storage (CKS)

Status: Theoretical (Dodis et al., 2024) To resolve the "Recovery Paradox" (Forward Secrecy vs. Data Loss), we will implement CKS. The wallet encrypts the current ratchet state with a high-entropy Backup Key and pins it to IPFS. This allows device recovery without exposing the history of past transactions.

Phase 3: Gasless Exits (ERC-4337)

Status: Engineering Stealth addresses hold tokens but no ETH. The gadget will treat these addresses as counterfactual Smart Accounts, utilizing Privacy-Preserving Paymasters to sponsor gas fees in exchange for the shielded token, eliminating the need to fund the address from a public source.

Phase 4: The Complete Privacy Stack (Auto-Shielding)

Status: Integration Design While stealth addresses break the link between Sender and Receiver, the funds remain in a transparent EOA. If a user merges funds from ten different stealth addresses into one output, they risk heuristic clustering (linking their identity via common ownership).

  • Solution: We will build a bridge package, @kohaku-eth/auto-shield, integrating with Railgun or Privacy Pools.
  • Workflow:
  1. Ingress (Stealth): Funds arrive at the Silent Channel address. The public sees a transfer from 0xAlice to 0xRandom.
  2. Auto-Shield (Mixing): The wallet gadget detects the deposit and automatically generates a ZK-proof to deposit the funds into a Privacy Pool.
  3. Egress (Private Balance): The user now holds a private UTXO (Unspent Transaction Output) within the shielded pool.
  • Result: A "Source-to-Sink" pipeline. Even if the Silent Channel is compromised, the graph analysis is severed at the pool level, ensuring compliance-compatible anonymity (via Proof of Innocence) or maximal privacy (via Railgun).

Implementation Plan: silent-channel-poc

Objective: A minimal, functional Python CLI to demonstrate the Ratchet and Stealth Derivation logic in under 2 hours.

1. The Stack

  • uv: Dependency management.
  • typer: CLI interface.
  • coincurve: Fast libsecp256k1 (Ethereum standard).
  • cryptography: Standard library for HKDF.
  • pydantic: JSON State management.

2. The Code

Again, barely a PoC. This is really hard to demo without a full wallet which I didn't want this time.

Step 1: Initialization

uv init silent-channel
cd silent-channel
uv add typer coincurve cryptography eth-utils rich pydantic

3. Status

This is a small experimental PoC. We'll see if there's non-zero interest.

4. Usage Walkthrough

To demo two users on one machine, you can rename the database file.

  1. Bob (Receiver) Setup:
uv run src/cli.py init Bob
uv run src/cli.py invite Alice
# Copy the YELLOW code string...
  1. Alice (Sender) Setup: (Rename wallet_db.json to bob.json first!)
uv run src/cli.py init Alice
uv run src/cli.py connect Bob <PASTE_CODE>
  1. Transact:
uv run src/cli.py pay Bob
# Output: Pay Bob at: 0xAb5... (Index 1)
uv run src/cli.py pay Bob
# Output: Pay Bob at: 0x12c... (Index 2)
  1. Bob Verifies: (Switch DB files back)
uv run src/cli.py scan Alice
# Output: Table listing 0xAb5... and 0x12c... with their derived Private Keys.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages