Skip to content
Secure Legion

Secure Legion

Secure Ping Pong Protocol Pure Privacy

Created on 4th December 2025

Secure Legion

Secure Legion

Secure Ping Pong Protocol Pure Privacy

The problem Secure Legion solves

SecurePay Overview
SecurePay is a feature within the Secure Legion ecosystem designed for private, cross-chain cryptocurrency payments. It allows users to request and send funds (specifically Solana and Zcash) directly through encrypted chat messages. The system is built on the NLx402 protocol and prioritizes privacy by routing all traffic through Tor and using end-to-end encryption.

Core Features

  • Cross-Chain Support: Users can send and receive both Solana (SOL) for speed and Zcash (ZEC) for maximum privacy.
  • Zero Metadata: Payments travel through Tor hidden services, ensuring no metadata about who is paying whom is exposed.
  • Serverless Architecture: The system is peer-to-peer with no central server to log transactions or store data.
  • End-to-End Encryption: All payment messages are encrypted using XChaCha20-Poly1305.
  • Verifiable Requests: Uses the NLx402 protocol to generate cryptographic payment quotes, ensuring payments are linked to specific requests.

How It Works (5-Step Process)

  1. Create Request: A user (Alice) creates a request for funds (e.g., 0.5 ZEC). The system generates an "NLx402 quote" with a unique hash.
  2. Encrypted Transmission: This request is encrypted and sent to the recipient (Bob) via Tor using the "Ping-Pong Wake Protocol."
  3. Review: Bob receives the request in the chat interface, reviews the amount, and decides whether to approve it.
  4. Send Payment: If Bob approves, he signs the transaction on the blockchain. The transaction includes a memo (NLx402:<quote_hash>) linking it to Alice's original request.
  5. Verification: Bob sends a confirmation message with the signature. Alice's device verifies the transaction on the blockchain and confirms the memo matches her quote.

Technical Protocols & Security

Ping-Pong Wake Protocol: This ensures messages are delivered peer-to-peer without servers.

  • Ping: Sender transmits an encrypted "wake" signal to the recipient's Tor address (.onion:8080).
  • Pong: Recipient acknowledges availability.
  • Message: The full encrypted payment payload is delivered only after this handshake.
  • Benefits: Instant delivery when online, automatic retries when offline, and no metadata leaks.

Unified Cryptography (Solana-Based Keys):

  • The system uses Ed25519 keypairs (standard for Solana) for everything: identity, encryption, and routing.
  • One Seed Phrase: A single backup phrase restores your messaging history, wallet funds, and Tor identity.
  • Key Derivation: The master Ed25519 key signs transactions; an X25519 key is derived for message encryption; and the Tor .onion address is generated from the public key.

NLx402 Payment Protocol:

  • Inspired by the HTTP 402 code ("Payment Required").
  • Creates a quote_id and hash for every transaction.
  • Prevents "replay attacks" (claiming the same payment twice) by tracking these hashes in a local SQLCipher database.

Supported Currencies

  • Solana (SOL): Optimized for speed (~400ms finality) and low fees.
  • Zcash (ZEC): Optimized for maximum privacy with shielded transactions (~75s speed).

Security Considerations

  • Device Security: Private keys are stored in the Android Keystore or an encrypted database. If the device is compromised, funds are at risk.
  • Tor Requirement: An active Tor connection is required to send or receive payment requests.
  • Seed Phrase: Users are responsible for their BIP39 mnemonic phrase; losing it means losing access to both funds and identity.

Challenges I ran into

It was a challenge getting two devices to communicate over Tor without any notification relay or servers. Our ping-pong wake protocol was paramount to this success, but it wasn’t easy — we had to develop a solid ACK system with TAP and retry workers. Our goal was to create a truly private messaging and payment app, and we truly believe we have accomplished this.

Tracks Applied (13)

Cross-Chain Privacy Solutions

SecurePay fits this description because it already connects multiple blockchain ecosystems (Solana + Zcash) and lets use...Read More
Axelar Network

Axelar Network

Cross-Chain Privacy Solutions

SecurePay fits this description because it already connects multiple blockchain ecosystems (Solana + Zcash) and lets use...Read More
Osmosis

Osmosis

Self-Custody & Wallet Innovation

SecurePay fits this description because it already connects multiple blockchain ecosystems (Solana + Zcash) and lets use...Read More
Osmosis

Osmosis

Private Payments & Transactions

SecurePay fits this description because it already connects multiple blockchain ecosystems (Solana + Zcash) and lets use...Read More
Osmosis

Osmosis

Creative Privacy Applications

SecurePay fits this because it combines multiple technologies in a single privacy-preserving system, making it a perfect...Read More

Fhenix

Cross-Chain Privacy Solutions

SecurePay fits this description because it already connects multiple blockchain ecosystems (Solana + Zcash) and lets use...Read More

Pump Fun

Cross-Chain Privacy Solutions

SecurePay fits this description because it already connects multiple blockchain ecosystems (Solana + Zcash) and lets use...Read More

Helius

Privacy Infrastructure & Developer Tools

SecurePay is built on top of the Ping-Pong Wake Protocol, a serverless, encrypted communication framework designed for p...Read More

Zcash Community Grants

Self-Custody & Wallet Innovation

SecurePay delivers a next-generation wallet experience by building an Apple-Pay–style payment flow directly inside encry...Read More

Unstoppable Wallet

Cross-Chain Privacy Solution

SecurePay fits this description by turning payments into an organized, message-driven workflow that issues and receives ...Read More

Bitlux

Privacy Infrastructure & Developer Tools

SecurePay is built on top of the Ping-Pong Wake Protocol, a serverless, encrypted communication framework designed for p...Read More

Raybot

Generic Bounty

Mintlify

Private Payments & Transactions

SecurePay is uniquely different because it delivers Zcash payments through an Apple-Pay–style flow inside encrypted, ser...Read More

Star Fun

Technologies used

Discussion

Builders also viewed

See more projects on Devfolio