Salesforce Security
Jitendra's Blog
COMPLETE SECURITY GUIDE 2026

Salesforce Shield Platform Encryption

Master data encryption at rest with comprehensive setup instructions, best practices, implementation lessons learned, and expert guidance on field selection

In This Guide
12
In-Depth Sections
Shield Feature
256-bit
AES Encryption
In This Guide
5
FAQs Answered
Shield Feature
BYOK
Key Management

1 What is Shield Platform Encryption?

According to Salesforce official documentation, Shield Platform Encryption is part of the Salesforce Shield suite - a set of security tools that helps administrators and developers build extra levels of trust, compliance, and governance right into business-critical applications.

The Four Components of Salesforce Shield

Salesforce Shield consists of four main components, each addressing different security needs:

Key Insight: You can purchase the full Shield bundle or individual components based on your regulatory and business requirements. Platform Encryption is often the most sought-after component for organizations with compliance mandates.

Why Platform Encryption Matters

Shield Platform Encryption helps organizations meet legal and contractual obligations while ensuring sensitive customer data is encrypted according to industry best practices. Shield is compliant with or exceeds requirements for GDPR, HIPAA, and SOX standards.

Unlike traditional encryption that might break application functionality, Shield Platform Encryption maintains critical features such as:

2 Classic Encryption vs Shield Platform Encryption

Understanding the differences between Classic Encryption and Shield Platform Encryption is crucial for making the right security decision. According to the Salesforce Security Implementation Guide, these two approaches serve different purposes and have distinct capabilities.

Feature Classic Encryption Shield Platform Encryption
Encryption Algorithm 128-bit AES 256-bit AES
Cost Included with base Salesforce license Additional cost (20% of net spend)
Field Support Custom text fields only (175 char limit) Standard & custom fields, files, attachments
Key Management Salesforce-managed only BYOK (Bring Your Own Key) supported
Data Masking Yes (hides data with random characters) No (use field-level security instead)
Formula Fields Not supported Supported
Flows (Automation) Not supported Supported
Reports & Search Data exposed in reports/search Encrypted at all levels

When to Use Classic Encryption

Classic Encryption is appropriate for basic security needs where:

When to Use Shield Platform Encryption

Shield Platform Encryption is the superior choice when:

Important: The biggest drawback of Classic Encryption is that encrypted data can still be exposed in reports, search results, and API responses. Shield Platform Encryption solves this by ensuring encryption at all levels, making it the superior choice for high-security environments.

3 How Shield Platform Encryption Works

Shield Platform Encryption uses a sophisticated key derivation process to protect your data. According to the Shield Platform Encryption Architecture Guide, the encryption relies on a combination of keys that work together to secure your data.

Key Architecture

Tenant Secret
Customer-controlled unique secret
You control this
Master Secret
Salesforce-maintained secret
Salesforce controls
Data Encryption Key
Used to encrypt/decrypt data
Protects your data

Encryption Schemes: Probabilistic vs Deterministic

Shield Platform Encryption offers two encryption schemes, each with different security and functionality trade-offs:

Aspect Probabilistic Encryption Deterministic Encryption
How It Works Same text produces different ciphertext each time Same text always produces same ciphertext
Security Level Higher (fully randomized initialization vector) Slightly lower (static initialization vector)
Filtering/Search Not supported Supported (can filter on encrypted fields)
Report Filters Not supported Supported
List Views Cannot filter Can filter
Use Case Maximum security for non-searchable data Balance of security and functionality
Recommendation: Use probabilistic encryption whenever data in a field will not need to be filtered or searched. Reserve deterministic encryption only for fields where filtering capability is essential for business operations.

The Encryption Process

Here's how data flows through Shield Platform Encryption when a user saves sensitive information:

User
Salesforce
Database
Enter data via UI/API
Detect encrypted field
Derive key (Tenant + Master)
AES-256 encrypt data
Store ciphertext at rest

4 Which Fields Can Be Encrypted?

One of the most common questions about Shield Platform Encryption is: "Can I choose which fields to encrypt?" The answer is yes - you have granular control over field encryption. According to the Salesforce Help documentation on standard fields, you can encrypt specific standard and custom fields based on your security requirements.

Supported Custom Field Types

The following custom field types can be encrypted:

Supported Standard Fields by Object

