The Key-Sharing Problem
AES is fast and strong, but it uses the same key to lock and unlock. So before two people can exchange AES-encrypted messages, they must somehow agree on that shared key — and if they're communicating over the open internet, an eavesdropper could grab the key in transit. Public-key cryptography was invented precisely to break this deadlock.
Two Keys, One Pair
Instead of one shared secret, each person generates a pair of keys that are mathematically bound together:
The magic is a one-way relationship: it's easy to compute the public key from the private key, but practically impossible to go backwards. So you can publish your public key on a billboard, and anyone can use it to encrypt a message that only your private key can open. The secret never travels.
Encrypting and Signing
Public-key cryptography supports two complementary tasks, using algorithms and keys appropriate to each:
- Encryption — anyone can encrypt to your public key, but only your private key decrypts. This is how a sender locks a message for you without prearranging a secret.
- Digital signatures — you sign with a private key, and others verify with the corresponding public key. Verification proves control of that key and detects message changes. Identifying a person also requires a trusted association between the public key and that person; signing is not simply encryption run backwards.
Hybrid encryption: the best of both
Public-key math is slow, so it's rarely used to encrypt whole files. Instead, systems encrypt the file with a fast AES key, then use public-key crypto to encrypt just that small AES key for the recipient. This combination — public-key to share the key, symmetric to encrypt the data — is called hybrid encryption, and it's exactly what OWL does.
Why Elliptic Curves
An early and widely deployed public-key system, RSA, gets its strength from the difficulty of factoring huge numbers — and to stay secure it needs very large keys (2048 bits or more). Elliptic-curve cryptography (ECC) achieves the same security with dramatically smaller keys, because it rests on a different hard problem: the “elliptic-curve discrete logarithm.”
A 256-bit elliptic-curve key offers roughly the same security as a 3072-bit RSA key. Smaller keys reduce storage and transmission costs. Performance depends on the operation and implementation, but compact keys make ECC useful on mobile devices and in network protocols.
NDEVR's P-256 Keys
When you create an OWL account, your device generates an account key pair on the NIST P-256 curve, also called prime256v1 or secp256r1. The public key lets others seal file keys to you with ECIES. The private key is stored in an encrypted envelope and opened on your device. In OWL’s OWPK v2 format, OPAQUE produces a client-only export key; HKDF derives the key that opens that envelope. Optional user-held recovery protects another copy under a recovery key you save.
The P-256 account key is separate from the Ristretto255 keys used inside OWL’s OPAQUE authentication suite. OPAQUE authenticates sign-in and helps unlock the account key; ECIES uses the account key for recipient-specific file-key sharing.
References & Further Reading
- NIST, FIPS 186-5: Digital Signature Standard — digital-signature algorithms; SP 800-186 specifies elliptic-curve parameters, including P-256.
- Certicom/SECG, SEC 1: Elliptic Curve Cryptography — the elliptic-curve standard NDEVR follows.
- Diffie & Hellman, New Directions in Cryptography (1976) — the paper that introduced public-key cryptography.
- Wikipedia, Public-key cryptography and Elliptic-curve cryptography — accessible overviews.