Encryption: Classic, Shield and Apex Crypto
This content is not available in your language yet.
Chapter 18 of Securing Salesforce: Sharing and Visibility, Part 3: Beyond the Company and Beyond the Record. New to the course? Start with chapter 1.
Everything in this course up to now has been about who can see what. Encryption sounds like more of the same, a stronger lock on the same door. It isn’t. It’s a lock on a different door, and the first job is knowing which one.
So this chapter starts with the question I ask the room: where is the data encrypted, and who would have to do what to get at it? Then it takes Salesforce’s three ways to encrypt one at a time: Classic Encryption, Shield Platform Encryption, and your own encryption with the Apex Crypto class. In between come the parts projects get wrong: who holds the keys, when to turn it on, and what the rules for health, personal and card data actually ask for.
The ideas in this chapter
Section titled “The ideas in this chapter”- Encryption at rest is about logins, not permissions. It stops someone who gets the stored data; a logged-in user with access sees the value, decrypted. Hiding data from users is still sharing and field-level security.
- Encrypt only what a requirement names. Threat, classification, requirement, then the tool. Encryption you don’t need still costs you everything it costs.
- Classic Encryption is Gen One. One masked text field, included in the license, with a long list of what it gives up; enough only when every condition holds.
- Shield is Gen Two, with two paths. Field-level encryption for the fields you choose and full key control; Database Encryption for most of the database with filtering and sorting intact; and separate switches for files, Chatter, search indexes and the event bus.
- Two keys on a safe deposit box. Your tenant secret and Salesforce’s primary secret make the data key together. Lose yours with no copy, and the box stays shut. The client holds the keys, not the consultant.
- Not a week before go-live. Turn it on early, in a full sandbox, one field at a time, test everything it touches, and sync the existing data.
- Match the control to the data. HIPAA, GDPR and PCI each ask something different about encryption; every one starts with the label on the field, who can see it, and the side doors.
- Encrypted data, not an encrypted channel. The Crypto class is for data that has to stay sealed past every stop, and then the key becomes the problem. Rarely needed.
The picture
Section titled “The picture”Here’s where the chapter starts: what encryption at rest stops, and what it doesn’t.
And the one most projects end up choosing between: Shield’s two paths.
The path through this chapter
Section titled “The path through this chapter”Seven modules, each standing on its own.
- What Encryption at Rest Protects, and What It Doesn’t. Where the data is encrypted; logins, not permissions; why turn on something that costs you; the threat, then the list; three ways to encrypt.
- Classic Encryption: Encryption Gen One. A field type, not a setting; masking and View Encrypted Data; what you give up; who holds the keys; when it’s enough.
- Shield Platform Encryption: Field-Level and Database Encryption. Encryption Gen Two; the two paths and how they layer; more than fields; no mask; probabilistic or deterministic; Shield Extension; which path.
- Keys: Tenant Secrets, Bring Your Own Key, and Who Holds Them. Two keys on a safe deposit box; key hygiene and rotating a key; keeping the key yourself; who holds it.
- Turning It On: Not a Week Before Go-Live. The worst time; encrypt only what a requirement names; what stops working; a full sandbox first; one field at a time; existing data; the plan.
- PCI, PII and HIPAA: Matching the Control to the Data. The label on the field; what HIPAA, GDPR and PCI say in their own words; the side doors; six controls, three kinds of data.
- Encrypting It Yourself: The Apex Crypto Class. Encrypted data, not an encrypted channel; key and algorithm; where the key lives; what you give up; signing isn’t encrypting; how rarely you need it.
Then check what stuck with the study guide.
What an architect decides here
Section titled “What an architect decides here”- What the threat is, and whether the answer is access control, encryption, masking or not storing the data at all.
- Which fields a regulation, contract or policy requires to be encrypted, recorded on each field, and that everything else stays unencrypted on purpose.
- Which tool: Classic Encryption, Shield’s field-level or Database Encryption, or the Crypto class, and what the team gives up with each.
- Who holds the keys, where the copies live, how often they rotate, and who may destroy one.
- When Shield gets turned on: early, in a full sandbox, and in production as its own change.
- What never gets stored, such as card codes and PINs, and where the same sensitive values leak: files, search, Chatter, email.
Beyond the exam: what AI changes. An agent runs as a user, and Salesforce decrypts data for any user with access. So encryption at rest does nothing to limit what an agent can read, repeat or summarize; the agent’s user’s access does. Ask both questions every time: is the stored data encrypted, and what can the agent’s user see? Chapter 20 covers agents.
Explore
Section titled “Explore”Each module lists its own sources. Two to start with:
- Strengthen Your Data’s Security with Shield Platform Encryption (opens in a new tab), Salesforce Help (checked 2026-11-26)
- Differences Between Classic Encryption and Shield Platform Encryption (opens in a new tab), Salesforce Help (checked 2026-11-26)
Next: Monitoring: Real-Time Events, Log Files and Transaction Security
