Nyskra Knowledge / Encryption

Client-Side Encryption

Client-side encryption protects information before it leaves your device. Discover how it works, how it differs from server-side encryption, and why key control matters.

Definition

Client-side encryption encrypts data within a user's device or client application before the data is sent to a remote service. The service receives encrypted content rather than the original plaintext; whether it can later decrypt that content depends on who controls the keys.

Also known as: Client-side data encryption, CSE

On this page

When you save something personal to an online service, where does it become encrypted? The answer changes how much trust you need to place in the company operating that service.

With client-side encryption, your device encrypts the protected information before it reaches the provider’s servers. The server can store and transfer the ciphertext without first receiving the original content. This can make cloud storage and synchronization useful without requiring the provider to see your private information.

The crucial next question is who controls the keys. Encryption taking place on your device is an important architectural choice, but it does not, by itself, establish that the service can never decrypt the data.

How does client-side encryption work?

Consider a personal note that you want to keep available on your phone and laptop:

  1. You create or edit the note locally. Your device handles the readable information, known as plaintext.
  2. The client encrypts it. The application uses a cryptographic key to transform the note into ciphertext before sending the protected content to the synchronization service.
  3. The service stores or forwards the ciphertext. It does not need to read the note to hold an encrypted copy or deliver it to another authorized device.
  4. An authorized device decrypts it. Your laptop or phone uses the appropriate key to recover the note locally when you need to read it.

The same principle can apply to files, diaries, health records, and information shared with trusted people. In an offline-capable application, local changes can be prepared while disconnected and synchronized later.

This is an architectural description, not a claim that all client-side encryption systems use the same key-management protocol. Key generation, recovery, device authorization, and sharing differ between implementations.

Why encrypt before uploading?

In a conventional cloud workflow, the provider may receive readable information and then apply its own encryption. With client-side encryption, the content can already be unreadable to the storage service at the moment it is uploaded.

That difference is valuable when the data is personal. If an attacker obtains only a server’s encrypted records, and cannot obtain the keys required to decrypt them, the records do not reveal the protected plaintext in practice. The strength of that protection still depends on using sound cryptography and keeping usable keys outside the attacker’s reach.

Client-side encryption can also reduce the amount of sensitive information a service needs to process. A server may manage accounts, storage, delivery, or synchronization without interpreting the encrypted content itself.

It does not mean every part of a service becomes invisible. Depending on the design, account identifiers, file sizes, update times, recipient relationships, or other metadata may remain observable. The exact exposure depends on the architecture, not simply on the location of encryption.

What is server-side encryption?

Server-Side Encryption

Definition

Server-side encryption encrypts data within a service provider's infrastructure, commonly before storing it. The service generally receives the data in plaintext and may be able to decrypt it again, depending on how its keys and access controls are managed.

Also known as: SSE

Server-side encryption is common in cloud storage and online applications. A service receives information, processes it as needed, and encrypts a stored copy. Database encryption, disk encryption, and encrypted cloud backups are familiar examples.

This is an important security measure. It can protect stored data against certain threats, such as the theft of storage media or access to encrypted backups without the relevant keys.

However, the provider’s running service often has a legitimate way to decrypt the information. That capability may be necessary for features such as server-side search, document processing, or other operations on readable content.

Some services use customer-managed keys or dedicated key-management systems. Those arrangements can improve control, auditing, and separation of duties. They do not automatically mean that the provider’s software cannot access plaintext while processing a request. The actual protection depends on where decryption happens and who can authorize it.

What are user-controlled encryption keys?

User-Controlled Encryption Keys

Definition

User-controlled encryption keys are cryptographic keys whose use and decryption access are controlled by authorized users or their devices rather than independently by the service provider. Encrypted key backups and secure sharing can preserve that control when properly designed.

Also known as: User-controlled keys

Imagine a service that encrypts your files on your device but also uploads an unprotected copy of the decryption key. The upload is client-side encrypted, yet the provider can still decrypt the files. Where encryption happens and who can decrypt are separate questions.

User-controlled keys address that distinction. In a system designed to keep the provider out of the decryption process, the keys needed to read protected content are accessible to authorized users and devices, not independently to the service operator.

This does not require every user to manually handle secret key material. Applications can manage keys on their behalf, provided the security architecture preserves the intended control.

Nor does it mean a server can never store key-related information. It may hold public keys or encrypted copies of private or symmetric keys for synchronization and recovery. What matters is whether the provider can independently unlock those copies or otherwise obtain the keys needed to read protected content.

Passwords and account logins deserve particular attention. Signing in to a service proves something about account access; it does not automatically determine who controls the encryption keys. A well-designed application can separate login authentication from the ability to decrypt private information.

Client-side encryption and end-to-end encryption

