Shield Platform Encryption offers several types of encryption. Users never see encrypted data because it is encrypted immediately prior to database insertion and decrypted immediately following a database query.
- Probabilistic Encryption: Offers randomized encryption of data, where the same plaintext input does not always produce the same ciphertext output. This randomness enhances security but makes searching and querying encrypted data more challenging compared to deterministic encryption.
- Format Preserving Encryption (FPE): Preserves the format or structure of the original plaintext data while encrypting it. For example, a 16-digit credit card number would still be a 16-digit encrypted value. This is useful when encryption and decryption need to maintain data format requirements.
- Deterministic Encryption: Provides consistent encryption of data, ensuring that the same plaintext input always results in the same ciphertext output. This type of encryption is useful for searching and querying encrypted data while preserving the ability to perform equality and inequality comparisons.
- Case-Sensitive Deterministic Encryption: A variant of deterministic encryption that considers case sensitivity in the encryption process. It ensures that “abc” and “ABC” will encrypt differently, providing case-sensitive encryption for fields like names or codes.
- Case-Insensitive Deterministic Encryption: Similar to case-sensitive deterministic encryption but disregards case sensitivity during encryption. “abc” and “ABC” would encrypt to the same ciphertext, allowing for case-insensitive searches and comparisons.
These encryption types offer varying levels of security and functionality, allowing organizations to choose the most suitable encryption approach based on their specific requirements and use cases.
Below are the considerations that apply to data encrypted with Shield Platform Encryption’s deterministic encryption scheme. Some considerations manifest differently depending on whether data is encrypted with the case-sensitive or case-insensitive deterministic encryption scheme.
- Key Rotation and Filter Availability:
- Synchronize data when rotating key material or changing encryption schemes.
- Without syncing, filtering and queries on unique attributes may be inaccurate.
Example: Update existing data to apply new encryption schemes using the Encryption Statistics and Data Sync page in Setup.
- Available Fields and Other Data:
- Custom URL, email, phone, text, and text area fields support deterministic encryption.
- Not available for certain data types like date, Chatter, files, and attachments.
- Filter Operators:
- Limited operators are supported, such as “equals” and “not equal to.”
- Unsupported operators like “contains” or “starts with” don’t return exact matches.
- Formulas:
- Fields encrypted with deterministic encryption can’t be referenced in SOQL WHERE queries.
Example: Unable to use encrypted fields in WHERE clauses for database queries.
- Case Sensitivity:
- Results are case-sensitive with case-sensitive deterministic encryption.
Example: “Jones” is distinct from “jones” or “JONES” in encrypted queries.
- Custom Field Allocations:
- Case-insensitive queries require storing lowercase duplicates, impacting custom field counts.
- API Options to Identify Filterable Fields:
- Use isFilterable() method to determine encryption scheme of a field.
- External ID:
- Supports Text and Email external ID custom fields for certain encryption schemes.
- Compound Fields:
- Searches may not work for concatenated values with case-sensitive encryption.
Example: Querying encrypted compound names like “William Jones.”
- Filter Records by Strings:
- Commas in strings act as OR statements.
Example: Using quotation marks to search for strings containing commas.
- SOQL GROUP BY, LIKE, STARTS WITH, ORDER BY Statements:
- Limited support or not supported for certain operations with deterministic encryption.
Example: Inability to use GROUP BY or LIKE statements with encrypted data.
- Indexes:
- Support for different types of indexes varies based on encryption scheme.
Example: Using single-column indexes with case-sensitive deterministic encryption.
- Next Best Action Recommendations:
- Load conditions only support equals or not equals operators with encrypted fields.
Example: Configuring recommendation systems with supported operators.
- Chat:
- Case-sensitive encryption recommended for certain fields in chat systems.
Example: Encrypting actor names for privacy in chat conversations.
- Converting Account and Contact Records to Person Accounts:
- Data synchronization required after conversion to maintain filtering capabilities.
References:
https://help.salesforce.com/s/articleView?id=sf.security_pe_formulas.htm&type=5
https://help.salesforce.com/s/articleView?id=sf.security_pe_deterministic_considerations.htm&type=5