Object Encryptable Standard Fields
Account Account Name, Account Site, Billing Address (Street, City), Phone, Email, Website, Fax
Contact Name, Email, Phone, Mailing Address, Home Phone, Assistant, Assistant Phone, Description, Fax
Lead Name, Email, Phone, Company, Address fields
Case Subject, Description, Case Comments (Body and internal comments)
Opportunity Description, Next Step
Chat Transcript Body, Supervisor Transcript Body
Person Account All Account + Contact fields applicable to Person Accounts
Industry Clouds: Shield Platform Encryption also supports specific standard fields in CPQ, Health Cloud, Financial Services Cloud, Sales Cloud, Service Cloud, and Workplace Command Center. Consult the Which Standard Fields Can I Encrypt? documentation for the complete list.

Files, Attachments, and Chatter

Beyond field-level encryption, Shield supports:

Data Type Encryption Behavior Selectivity
Files & Attachments All-or-nothing when policy is enabled Cannot selectively encrypt individual files
Chatter Encrypts posts, comments, questions, polls, link names/URLs All Chatter fields encrypted when enabled
Search Index Search index files can be encrypted All-or-nothing
CRM Analytics Datasets can be encrypted Configurable
Important Note: When encryption policy for files and attachments is enabled, all new files will be encrypted at rest. File and attachment encryption is binary (all or nothing). For existing files, you must submit a Salesforce Support case to encrypt historical files - this cannot be done self-service.

5 Setup & Implementation Guide

Implementing Shield Platform Encryption requires careful planning and execution. According to Salesforce Trailhead's Shield Platform Encryption module, the implementation process involves several critical steps.

Pre-Implementation Checklist

Complete these critical steps before enabling Shield Platform Encryption in your org:

Required
Data Classification

Identify and categorize sensitive data across your org before deciding what to encrypt.

Run Data Detect scan
Identify PII, PHI, financial data
Document compliance requirements
Required
Threat Model Assessment

Define what threats you're protecting against to choose the right encryption approach.

Compliance needs (GDPR, HIPAA, SOX)
Data breach protection priorities
Insider threat considerations
Recommended
Field Impact Analysis

Evaluate how encryption will affect your existing functionality and integrations.

Review formulas using target fields
Check reports and list view filters
Audit Apex SOQL WHERE clauses
Recommended
AppExchange Compatibility

Verify all installed packages work correctly with Shield Platform Encryption.

List all installed packages
Contact vendors for Shield support
Test integrations in sandbox
Best Practice
Sandbox Testing

Always test encryption in a full sandbox environment before production deployment.

Use Full or Partial Copy sandbox
Test all user workflows end-to-end
Validate reports and dashboards

Step-by-Step Setup Process

Phase 1
Foundation
Phase 2
Configure
Phase 3
Activate
Phase 1

Foundation

1
Enable Shield Platform Encryption
Setup → Security → Platform Encryption
2
Generate Tenant Secret
Key Management → Generate Tenant Secret
Phase 2

Configure

3
Configure Encryption Policy
Encryption Policy → Select Fields
4
Apply to Custom Fields
Object Manager → Field → Enable Encryption
Phase 3

Activate

5
Sync Existing Data
Encryption Statistics → Background Encrypt
6
Verify Encryption
Encryption Statistics → Confirm Status

Assign Encryption Permissions

According to Salesforce Trailhead, Shield Platform Encryption requires only two system permissions:

