Security & Cryptography Policy
- Beside enforces Mutual TLS 1.3 exclusively via the memory-safe Rust library
rustlswith the auditedringcryptographic provider. - Insecure legacy ciphers, SSL 3.0, and TLS 1.0, 1.1, and 1.2 handshakes are explicitly rejected.
- Pairing generates an 8-digit Short Authentication String (SAS) using the RFC 8446 / RFC 5705 TLS Keying Material Exporter (
EXPORTER-beside-pairing-v1) to eliminate modulo bias and defend against Wi-Fi MITM. - Device keys are protected at rest via Windows Data Protection API (DPAPI) and Android Keystore AES-256-GCM.
- Pro license verification uses offline 32-byte Ed25519 digital signatures. The private signing seed is kept strictly in Cloudflare Worker secret storage.
1. Transport Layer Security (Mutual TLS 1.3 Only)
Every data transmission in Beside—whether a text snippet or a multi-gigabyte file batch—is encapsulated inside an encrypted TLS 1.3 tunnel. Unlike common LAN sharing utilities that transmit metadata in plaintext, Beside establishes Mutual TLS (mTLS) before any application data or file names are exchanged.
- Dual-Certificate Validation: Both sending and receiving devices generate self-signed X.509 device certificates bound to hardware-protected keypairs.
- SPKI Pinning: Each peer validates the certificate against the pinned SHA-256 Subject Public Key Info (SPKI) fingerprint stored in the local
TrustStore. - Handshake Rejection: Unpaired or unrecognized devices are rejected during the TLS handshake, before any file headers can be read.
2. 8-Digit SAS Pairing & MITM Defense
To pair two devices securely on an untrusted public or shared Wi-Fi network:
- Beside derives an 8-digit visual code using the RFC 8446 TLS Keying Material Exporter with context label
EXPORTER-beside-pairing-v1. - The SAS code is derived from a 64-bit integer sampled directly from the TLS master secret, mathematically eliminating modulo bias.
- Both users visually confirm the 8-digit number on their screens within a strict 60-second window. A network attacker attempting to intercept the connection will produce mismatched codes and be immediately flagged.
3. Bounded Memory Streaming & Integrity Verification
Beside enforces strict bounded memory consumption:
- 64 KB Chunk Streaming: Files are read, encrypted, transmitted, and decrypted in bounded 64 KB buffers. Entire files are never loaded into RAM.
- Streamed SHA-256: The receiving peer computes a streaming SHA-256 hash while writing data to a temporary
.partfile. - Atomic Promotion: Only after the entire stream matches the sender's cryptographic hash is the file atomically promoted to its final destination name. Corrupted or interrupted transfers are never executed.
- Collision Auto-Rename: Existing local files are never overwritten; Beside automatically appends a collision counter (e.g.,
filename (1).ext).
4. Pro License Anti-Copy Architecture
Beside Pro license enforcement is engineered for privacy and offline reliability:
- Zero Private Keys in Binaries: The client app embeds only the vendor's 32-byte Ed25519 public key. The private signing seed is stored strictly in Cloudflare Worker Secrets (
VENDOR_PRIVATE_KEY_SEED_HEX). - Hardware-Bound Licenses: When a license is activated, the worker signs a
ProLicenseCertcontaining the requesting device's hardware SPKI fingerprint. A copied certificate will fail verification on any other computer or phone. - Offline Verification: Once activated, Beside validates the Ed25519 signature locally in Rust without requiring constant internet access.
5. Vulnerability Disclosure Policy
We welcome security audits and responsible vulnerability disclosures from the community. If you discover a security issue or cryptographic flaw in Beside, please report it via GitHub Security Advisories or open an issue on our tracker: