Hybrid Cryptographic Framework
Secure cloud storage and sharing built on layered symmetric and asymmetric cryptography.

Overview
A final-year research build that treats cloud storage as hostile territory: files are encrypted before they ever leave the client, and the storage provider never holds a usable key.
The framework combines fast symmetric encryption for file payloads with asymmetric key wrapping for sharing, so a document can be handed to another user without ever re-encrypting the payload.
The problem
Most "secure" cloud workflows are secure only in transit. Once a file lands at rest, the provider holds both the ciphertext and the key material needed to read it.
Sharing makes it worse: the usual fix is to decrypt, re-encrypt per recipient, and re-upload — expensive, slow, and it multiplies the number of plaintext moments.
System architecture & technical approach
Every file gets a one-time data encryption key (DEK). The DEK encrypts the payload with AES-256-GCM, giving confidentiality and integrity in a single pass. The DEK itself is then wrapped with the recipient's RSA-OAEP public key and stored beside the ciphertext as a small envelope.
Sharing a file therefore means wrapping one 32-byte key for a new recipient — not touching the payload at all. Revocation is a matter of deleting an envelope.
- 01
Client selects file
- 02
Generate random DEK + nonce
- 03
AES-256-GCM encrypt payload
- 04
Wrap DEK per recipient (RSA-OAEP)
- 05
Upload ciphertext + envelopes
- 06
Recipient unwraps DEK, verifies tag, decrypts
Technical hurdles & breakthroughs
Nonce reuse under concurrent uploads
Parallel chunk uploads initially shared a counter-derived nonce, which is catastrophic for GCM. Fixed by deriving each chunk's nonce from a random per-file salt plus the chunk index, and asserting uniqueness before any ciphertext is written.
Streaming large files without buffering
Encrypting multi-hundred-megabyte files in memory was not viable. Rewrote the pipeline around chunked streaming with per-chunk authentication tags and a manifest that binds the chunk order, so truncation and reordering attacks both fail verification.
Key rotation without re-uploading
Rotating a user key originally implied re-encrypting everything they could read. Separating the DEK from the identity key meant rotation only rewraps envelopes — seconds instead of hours.
Outcomes & key results
AES-256-GCM
Authenticated encryption end to end
O(1)
Cost of sharing a file with a new recipient
~180 MB/s
Streaming throughput on commodity hardware
0
Plaintext bytes at rest on the provider
- Envelope encryption is the single highest-leverage idea in applied cryptography — separating what encrypts data from who can read it makes sharing, rotation and revocation all cheap.
- Integrity is not optional. Choosing an AEAD mode from the start removed an entire class of bugs I would otherwise have had to defend against manually.