Permission Purpose Assign To
Manage Encryption Keys Generate, rotate, export, import, and destroy tenant secrets Security Admin only (very limited users)
Customize Application Enable encryption on fields, modify encryption policies Salesforce Admins who configure encryption
Important: Shield Platform Encryption does NOT have a "View Encrypted Data" permission (that's Classic Encryption). With Shield, encryption is transparent - users who have field-level security access to a field automatically see decrypted data. Use FLS, profiles, permission sets, and sharing rules to control data visibility.
Critical Warning: Ensure System Administrators do NOT have the "Manage Encryption Keys" permission by default. If someone accidentally deletes the tenant secret, there is NO way to recover encrypted data. Limit this permission to a dedicated Security Admin role with strict access controls.

6 BYOK & Key Management

For organizations requiring complete control over their encryption keys, Shield Platform Encryption offers BYOK (Bring Your Own Key) capabilities. According to the Salesforce BYOK documentation, you can upload your own key material or use the Cache-Only Key Service.

Key Management Options

Option Description Best For
Salesforce-Generated Keys Salesforce generates and manages your tenant secret Most organizations without strict key control requirements
Customer-Supplied Keys (BYOK) Upload your own 256-bit AES key material Organizations requiring key ownership for compliance
Cache-Only Key Service Store keys externally; Salesforce fetches on demand Maximum control - keys never persist in Salesforce

Setting Up BYOK (Bring Your Own Key)

To enable BYOK, follow these steps based on Salesforce's BYOK setup documentation:

Your Key's Journey: From Generation to Activation in Salesforce
1
Enable BYOK
Setup → Platform Encryption → Key Management
2
Create Certificate
Self-signed, 4096-bit, Platform Encryption enabled
3
Generate & Encrypt
Create 256-bit AES key, encrypt with certificate's public key
4
Upload to Salesforce
Key Management → Upload encrypted key material
5
Activate Key
Set as active for Data in Salesforce, Analytics, etc.
Cache-Only Key Service: For maximum control where keys never persist in Salesforce, use the Cache-Only Key Service. This requires setting up Named Credentials pointing to your external key service and using the CacheOnlyKeyWrapper tool to format keys.

Key Rotation Best Practices

According to Salesforce Trailhead's encryption deployment guidance, regular key rotation is essential:

Pro Tip: When you rotate keys, existing data doesn't automatically get re-encrypted. Use the Encryption Statistics page to synchronize existing data with your latest encryption policy, or touch records programmatically to trigger re-encryption.

7 Limitations & Governor Limits

Understanding the limitations of Shield Platform Encryption is crucial for successful implementation. According to the Salesforce documentation on tradeoffs and limitations and the general considerations guide, there are several important constraints to consider.

SOQL and SOSL Limitations

Encrypted fields have significant query restrictions. For deterministic encryption specifics, see the deterministic encryption considerations:

Operation Probabilistic Encryption Deterministic Encryption
WHERE clause Not supported Supported (exact match only)
ORDER BY clause Not supported Not supported
GROUP BY clause Not supported Limited support
Aggregate functions (MAX, MIN, COUNT_DISTINCT) Not supported Not supported
LIKE operator Not supported Not supported (exact match only)
// This SOQL will FAIL if Account.Name is encrypted with probabilistic scheme
Account[] accts = [SELECT Id, Name FROM Account WHERE Name = 'Acme Corp'];

// This will work with deterministic encryption
Account[] accts = [SELECT Id, Name FROM Account WHERE Name = 'Acme Corp'];

// This will NEVER work (ORDER BY on encrypted field)
Account[] accts = [SELECT Id, Name FROM Account ORDER BY Name];

Field Character Limits

According to the field limits documentation, encrypted content is often longer than its plaintext, which can impose stricter limits:

Feature Restrictions

Feature Impact with Encryption
Report Filters Cannot filter on probabilistically encrypted fields
List View Filters Cannot filter on probabilistically encrypted fields
Einstein Lead Scoring May be limited if Lead fields are encrypted
Duplicate Management Account/Contact Name encryption prevents duplicate detection
Web-to-Case Web fields (Company, Email, Name, Phone) are NOT encrypted at rest
Email Bounce Handling Does not support encrypted email addresses

AppExchange Compatibility

Not all AppExchange applications are Shield-compatible:

Important: Some apps aren't compatible with encryption and can prevent you from enabling Shield Platform Encryption. Always verify with vendors before implementing. Notable incompatibilities include certain features of Heroku, Thunder, and Quip integrations.

Storage Impact

Good news: Encrypting files, fields, and attachments does NOT affect your org's storage limits. The encrypted ciphertext storage is handled transparently.

8 Best Practices & Lessons Learned

Drawing from Salesforce's official best practices and real-world implementation experience, here are the key lessons learned.

Strategic Planning

Implementation Lessons

Lesson 1: Always test encryption in a full sandbox environment before enabling in production. This reveals impacts on custom Apex, formulas, and integrations that aren't obvious from documentation alone.
Lesson 2: Data will be encrypted after Shield is enabled, but existing data requires synchronization. Use the self-service Background Encryption from the Encryption Statistics page (available since Spring '19) - you can sync once every 7 days. For files and attachments, submit a Salesforce Support case.
Lesson 3: Review ALL Apex code that queries encrypted fields. Code using encrypted fields in WHERE clauses will fail if using probabilistic encryption. Fix violations before enabling encryption.

Security vs Functionality Balance

Understanding when Shield is the right solution:

Security Concern Right Solution
Protect data from internal Salesforce users Use OWD, Sharing Rules, Profiles, and FLS (NOT Shield)
Compliance requirements (HIPAA, GDPR, SOX) Shield Platform Encryption
Database-level security at data center Shield Platform Encryption
Hide data in UI with masking Classic Encryption or Field-Level Security

Key Management Lessons

9 Dos and Don'ts

DO These Things
  • Classify your data first Identify what's truly sensitive before encrypting anything
  • Test in sandbox extensively Test all integrations, reports, and Apex code before production
  • Verify AppExchange compatibility Contact vendors to confirm Shield readiness before enabling
  • Rotate keys every 120 days Maintain key hygiene for ongoing security
  • Backup tenant secrets Export and securely store keys before rotation
  • Use deterministic encryption for searchable fields Balance functionality with security needs
DON'T Do These Things
  • Encrypt everything Unnecessary encryption slows performance and affects UX
  • Give System Admins key management permissions Accidental deletion of tenant secret = permanent data loss
  • Enable in production without sandbox testing Encryption can break critical business processes unexpectedly
  • Use Shield for internal user access control Use profiles, permission sets, sharing rules, and FLS instead
  • Forget to encrypt existing data New data is auto-encrypted; existing data needs background sync
  • Use probabilistic encryption on searchable fields Probabilistic encryption prevents filtering and searching

10 Pricing & Licensing

Salesforce Shield pricing is unique - it's based on a percentage of your total Salesforce spend rather than per-user pricing. According to Salesforce's official Shield pricing page, the cost structure works as follows:

Pricing Structure

Component Pricing (% of Net Spend) What's Included
Platform Encryption 20% Field encryption, file encryption, BYOK support
Data Detect 15% Sensitive data identification and classification
Event Monitoring 10% User activity tracking, security analytics
Field Audit Trail 10% 10-year field history retention
Full Shield Bundle 30% All four components (Encryption, Event Monitoring, Field Audit Trail, Data Detect)

Cost Example

Based on analysis from UpperEdge's Salesforce Shield cost analysis:

Example Calculation: If you're spending $1,000,000/year on Sales Cloud and Service Cloud, and you purchase the full Shield bundle at 30%, you will pay an additional $300,000/year for Shield. For Platform Encryption alone at 20%, that would be $200,000/year.

Edition Availability

Salesforce Edition Shield Availability
Developer Edition Free (for testing and development)
Enterprise Edition Available as add-on subscription
Performance Edition Available as add-on subscription
Unlimited Edition Available as add-on subscription

11 Common Problems & Solutions

Based on community discussions and implementation experiences documented by Gearset's troubleshooting guide, here are the most frequently encountered Shield Platform Encryption problems and their solutions.

Problem 1: Deployment Succeeds but Encryption Fails

Symptom: Your deployment reports success, but the field encryption is not applied. You receive an email from Salesforce about an encryption failure after the deployment.

Root Cause: Salesforce executes the encryption compliance check asynchronously to the Metadata API deployment. The API reports success before the encryption compatibility check completes.

Solution:

Problem 2: SOQL Tests Fail with Deterministic Encryption

Symptom: After deploying encrypted fields with Apex classes, your SOQL queries mysteriously return no records, causing test failures.

Root Cause: Salesforce doesn't encrypt the field immediately upon Metadata API deployment. The encryption is applied later after compatibility checks. Meanwhile, your Apex tests run against non-encrypted fields, and queries on encrypted fields fail.

Solution:

1
Split Your Deployment

Deploy encrypted fields in the first package, then deploy Apex classes/tests separately

2
Wait for Encryption

Allow time for Salesforce to apply encryption before running tests

3
Run Tests Separately

Execute test classes after confirming encryption is active via Encryption Statistics

Problem 3: Process Builder Conflicts

Symptom: Deployment fails with error indicating Process Builder uses the encrypted field in an Update Records filter.

Root Cause: You cannot use encrypted fields in Process Builder Update Records filters. Even inactive versions in the target org cause conflicts.

Solution:

Problem 4: Third-Party App Incompatibility

Symptom: AppExchange packages fail or behave unexpectedly after enabling encryption. Some apps prevent enabling Shield entirely.

Root Cause: Not all AppExchange applications are Shield-compatible. Some apps directly query encrypted fields in ways that break with encryption enabled.

Solution:

Problem 5: System Propagation Delays

Symptom: After turning encryption on or off, the system reports inconsistent states. Fields show as encrypted when they're not, or vice versa.

Root Cause: The architecture behind platform encryption has propagation delays when toggling encryption on and off.

Solution:

Problem 6: SOQL WHERE Clause Violations

Symptom: Existing Apex code fails at runtime with errors about encrypted fields in WHERE clauses.
// This code FAILS with probabilistic encryption
List<Contact> contacts = [SELECT Id, Email FROM Contact WHERE Email = :searchEmail];

// Workaround: Use SOSL instead for search scenarios
List<List<SObject>> results = [FIND :searchEmail IN ALL FIELDS RETURNING Contact(Id, Email)];

// Alternative: Use deterministic encryption (if search is required)
// Configure field for deterministic encryption in Encryption Policy

Solution:

Problem 7: Existing Data Not Encrypted

Symptom: After enabling encryption, existing records still show unencrypted data in exports or backups.

Root Cause: Shield Platform Encryption only encrypts newly created and modified data. Existing data must be explicitly synchronized.

Solution:

Problem 8: Performance Degradation

Symptom: Page load times increase, reports run slower, and bulk operations take longer after enabling encryption.

Root Cause: Encryption/decryption operations add processing overhead, especially for frequently accessed fields or large data volumes.

Solution:

? Frequently Asked Questions

Salesforce Shield Platform Encryption is a security feature that natively encrypts sensitive data at rest using AES 256-bit encryption. It protects standard and custom fields, files, attachments, and Chatter data while maintaining application functionality like search, Flows, and validation rules. Unlike Classic Encryption, it offers BYOK (Bring Your Own Key) capabilities and works with formula fields and Flows.

Classic Encryption uses 128-bit AES and only encrypts custom text fields up to 175 characters with data masking capabilities. Shield Platform Encryption uses stronger 256-bit AES, encrypts both standard and custom fields, files, and attachments, and supports BYOK (Bring Your Own Key). Shield works with formulas and Flows, while Classic does not. Classic is free but exposes data in reports; Shield is paid but encrypts at all levels.

Shield Platform Encryption is priced at 20% of your net Salesforce spend when purchased standalone. Data Detect is 15%, Event Monitoring is 10%, and Field Audit Trail is 10%. The full Shield bundle costs 30% of net spend. For example, if you spend $500,000/year on Salesforce products, encryption alone would cost $100,000/year. It's available free in Developer Edition for testing purposes.

Yes, you can selectively encrypt specific standard and custom fields. You choose which fields to encrypt based on your data classification and compliance requirements. However, files and attachments follow an all-or-nothing approach - when the encryption policy is enabled, all files and attachments are encrypted. Chatter encryption also applies to all Chatter fields when enabled.

Key limitations include: encrypted fields cannot be used in SOQL WHERE or ORDER BY clauses (except with deterministic encryption for exact-match filtering), aggregate functions like MAX/MIN don't work, some AppExchange apps may not be compatible, duplicate management doesn't work with encrypted Account/Contact Names, and certain features like Einstein Lead Scoring may be limited when fields are encrypted.

12 Abbreviations & Glossary

Abbreviations & Glossary

Reference guide for technical terms and abbreviations used throughout this article.

AES - Advanced Encryption Standard
API - Application Programming Interface
BYOK - Bring Your Own Key
CEK - Content Encryption Key
DEK - Data Encryption Key
FLS - Field-Level Security
GDPR - General Data Protection Regulation
HIPAA - Health Insurance Portability and Accountability Act
IV - Initialization Vector
JWE - JSON Web Encryption
OWD - Organization-Wide Defaults
PCI-DSS - Payment Card Industry Data Security Standard
PII - Personally Identifiable Information
SOX - Sarbanes-Oxley Act
SOQL - Salesforce Object Query Language
SOSL - Salesforce Object Search Language
SSN - Social Security Number
UI - User Interface
Link copied to clipboard!
Previous Post
Ultimate Guide to Salesforce Energy & Utilities Cloud for Admins
Archives by Year
2026 2 2025 16 2024 2 2023 9 2022 8 2021 4 2020 18 2019 16 2018 21 2017 34 2016 44 2015 54 2014 30 2013 31 2012 46 2011 114 2010 162
Search Blog

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading