SeedPay
Implementation

Implementation Overview

Practical guidance for implementing SeedPay clients and infrastructure.

SeedPay V0.3 requires MSE (Message Stream Encryption / BEP 52) for ECDH key exchange. Fallback to unencrypted mode is NOT supported for payment sessions.

This section covers the practical requirements for implementing a SeedPay-compatible client, including cryptographic primitives, blockchain integration, and error handling.

Key Requirements

AreaRequirement
EncryptionMSE (BEP 52) required for all payment sessions
Elliptic CurveCurve25519 (x25519) for ECDH key exchange
Key DerivationHKDF-SHA256 with context "seedpay-v1-session"
HashingSHA-256 for session_hash and payment check signatures
BlockchainSmart contract with open/close/timeout_close functions
TokenSPL Token (Solana), ERC-20 (Ethereum/EVM)

Performance Overhead

SeedPay adds minimal overhead to the BitTorrent protocol:

OperationCost
ECDH key generation~0.1ms
Key exchange2 round-trips (within handshake)
HKDF derivation<0.01ms
Payment check validationOff-chain (no RPC calls)
Channel open/close1 RPC call each

Deep Dive

On this page