Masking Schemes¶
Masking schemes are a type of scheme that permanently transforms data in a one-way manner. Unlike encryption schemes that allow for decryption, masking schemes apply irreversible transformations to sensitive data.
What Are Masking Schemes?¶
Masking schemes operate by: - Permanently transforming sensitive data. - Making the original data unrecoverable. - Applying techniques like hashing, tokenization, or value replacement.
These schemes are particularly useful when you need to: - Completely anonymize data. - Create test datasets from production data. - Permanently redact sensitive information.
Common Masking Techniques¶
Hashing¶
Hashing uses mathematical algorithms (like SHA-256 or SHA-512) to transform data into a fixed-length string of characters that cannot be reversed to reveal the original input.
Example:
| Text Only | |
|---|---|
Partial Masking¶
Note
Partial Mask - Hide FirstandPartial Mask - Hide Firstfeatures are available from Privacera Self Managed release version9.2.10.1onwards.
Partial masking is a technique that allows selective masking of characters within data while preserving some portion of the original value. This approach is particularly useful when you need to maintain some data visibility while protecting sensitive portions.
Types of Partial Masking¶
-
Partial Mask - Show First: Shows only the first N characters of the data while masking the rest.
-
Partial Mask - Show Last: Shows only the last N characters of the data while masking the rest.
-
Partial Mask - Hide First: Masks the first N characters while showing the rest of the data.
-
Partial Mask - Hide Last: Masks the last N characters while showing the beginning of the data.
Tokenization¶
Tokenization replaces sensitive data with non-sensitive substitute values (tokens) that have no mathematical relationship to the original data. The mapping between original values and tokens is stored in a secure lookup table.
Literal Replacement¶
The LITERAL replacement is a special type of one-way transformation that provides a simple but effective method for permanently masking sensitive data.
What is LITERAL Replacement?¶
LITERAL replacement is a masking technique that replaces the specified data with the name of the tag associated with the data. For example, if a database field is tagged as PERSON_NAME, when an encryption transform is applied as LITERAL, the field's value is replaced with PERSON_NAME.
This means that regardless of the original data content, the transformed value will always be the tag name itself.
Key Characteristics¶
- Irreversible transformation: Using LITERAL means that the original data cannot be recovered.
- Consistent replacement: All values in a tagged field will be replaced with the same literal tag name.
- Simplicity: The approach is straightforward and requires minimal configuration.
Example¶
Original Data:
After LITERAL Transformation:
| Text Only | |
|---|---|
Use Cases¶
LITERAL replacement is particularly useful for:
- Development and Testing Environments: When you need to replace sensitive data with meaningful placeholders.
- Training Data: When you want to maintain the semantic meaning of fields without exposing actual values.
- Data Exports: When sharing data externally and you need to completely redact sensitive information.
- Data Anonymization: When you need a simple approach to anonymize data while preserving field context.
Considerations¶
- Since LITERAL replacement is one-way, it should only be used on data that does not need to be recovered in its original form.
- The transformed data loses statistical properties and variability of the original data.
- The transformation does not preserve referential integrity across tables or datasets.
Data Masking Techniques¶
The following table lists commonly used data masking techniques along with their descriptions and examples:
| Technique | Description | Example |
|---|---|---|
| Nullify | Completely removes the original string. Useful when the data is not required for processing or analysis. | somebody@BigCo.com → (null) |
| Redaction | Overwrites the original string with a masking character (default: x). Can be applied in two ways: - Without maintaining format/length - With maintaining format/length | Without maintaining format: somebody@BigCo.com → xxxxx With maintaining format: somebody@BigCo.com → xxxxxxxx@xxxxx.xxx |
| Hash | Converts the original data into a fixed-size non-reversible string using the SHA256 hashing algorithm. | somebody@BigCo.com → [hashed_value] |
| Partial Mask – Show First | Masks part of a string while revealing the initial few characters. The number of visible characters can be configured. | Show first 2 characters: somebody@BigCo.com → soxxxxxxxx@xxxxx.xxx |
| Partial Mask – Show Last | Masks part of a string while revealing the last few characters. The number of visible characters can be configured. | Show last 4 characters: somebody@BigCo.com → xxxxxxxxxx@xxxxo.com |
Creating Masking Schemes¶
To create a masking scheme in the Privacera Portal:
- From the navigation menu, select Encryption & Masking > Schemes.
- Click ADD SCHEME.
- In the Scheme Type drop-down, select Masking.
-
Enter the following details:
- Name: Provide a name for the scheme.
- Description(optional): Add a description for the scheme.
- Format type: Choose the masking format type. Refer to Supported Formats and Algorithms.
-
Choose Masking Technique: Select a technique from Data Masking Techniques.
-
If you select Redaction, configure the following in Redaction Settings:
- Masking Character: Enter a masking character or use the default
x. - Maintain original formatting and length: Enable this option to preserve the format and length.
- Masking Character: Enter a masking character or use the default
-
If you select Partial Mask - Show First/Last, configure the following in PARTIAL MASK SETTINGS:
- Show First Character Length or Show Last Character Length: Specify the number of characters to reveal.
-
-
Click SAVE.
Use Cases for Masking¶
| Requirement | Masking Approach |
|---|---|
| Development/Testing | Replace production data with masked versions while maintaining referential integrity. |
| Data Analytics | Hash personally identifiable information while preserving data relationships. |
| Data Sharing | Share data with third parties with sensitive fields permanently masked. |
| Compliance | Permanently transform data that should never be viewable in its original form. |
- Prev topic: Presentation Schemes
- Next topic: Scheme Policies