The terms are closely related, but they describe different properties:

  • Client-side encryption answers where the encryption happens: inside the user’s client, before protected data is uploaded.
  • End-to-end encryption (E2EE) answers who can decrypt the protected data: only the intended, authorized endpoints, without intermediary services having independent decryption access.

Client-side encryption is a natural building block for E2EE, but it is not sufficient on its own. If the provider also obtains usable decryption keys, the data can be encrypted on the client and still be readable by the provider.

Conversely, E2EE requires more than protecting the upload step. The system must address key recovery, authorized devices and recipients, authentication of their keys, and changes in who is allowed to decrypt shared information.

Our dedicated End-to-End Encryption article explains this trust boundary, including why an encrypted connection to a server is not the same as protecting content from the server itself.

How can client-side encryption work across devices?

Encryption is useful precisely because information can remain protected while it moves between places. But a second device needs a secure way to gain access to the right keys.

For example, you may create an encrypted note on your phone and later open it on your laptop. The synchronization server can deliver the encrypted note and any encrypted key material that the protocol permits, while the laptop decrypts locally after it is authorized.

An important design question is how that authorization happens. A new device should not gain access merely because it asks the server for someone else’s keys. Depending on the system, device enrollment may involve an existing authorized device, a recovery secret, or another authenticated process.

Recovery needs equal care. An encrypted backup of your keys can preserve access after a device is lost without giving the provider the ability to unlock it independently. But a recovery scheme in which the provider can recover the content keys on its own gives the provider a different level of access.

What changes when you share encrypted data?

Sharing expands the set of authorized readers, rather than requiring the provider to become one of them.

An application can arrange for a recipient’s device to obtain the necessary decryption key or an authorized copy of it. In a shared group, multiple members may need access to the same protected information. The keys must be distributed to the correct participants and updated as permissions change.

Two principles remain important:

  • Recipient identity: The application needs a trustworthy way to associate encryption keys with the intended recipients. A malicious substitution of a public key can undermine an otherwise secure exchange.
  • Changing access: Removing someone from a group can restrict their future access when supported by the key-management design. It cannot erase information they have already decrypted or copied.

These challenges are why secure sharing involves more than simply encrypting a file once. The combination of encryption, verified identities, key management, and authorization determines who can read it over time.

What helps client-side encryption deliver its intended protection?

Modern cryptographic algorithms can make correctly encrypted content practically impossible to recover without the appropriate key. The surrounding system should preserve that protection throughout the data’s lifecycle.

When assessing a service, consider these questions:

  1. Does the client encrypt the content before upload? Or does the server first receive and process the plaintext?
  2. Who can obtain decryption keys? Can the provider retrieve them directly, through account recovery, or through its normal server operations?
  3. How are new devices and recipients authorized? Can a malicious or compromised server silently introduce an unauthorized key?
  4. How are local keys protected? What happens when a device is lost, unlocked, infected with malware, or running untrusted software?
  5. Which information remains visible? Are filenames, timestamps, recipient information, or other metadata outside the encrypted content?

These questions do not diminish the strength of encryption itself. They identify what an application must do to preserve its benefits in real-world use.

Transport encryption and device storage encryption remain valuable alongside client-side encryption. A private application can combine all of them, using each layer for the risks it is designed to address. See Encryption in Transit and Encryption at Rest for those distinctions.

Client-side encryption and Nyskra

For Nyskra, client-side encryption means private information is protected before it reaches synchronization or sharing infrastructure. Nyskra’s servers receive encrypted content without obtaining the decryption keys needed to read it. This is a central property of Nyskra Zero and its zero-access architecture.

Protection also matters when information never leaves a device. Nyskra applications encrypt their local databases using 256-bit ChaCha20-Poly1305 authenticated encryption. Users can choose between a convenience-oriented mode that stores the database key in the device’s secure storage and password-protected startup, in which the database key is not stored persistently and is derived from the Nyskra Keychain after entering the data password. The latter places a password step between startup and access. Both modes rely on the security of the authorized device once the application is unlocked.

For all personal data synchronized between devices or selectively shared with authorized people, Nyskra uses XChaCha20-Poly1305, an authenticated encryption with associated data (AEAD) algorithm with 256-bit keys. It protects the confidentiality and integrity of encrypted content. Encryption keys must be available to authorized endpoints without becoming independently available to the service provider. Cryptographic Key Management explains the general principles, including key wrapping and encrypted key envelopes.

The goal is private data that remains useful locally and protected when it leaves the device. Local database encryption, end-to-end encryption, and secure recipient authorization solve related but distinct problems. For the cryptographic constructions, see libsodium’s ChaCha20-Poly1305 AEAD documentation, including XChaCha20-Poly1305, and RFC 8439 for the underlying IETF ChaCha20-Poly1305 construction.