Secure Transport
End-to-end encrypted communication using elliptic curve Diffie-Hellman key exchange, symmetric encryption, and digital signatures — all via CryptoKit.
Key Agreement
P256 ECDH key exchange with HKDF-SHA256 key derivation.
Custom Salt
Different salts produce different derived keys from the same shared secret. Use unique salts for different purposes (encryption key, MAC key, etc.).
Secure Envelope
Encrypt-then-sign format with ephemeral keys for forward secrecy. Each message uses a fresh ECDH key pair — compromising the sender’s long-term key doesn’t decrypt past messages.
Seal and Open
Codable Values
Envelope Structure
Wrong Sender Key Detection
Secure Channel
Bidirectional encrypted pipe between two parties. Establish once, encrypt/decrypt many times.
Basic Usage
Codable Through Channel
Algorithm Selection
Lifecycle
PrismSecureChannel uses NSLock for thread safety — safe to call from multiple threads. It’s Sendable and works across actor boundaries.