← Glossary

What Is Client-Side Encryption?

Client-side encryption encrypts data on the user's device before it is sent to a service, so the provider stores and transmits only ciphertext. Whether the provider can ever read the data depends on who holds the keys, not on where the encryption ran.

Updated:

Client-side encryption is the practice of encrypting data on a client device, before that data leaves for a server, a storage bucket or another party. The receiving service handles only ciphertext: it can store it, replicate it and return it, but it cannot interpret it unless it also holds the key. Amazon's documentation for its S3 encryption client describes the arrangement directly: objects arrive already encrypted, the storage service plays no role in encrypting or decrypting them, and it does not even recognise them as encrypted. The phrase sounds like a guarantee of secrecy, but it is really a statement about location. What it guarantees depends entirely on a second question, which is who generates, stores and can recover the keys.

Where the Encryption Step Happens

Most online services encrypt data in two places already. Transport encryption, such as TLS, protects bytes while they travel between the client and the server. Server-side encryption at rest protects bytes once they are written to disk in the provider's data centre. Without a separate layer of application encryption, these arrangements normally let the service process plaintext. TLS ends at the receiving service, while storage keys are available to its authorised systems. Access to encrypted disks alone does not necessarily expose the data: an attacker would also need relevant keys, permissions or access to a process handling plaintext.

Client-side cryptography moves the encryption step earlier in the chain. A library inside the application, a browser script or an operating system component takes the plaintext, encrypts it with a key available to the client, and hands the result to the usual upload path. Transport and at-rest encryption still apply on top, which is why the approaches are complementary rather than alternatives. These protections cover different stages: TLS protects the connection, while client-encrypted content remains encrypted after upload. The application layer is outside the storage provider's control only when the provider cannot obtain its decryption keys. Google Workspace describes its client-side encryption option in exactly these terms: an additional layer on top of its default encryption, producing content that Google's servers and third parties cannot decrypt.

Key Generation, Storage and Recovery

Encryption key ownership is the property that gives client-side encryption its meaning. Several arrangements exist, and they offer very different protections.

  • User-held keys. The key is derived from a passphrase or stored only on the user's devices. The provider never sees it. Losing the last usable key means losing access permanently if no recovery secret, backup or authorised recovery route exists.
  • Customer-managed key service. An organisation runs or rents a key management service separate from the data provider. Clients request authorised key operations from it, often after authenticating through an identity provider. Wrapping keys may remain within that service rather than being downloaded. Separating stored ciphertext from key administration reduces dependence on one provider, but key administrators, recovery arrangements and access policies remain within the trust boundary. Google Workspace offers customer-controlled key arrangements of this kind.
  • Provider-managed keys used on the client. The encryption runs on the device, but the key comes from the provider's own key management system. This still protects against some storage-layer threats, but the provider can decrypt whenever it chooses. Encrypting on the client with a key the server hands out does not remove the server from the trust boundary.

Many implementations use envelope encryption: each object gets its own random data key, that data key is encrypted with a longer-lived wrapping key, and the wrapped data key travels alongside the ciphertext. Some designs support re-wrapping data keys without re-encrypting every object. Rotation and recovery behaviour depend on the implementation; re-wrapping does not erase keys or plaintext someone has already copied. Recovery design follows from ownership. Systems with user-held keys often offer printed recovery codes or trusted-contact schemes, and each changes the recovery process and which secrets or trusted parties can restore access.

Client-Side, Server-Side and End-to-End Encryption

These three labels are often used loosely, and they answer different questions.

ModelWhere plaintext is encryptedWho can decryptTypical protection
Server-side encryptionAt the provider, after receiptThe provider and anyone it authorisesStolen disks, some insider access
Client-side encryptionOn the user's device before uploadWhoever holds the key, which may or may not include the providerProvider storage and transport layers
End-to-end encryptionOn the sender's deviceOnly the intended recipients' devicesEvery intermediary, including the service operator

End to end encryption is a stronger claim than client-side encryption. It requires that only the authorised communicating endpoints can decrypt the protected content. A service that retains decryption capability does not meet that promise merely because encryption ran on the client. Provider infrastructure can relay a key exchange, but the design must authenticate keys and prevent an intermediary substituting its own. External key management alone does not establish these properties. The marketing phrase zero knowledge sometimes describes a provider that cannot read stored content; it should not be confused with a formal zero-knowledge proof.

Where It Is Used

Many password managers encrypt vaults on the device and sync only ciphertext. Backup and file-sync tools offer client-side encryption so that cloud storage can be used for sensitive documents. Messaging applications apply it per message to achieve end-to-end encryption. Enterprises use customer-managed keys with productivity suites and object storage to limit provider access to sensitive records. Encryption alone does not determine where data is stored or establish regulatory compliance. Developers building on cloud storage reach for encryption client libraries when the threat model includes the storage provider itself.

Limitations and Trust Boundaries

Moving encryption to the client moves trust to the client, and the client is often the weakest part of the system. If the device is compromised, malware reads the plaintext before encryption or captures the key. If the encryption code is delivered by the same provider that stores the data, as with a web application, the provider could serve a modified script that leaks keys; browser-delivered encryption therefore depends on trusting the code delivery path, or on verifying the code independently. Some metadata may remain visible. File names and other fields can be encrypted in some designs, while object sizes, request timing or access patterns may still reveal information. Check the actual format rather than assuming that encrypted content means invisible activity.

Functionality is also constrained. Ordinary server-side search, scanning and preview generation require plaintext. Products may restrict those features, perform them on the client, or use specialised encrypted indexes; the available features depend on the design. Finally, losing every usable key and recovery route makes the ciphertext unreadable. Organisations adopting client-side encryption should treat key custody as an operational discipline with backups, access controls and tested recovery, because the same property that keeps the provider out keeps everyone out.

Frequently asked questions

Does client-side encryption always mean end-to-end encryption?

No. It specifies where encryption happens, not everyone who can decrypt. End-to-end encryption additionally excludes intermediaries from reading the protected content. A client-side system that gives the service usable decryption keys does not provide that exclusion.

Who can recover lost keys?

Recovery requires a usable key, backup, recovery secret or authorised recovery mechanism. If all of these are lost, the provider cannot reconstruct a missing secret merely by resetting an account password. Customer-managed systems need tested backup and recovery procedures too.

Can malicious client code expose plaintext?

Yes. Encryption happens on the client, so anything that runs there with sufficient access, including malware or a tampered script delivered by the service, can read data before it is encrypted or capture the key. The device and the code delivery path are part of the trust boundary.

What is envelope encryption and why is it common?

A data key encrypts the object, and a separate wrapping key encrypts that data key. The encrypted data key can travel with the ciphertext; the usable wrapping key must remain protected elsewhere. Some designs allow key re-wrapping without encrypting the object again.

What features stop working when a provider cannot read the data?

Conventional server-side full-text search, scanning and previews need readable content. A product may disable these features or implement client-side processing or specialised encrypted indexes instead. Check its actual encrypted-content feature list rather than assuming every feature disappears.