Field-Level and Database Encryption
Esta página aún no está disponible en tu idioma.
Module 3 of 7 in the chapter Encryption: Classic, Shield and Apex Crypto, chapter 18 of Securing Salesforce: Sharing and Visibility. Each module stands on its own.
The question this module answers: Shield Platform Encryption offers two paths, field-level encryption and Database Encryption. What does each one encrypt, what does it cost you in functionality, and which do you need?
Encryption Gen Two
Section titled “Encryption Gen Two”In module 2, Classic Encryption was encryption Gen One: it got Salesforce onto the playing field. Shield is what Salesforce rebuilt after it. They went back, worked on it, and built a much better implementation of encryption in many more places.
Shield Platform Encryption is one part of Salesforce Shield. It encrypts data at rest, like everything in this chapter; data moving on the wire is TLS’s job (module 1). Salesforce’s comparison table puts the generations side by side, and a few rows tell the story (all from Differences Between Classic Encryption and Shield Platform Encryption (opens in a new tab), Salesforce Help, checked 2026-11-26):
- Algorithm. Classic is “128-bit Advanced Encryption Standard (AES).” Shield is 256-bit: “AES CBC” for field-level encryption and “AES GCM” for Database Encryption.
- Keys. Shield derives its keys in a hardware security module (“HSM-based Key Derivation”) and has its own permission, Manage Encryption Keys. Classic has neither.
- What it covers. Shield encrypts standard fields, existing custom fields, and attachments, files and content. Classic encrypts only its own custom field type.
- Price. Classic is “Included in base user license.” Both kinds of Shield say “Additional fee applies.” It’s “Available in: Enterprise, Performance, and Unlimited Editions with the Salesforce Shield or Shield Platform Encryption licenses,” and “Available for free in Developer Edition,” which is where you should learn it.
Two paths
Section titled “Two paths”Here’s how Salesforce frames the choice: Shield offers “two paths toward encrypting data: Field-Level Encryption and Database Encryption.” Both give you control over key material and encrypt more than Classic Encryption, and they differ in coverage, key management, and support for filtering and sorting (same page).
Field-level encryption: the fields you choose
Section titled “Field-level encryption: the fields you choose”Field-level encryption (FLE) is the Shield most of us have worked with. “With Field Level Encryption (FLE), you choose the specific fields that you want to protect with Shield Platform Encryption,” standard or custom, with key material you control (What You Can Encrypt (opens in a new tab), Salesforce Help, checked 2026-11-26).
Two words in that are doing a lot of work: “choose” and “compatible.” In my demo org I opened the encryption policy and picked fields one at a time, and Salesforce warned me about each limitation as I went. The comparison table says the coverage is “Limited” for both standard and custom fields, with a list of which ones qualify. And FLE encrypts in the application tier, before the data reaches the database, which is why it costs you functionality: no sorting, and search, filters and queries only through “UI, partial search, lookups, and certain SOSL queries on fields encrypted with the deterministic encryption scheme” (comparison table).
What you get for that is control. FLE has every advanced key option: “BYOK, Cache-only Keys, External Key Management,” and you can store keys outside Salesforce and export, import and destroy them (comparison table). Module 4 is about those keys.
Database Encryption: most of the database, filtering still works
Section titled “Database Encryption: most of the database, filtering still works”Database Encryption is the newer path. It’s for Hyperforce customers with a Shield or Shield Platform Encryption license, and “You can encrypt most of your data without impeding filtering, sorting, or impeding the many Salesforce features that rely on sorting and filtering.” (Learn About Database Encryption (opens in a new tab), Salesforce Help, checked 2026-11-26).
Notice what changes. You don’t pick fields: the comparison table says “All standard fields” and “All custom fields,” and adds custom metadata and Apex. Queries keep working: “All SOSL and SOQL queries,” and sorting too. What you give up is some of the key control. Database Encryption’s only advanced key option is BYOK, and the table marks “Store Encryption Keys Outside of Salesforce” and “Export, Import, and Destroy Keys” as not available for it.
Both, in layers
Section titled “Both, in layers”They aren’t either-or. Salesforce: “Use Database Encryption on its own, or in conjunction with other Shield Platform Encryption features that use their own key material,” such as FLE, Search Index Encryption and Chatter encryption; together, Database Encryption is applied after the feature encryption (Learn About Database Encryption).
So a field can be encrypted twice: by FLE with a key you control, then by Database Encryption with the rest of the database. The comparison table is honest about what that costs: Database Encryption supports all queries and sorting “except on fields also encrypted with field-level encryption.” The field you chose to protect most is the one you can’t sort or freely filter on.
More than fields
Section titled “More than fields”When I demoed the encryption policy, the fields were only part of it. Next to them were the switches for files and attachments, for Chatter, for search indexes, and for change data capture and platform events. Salesforce’s list today is longer. “Beyond database and field-level encryption, you can also encrypt specific types of data and specialized data stores” (What You Can Encrypt):
- Archives made with the Archive app
- Backups made with Backup & Recover Next
- Chatter data
- CRM Analytics datasets
- Custom fields in installed managed packages that support Shield Platform Encryption
- Data 360 data stores, including its vector-based search indexes
- Event Bus data (platform events and change data capture)
- Files and attachments
- Fields in the Salesforce B2B Commerce managed package
- Salesforce search indexes
And one line that matters for module 4: “Shield Platform Encryption uses different keys for each type of data and data store” (same page).
Why should an architect care about the search index? Because it’s a copy. Salesforce: “Except for Data 360, Salesforce products use traditional keyword indexing and store these keywords at rest in search index files,” and encryption “keeps tokenized search indexes unreadable to unauthorized parties if the indexes are compromised” (same page). Encrypt a field and leave its index alone, and the words from that field still sit at rest in the index, outside the protection you chose for the field. The same goes for a file attached to an encrypted record, a Chatter post that repeats the value, an event carrying it on the bus. Who can see a file is chapter 12, module 2; whether the file is encrypted is this switch. Module 6 comes back to these side doors.
No mask
Section titled “No mask”One thing Shield doesn’t do that Classic does: mask. The comparison table says “No” for masking, and “No” for mask types and characters, for both paths. There’s no View Encrypted Data permission either.
That isn’t a gap in Shield. It’s the point of module 1: encryption at rest is about logins, not permissions. A user who can see the field sees the value, decrypted, whether it’s encrypted or not. If some logged-in users shouldn’t see it, that’s field-level security, or masking in another form, not encryption.
Probabilistic or deterministic, in one paragraph
Section titled “Probabilistic or deterministic, in one paragraph”Field-level encryption has two schemes, and the choice decides what you can still do with the field. Probabilistic, the default, encrypts the same value differently every time; it’s the strongest, and you can’t filter on it. Deterministic encrypts the same value the same way, so the platform can match it, which is what allows exact-match filtering, at some cost in strength. Choosing between them is a data-classification decision, and the Data Architect course owns it: Probabilistic by Default, Deterministic When the Use Requires It.
Shield Extension
Section titled “Shield Extension”On the comparison page you’ll see a note: “Read about implementing field-level encryption using Shield Extension in Own from Salesforce.” Here’s what Salesforce says it is: the “Shield Extension managed package by Own from Salesforce includes tools that help you get the most out of Shield Platform Encryption, Field Audit Trail, and Field History Tracking. The Platform Encryption Analyzer streamlines field-level encryption planning and implementation” (Own from Salesforce (opens in a new tab), Salesforce Help, checked 2026-11-26).
So it’s a planning tool for the field-level path, from Salesforce’s Own family of products, not a third kind of encryption. If you’re planning a field-level rollout, look at it. The encryption itself is still the Shield Platform Encryption this module describes.
Which path?
Section titled “Which path?”There will always be a performance and functionality cost to encryption, Gen One or Gen Two. I’ve seen people buy Shield, check every box, and watch the org slow down and features stop working. So the order from module 1 still holds: the threat, the classification, the requirement, then the tool. When you get to the tool:
- Database Encryption when the requirement is broad (“encrypt our data at rest”), the org is on Hyperforce, and you need filtering, sorting and search to keep working. Salesforce’s own words: “minimal effort.”
- Field-level encryption when the requirement names specific fields and asks for more control over their keys: cache-only keys, keys managed outside Salesforce, or keys you can destroy.
- Both, in layers, when a broad requirement and a few named fields with stricter key rules come together. Expect the named fields to lose sorting and most filtering.
- And the other stores in the encryption policy, chosen field by field and store by store: files, Chatter, search indexes, the event bus, wherever the same sensitive values end up.
Test knowledge. Know that Shield Platform Encryption encrypts data at rest with 256-bit AES, with HSM-based key derivation and the Manage Encryption Keys permission, for an additional fee (free in Developer Edition). Know its two paths: field-level encryption (chosen, compatible standard and custom fields; application tier; AES CBC; BYOK, cache-only keys and external key management; filtering only on deterministic fields, no sorting) and Database Encryption (Hyperforce; all standard and custom fields, custom metadata and Apex; AES GCM; filtering, sorting, SOQL and SOSL keep working; BYOK only), and that they can be used together, with Database Encryption applied after field-level encryption. Know what else Shield can encrypt: files and attachments, Chatter, search indexes, event bus data (platform events and change data capture), and more, each with its own keys. Know that Shield doesn’t mask, and how that differs from Classic Encryption. A likely area, not a known question.
What an architect decides here
Section titled “What an architect decides here”- Which path the requirement calls for: Database Encryption, field-level encryption, or both in layers, and whether the org is on Hyperforce.
- For field-level encryption: exactly which fields, each one checked as compatible, and which scheme, probabilistic or deterministic (Data Architect).
- Which other stores hold the same values and need their own switch: files, Chatter, search indexes, the event bus.
- What the team gives up on the encrypted fields (sorting, filtering), written down before anyone builds on them.
- That nobody expects Shield to hide a value from a logged-in user: that’s access control.
Beyond the exam: what AI changes. In my class someone asked about a HIPAA client that wanted a chatbot. My answer was that the chatbot reads the values from the objects, and the platform decrypts them for whoever it runs as. That’s still the answer for agents. Shield protects the stored data, including Data 360’s vector-based search indexes, which an agent may be grounded on. It does nothing about what the agent’s user can read. So list every store the agent touches, check that each one sensitive value lives in is encrypted, and then check the agent’s user’s access. Chapter 20 covers agents.
Explore
Section titled “Explore”- Differences Between Classic Encryption and Shield Platform Encryption (opens in a new tab), Salesforce Help (checked 2026-11-26)
- What You Can Encrypt (opens in a new tab), Salesforce Help (checked 2026-11-26)
- Learn About Database Encryption (opens in a new tab), Salesforce Help (checked 2026-11-26)
- Own from Salesforce (opens in a new tab), Salesforce Help (checked 2026-11-26)
