# Client-Side Encryption

Client-side encryption encrypts data in the application or client environment before sending it to a cloud storage or data service.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/client-side-encryption

> The receiving service stores ciphertext rather than the original plaintext, and authorized clients decrypt the data when they retrieve it. This separates access to stored data from access to its plaintext, but requires deliberate choices about key custody, application security, and recovery.

Practice exams covering Client-Side Encryption: [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [SCS-C03 AWS Certified Security - Specialty](https://blowstack.com/practice-exams/aws-certified-security-specialty), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate).

## 6 key aspects of Client-Side Encryption

Client-side encryption moves payload protection into the application while making key authorization, cryptographic correctness, and recoverability explicit engineering responsibilities.

1. **Encryption before service ingestion**: The application encrypts the payload before sending it to the receiving data service. A cloud-hosted application can still perform client-side encryption relative to the storage service it uses.
2. **Independent storage and decryption permissions**: Permission to retrieve ciphertext does not inherently grant permission to decrypt it. Separate storage access from key-use authorization and avoid giving storage administration roles unnecessary decryption privileges.
3. **Envelope encryption**: A data key encrypts the payload, while a wrapping key protects the data key. Store the encrypted data key and required metadata with the ciphertext, but never persist the plaintext data key.
4. **Explicit key custody**: Client-side encryption can use managed key services, customer-controlled HSMs, or external key systems. Choose the model according to requirements for provider trust, key exportability, and where plaintext key material may exist.
5. **Authenticated ciphertext**: Use maintained libraries and authenticated encryption to detect unauthorized changes to encrypted data. Follow the library's rules for nonce generation and verify integrity before accepting decrypted output.
6. **Application and recovery responsibility**: Clients must manage encryption formats, decryption compatibility, and key availability. Test recovery from encrypted backups and account for limitations on server-side search, indexing, and processing.

## Cloud services for Client-Side Encryption

Amazon S3 and Amazon DynamoDB can store ciphertext produced by applications before ingestion. AWS KMS commonly supplies the key-management layer for envelope encryption, allowing applications to encrypt payloads locally while controlling access to data-key generation and decryption. AWS CloudHSM supports designs requiring dedicated HSMs and customer-controlled cryptographic operations, with additional integration and operational responsibilities. Across these services, engineers must separate storage permissions from decryption permissions, preserve encryption metadata, and test recovery. Service-side encryption remains a complementary control rather than a substitute for encryption before ingestion.

- **[Amazon S3](https://blowstack.com/tools/cloud-services-hub/amazon-s3)**: Applications can encrypt objects before uploading them to Amazon S3, including through an appropriate S3 encryption client. S3 stores the ciphertext and can additionally apply server-side encryption; neither SSE-KMS nor SSE-C is itself client-side encryption.
- **[AWS CloudHSM](https://blowstack.com/tools/cloud-services-hub/aws-cloudhsm)**: AWS CloudHSM provides dedicated HSMs that applications can use for cryptographic operations and key protection in a client-side encryption design. Whether plaintext data keys leave the HSM depends on the implementation; using CloudHSM does not by itself establish the encryption boundary.
- **[Amazon DynamoDB](https://blowstack.com/tools/cloud-services-hub/amazon-dynamodb)**: Applications can encrypt selected attributes before writing them to DynamoDB, using tools such as the AWS Database Encryption SDK for DynamoDB. Encrypted attributes have query limitations, so key attributes and any intentionally exposed fields must be considered explicitly.

## Client-Side Encryption exam questions

Real practice exam questions on Client-Side Encryption, with the correct answer and its explanation.

### Question 1 (DEA-C01)

**Question:**

A company runs a data ingestion application on Amazon EC2 that writes sensitive event archives to Amazon S3. A storage operations role must be able to successfully download the stored object payloads to verify checksums and copy the archives to a recovery location. However, users of this role must not be able to read the event contents. A separate processing application must be able to recover the original events. The company requires cryptographic separation between permission to download an archive and permission to read its contents, rather than relying on users to avoid opening downloaded files.

Which solution meets these requirements?

**Correct answer:** Use a maintained encryption library in the ingestion application to encrypt each archive before uploading it. Store the encrypted archive and required cryptographic metadata in S3, and grant access to the decryption key only to the processing application.

**Explanation:** The ingestion application encrypts the payload before S3 receives it. Successful S3 downloads therefore return application-encrypted ciphertext. Storage operations can verify and copy those encrypted bytes without reading the events, while the processing application can use its separately controlled key access to decrypt them.

### Question 2 (SCS-C03)

**Question:**

A company is designing encryption for multi-gigabyte investigation packages. An application must encrypt each package locally and store exactly one copy of the payload ciphertext. The production security team and an independent recovery team each control a different symmetric customer managed AWS KMS key. Either team must be able to decrypt a package using only its own KMS key, even when the other team's key is disabled. Neither team may receive permissions to use the other team's key. The ingestion application is authorized to use both keys, and plaintext data keys may exist temporarily in application memory.

Which encryption workflow meets these requirements?

**Correct answer:** Call GenerateDataKey with the production KMS key and encrypt the package locally with the returned plaintext data key. Call Encrypt with the recovery KMS key to encrypt that same plaintext data key. Store both encrypted data keys and the required cryptographic metadata with the payload ciphertext, and remove the plaintext data key from memory.

**Explanation:** The payload is encrypted once with one data key, while two independent KMS keys protect separate copies of that same data key. Either team can use its own KMS key to decrypt its corresponding encrypted data key and then decrypt the payload locally. Disabling either KMS key does not prevent recovery through the other.

### Question 3 (DVA-C02)

**Question:**

A document-processing application encrypts JSON documents in its application process by using the AWS Encryption SDK with an AWS KMS key, then uploads the resulting encrypted messages to Amazon S3. The bucket also applies SSE-S3. A developer adds a worker that calls GetObject and passes the response body directly to a JSON parser. GetObject succeeds, but parsing fails. The worker's IAM role already has s3:GetObject permission and all required permissions to decrypt with the KMS key. What should the developer do so that the worker can process the existing documents without changing the upload process?

**Correct answer:** Use the AWS Encryption SDK in the worker to decrypt the GetObject response body with the KMS key before passing the resulting plaintext to the JSON parser.

**Explanation:** S3 transparently removes its SSE-S3 encryption during GetObject, but the application-encrypted message remains encrypted. The worker must use the AWS Encryption SDK to process the message, recover its data key through KMS, verify integrity, and decrypt the document before parsing it. KMS permissions alone do not perform these application-side steps.

### Question 4 (DOP-C02)

**Question:**

A company uses custom collectors on Amazon EC2 instances to upload 200-MB security log bundles to an Amazon S3 archive. Archive operators must retain permission to download objects and inspect their metadata, but must not be able to recover the log contents. Only a separate investigation application may recover the contents. Compliance also requires that the S3 service never receive the plaintext log payloads.

The company permits AWS KMS to manage encryption keys and permits plaintext data keys in application memory during cryptographic operations. The solution must support recovery of archived bundles after the collector instances have been terminated.

Which implementation meets these requirements?

**Correct answer:** Use the AWS Encryption SDK in each collector with a customer managed KMS key to encrypt each bundle before uploading it over HTTPS. Store the resulting encrypted message, including its encrypted data key and cryptographic metadata. Permit collectors to generate data keys and permit only the investigation application to decrypt those encrypted data keys. Do not persist plaintext data keys.

**Explanation:** The collectors encrypt the log payload before it reaches S3. Operators can download the encrypted objects without obtaining plaintext. The encrypted data key and message metadata allow the authorized investigation application to decrypt archived bundles after the original collectors are gone. KMS controls access to the wrapping key, while the SDK performs bulk encryption locally.

## Practice Client-Side Encryption in a full exam

Questions on Client-Side Encryption in each practice exam, with every answer option and an explanation for each:

- [SCS-C03](https://blowstack.com/practice-exams/aws-certified-security-specialty): 6 questions
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 4 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 2 questions
- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 1 question
- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 1 question

## What is Client-Side Encryption

Client-side encryption places the encryption operation before the boundary of the receiving storage service. The client might be a desktop application, an on-premises backup agent, or an application running on cloud compute. It encrypts data locally and sends ciphertext to object storage or a database. On retrieval, an authorized application obtains the necessary key material and decrypts the data. The term describes where encryption happens; it does not necessarily mean that the application runs outside the cloud provider.

A common implementation uses envelope encryption. The application obtains a symmetric data key, encrypts the payload using an authenticated encryption algorithm such as AES-GCM, and protects the data key with a separate wrapping key. It stores the ciphertext, encrypted data key, and required cryptographic metadata together. During retrieval, the application unwraps the data key and decrypts the payload. Use maintained encryption libraries rather than inventing a message format, and follow their requirements for nonces, integrity verification, and algorithm selection. Plaintext data keys must not appear in logs, configuration files, or stored objects, and their lifetime in memory should be minimized.

Key management depends on the requirement. AWS KMS can generate data keys and protect them under a KMS key while the application performs bulk encryption locally. This provides policy enforcement and auditing for KMS operations, but it still relies on a provider-operated key service. If a requirement says that no plaintext key material may leave an HSM, a workflow that returns a plaintext data key to application memory does not satisfy it. AWS CloudHSM supports customer-controlled HSM operations, but engineers must choose an HSM-compatible cryptographic workflow and validate performance and availability. If keys must remain entirely outside the cloud provider, an external key system may be necessary.

For example, a backup agent can encrypt an archive before uploading it to object storage. A storage administrator who can download the object still cannot read the archive without the decryption capability. Keep storage permissions and key-use permissions separate, and restrict decryption to the recovery application. A database application can similarly encrypt sensitive fields before writing records, although queries and indexes cannot operate normally on those ciphertext fields without additional, carefully designed mechanisms.

Client-side encryption differs from server-side encryption, where the receiving service performs encryption after receiving the data. Supplying a customer key to a service for server-side encryption does not make the operation client-side; Amazon S3 SSE-C is an example. Likewise, TLS protects data in transit but does not determine whether the service receives plaintext. Client-side encryption should still use TLS, access controls, and appropriate server-side encryption as complementary protections.

The trade-offs include application CPU usage, larger payloads, encryption-library maintenance, and more complex recovery and key lifecycle management. Losing the required keys can make backups permanently unreadable. Rotating a wrapping key does not automatically re-encrypt existing payloads; the migration strategy depends on the encryption format and key service. Client-side encryption also limits service-side inspection, transformation, and plaintext search. It does not hide unencrypted object names, record attributes, or other exposed metadata, and it cannot protect plaintext from a compromised client that is authorized to decrypt it. For exam scenarios, select it when encryption must occur before storage-service ingestion, then separately evaluate key custody, authorization, and operational requirements.

## Learn Client-Side Encryption in lessons

8 short lessons on Client-Side Encryption in 4 certification courses.

- DEA-C01: Client-Side Encryption: encrypting data before storage (Premium), https://app.blowstack.com/lessons/client-side-encryption-encrypting-data-before-storage-dea-c01
- SCS-C03: Client-Side Encryption: application-controlled encryption workflows (Premium), https://app.blowstack.com/lessons/client-side-encryption-application-controlled-encryption-workflows-scs-c03
- DOP-C02: Client-Side Encryption: application-side envelope encryption (Premium), https://app.blowstack.com/lessons/client-side-encryption-application-side-envelope-encryption-dop-c02
- SAA-C03: Client-Side Encryption vs. Server-Side Encryption (Premium), https://app.blowstack.com/lessons/client-side-encryption-vs-server-side-encryption-saa-c03
- DEA-C01: Client-Side Encryption vs Encryption in Transit (Premium), https://app.blowstack.com/lessons/client-side-encryption-vs-encryption-in-transit-dea-c01
- SCS-C03: Client-Side Encryption vs. Server-Side Encryption (Premium), https://app.blowstack.com/lessons/client-side-encryption-vs-server-side-encryption-scs-c03
