Skiff Security Model
Skiff’s security architecture is built on the principle of zero-knowledge encryption, where your data is encrypted on your device before it ever reaches Skiff servers. This ensures that even Skiff cannot access your private information.For a comprehensive technical analysis, read the full Skiff whitepaper which documents the complete cryptographic protocol.
End-to-End Encryption Architecture
Skiff uses a hybrid encryption approach combining both symmetric and asymmetric cryptography to provide security, performance, and key sharing capabilities.Encryption Flow
Key Generation
When you create a Skiff account, your device generates a public/private key pair that never leaves your device unencrypted
Content Encryption
All content (emails, documents, files) is encrypted with randomly generated symmetric keys using ChaCha20Poly1305
Key Wrapping
Symmetric keys are encrypted with your public key (and recipients’ public keys for sharing) using TweetNaCl asymmetric encryption
Cryptographic Primitives
Skiff’s encryption is built on theskiff-crypto library, which provides audited cryptographic functions.
Symmetric Encryption
Skiff uses ChaCha20Poly1305 for symmetric encryption of content:ChaCha20Poly1305 Details
ChaCha20Poly1305 Details
ChaCha20Poly1305 is an authenticated encryption algorithm that provides:
- Confidentiality: 256-bit ChaCha20 stream cipher
- Integrity: Poly1305 MAC for authentication
- Performance: Optimized for both hardware and software implementations
- Security: Resistant to timing attacks
Asymmetric Encryption
Skiff uses TweetNaCl (based on Curve25519) for asymmetric encryption:TweetNaCl Implementation
TweetNaCl Implementation
TweetNaCl provides high-security public-key cryptography:
- Key Exchange: X25519 Elliptic Curve Diffie-Hellman
- Encryption: XSalsa20 stream cipher with Poly1305 MAC
- Signatures: Ed25519 for digital signatures
- Security: 128-bit security level
Hash Functions
For integrity verification and key derivation:- Content integrity verification
- Deterministic key derivation
- Message authentication
Key Management
Skiff’s key management system is designed to be secure, recoverable, and user-friendly.Key Types
User Key Pair
Long-term Ed25519/X25519 key pair for identity and asymmetric encryption
Symmetric Content Keys
Per-object random symmetric keys for encrypting actual content
Session Keys
Temporary keys for encrypted communication sessions
Recovery Keys
Backup keys for account recovery stored securely offline
Key Derivation
User passwords are processed through Argon2 for key derivation:Key Storage
Keys are stored securely using multiple layers:- Browser Storage: IndexedDB via
idb-keyvalfor encrypted local storage - Encryption at Rest: Keys are encrypted with password-derived keys before storage
- Server Backup: Encrypted key backups (encrypted with recovery key) stored server-side
- Hardware Security: Support for WebAuthn for hardware-backed key storage
Datagram System
Skiff uses a custom datagram system for versioned, authenticated encrypted data structures:Datagram Architecture
Datagram Architecture
Datagrams wrap encrypted data with metadata for versioning and integrity:Benefits:
- Version Migration: Automatic handling of old encryption formats
- Integrity: Built-in checksums prevent tampering
- Type Safety: Header identifies data type and schema
- Compression: Automatic compression with
fflate
Sharing and Collaboration
When sharing encrypted content with other users, Skiff implements secure key sharing:Sharing Flow
Signature and Authentication
Skiff uses Ed25519 digital signatures for authentication:- Message Authentication: Verify email sender identity
- Document Integrity: Ensure documents haven’t been tampered with
- Key Verification: Validate public key ownership
Security Best Practices
Zero-Knowledge Architecture
Skiff servers never have access to unencrypted content or encryption keys
Open Source
All cryptographic code is open source and available for audit on GitHub
Audited Libraries
Uses well-audited libraries like TweetNaCl and StableLib for core cryptography
Forward Secrecy
Session keys are ephemeral and rotated regularly
Threat Model
Skiff’s encryption protects against several threat scenarios:What Skiff Protects Against
Server Compromise
Server Compromise
Even if Skiff servers are compromised, attackers cannot decrypt user data because encryption keys are never stored unencrypted on servers.
Network Eavesdropping
Network Eavesdropping
All communication uses TLS, and content is encrypted end-to-end, so network-level attackers only see encrypted data.
Malicious Insiders
Malicious Insiders
Skiff employees cannot access user data because it’s encrypted with keys only users possess.
Legal Requests
Legal Requests
Skiff can only provide encrypted data to legal authorities - plaintext data is mathematically inaccessible.
What Skiff Cannot Protect Against
Security Audits
Skiff’s cryptographic implementation has been:- Built on audited libraries (TweetNaCl, StableLib)
- Designed following NIST cryptographic standards
- Open sourced for community review
- Implemented with defense in depth principles
Technical References
For developers implementing Skiff-compatible applications or auditing security:- Source Code: github.com/skiff-org/skiff-apps
- Crypto Library: libs/skiff-crypto directory contains all cryptographic primitives
- Whitepaper: skiff.com/whitepaper
- Blog: skiff.com/blog/private-search for search implementation
Key Files to Review
| File | Purpose |
|---|---|
libs/skiff-crypto/src/asymmetricEncryption.ts | TweetNaCl asymmetric encryption wrapper |
libs/skiff-crypto/src/aead/ | ChaCha20Poly1305 symmetric encryption |
libs/skiff-crypto/src/keys.ts | Key generation and management |
libs/skiff-crypto/src/signature.ts | Ed25519 digital signatures |
libs/skiff-crypto/src/datagramBuilders.ts | Versioned encrypted data structures |
All cryptographic operations are performed client-side using WebCrypto API and WebAssembly where available for performance and security.