Skip to main content
Delphix

FAQ: Masking Algorithms (KBA4212)

 

KBA

KBA# 4212

 

How to mask a Credit Card?

There is an Out-of-the-Box algorithm for this, which will mask a Credit Card number with a random valid Credit Card number. If the requirements are Referential Integrity and 1:1 mapping or specific Credit Card numbers are needed - the create an algorithm using Secure Lookup or Mapping Algorithm.

Answer

 

Below are three different methods presented for masking a Credit Card:

  Option 1 Option 2 Option 3
Algorithm Credit Card Algorithm Secure Lookup Algorithm     Mapping Algorithm
Masking
Properties:
Ref.Int: No
Mapping: Random
Ref.Int: Yes
Mapping: No
Ref.Int: Yes
Mapping: Yes
Engine Sync: n/a (OotB) Yes No
Pool Size: Unlimited < 500,000 < 5,000,000
Pros: Fast, valid credit card numbers, Out-of-the-Box, very secure. User-defined. Set and forget. Synable.  User-defined. Mapping unique.  
Cons:  Random. Not suitable for a large pool of values to mask. Mapping not unique. Not suitable for a large pool of values to mask. Slower load time. Require maintenance. Not syncable. 
Procedure:  Steps:
  1. Set the algorithm to Credit Card.
Steps: 
  1. Create a file with Credit Card numbers. 
  2. Create Secure Lookup Algorithm.
  3. Upload the file.
  4. Name the algorithm and Save.
  5. Set the algorithm to algorithm just created.
Steps:
  1. Create a file with Credit Card numbers. 
  2. Create Secure Lookup Algorithm.
  3. Upload the file.
  4. Name the algorithm and Save.
  5. Set the algorithm to algorithm just created.
More info: Credit Card (KBA4068) Secure Lookup (KBA1243) Mapping Algorithm (KBA1328)

How to redact a Credit Card?

The easiest way to redact a Credit Card number is to redact a select part of the numbers to a number, say '5'. 

Examples

+----+---------------------+---------------------+
| ID | Orig                | Mask                |
+----+---------------------+---------------------+
| 1  | 3088 0000 0000 0009 | 3088 5555 5555 5555 |
| 2  | 5500-0001-3227-3057 | 5500-5555-5555-5555 |
| 3  | 5500000132273057    | 5500555555555555    |
| 4  | 6011000089940682    | 6011555555555555    |
| 5  | 3088000886065290    | 3088555555555555    |
| 6  | 340000151134979     | 340055555555555     |
| 7  | 30000723589523      | 30005555555555      |
+----+---------------------+---------------------+

Answer 

To create an algorithm that redacts a Credit Card number:

This algorithm uses Number in two segments to improve performance and Alpha-Numeric in the last segment to handle different Credit Card length. 

  1. Create a new Segment Mapping algorithm. 
  2. Define 3 Segments:
    • Segment 1: Numeric, 4 digits, Masked Values: Min: '5555', Max: '5555'.
    • Segment 2: Numeric, 4 digits, Masked Values: Min: '5555', Max: '5555'.
    • Segment 3: Alpha-Numeric: 4 chars: Range # '5' (in each sub segment). 
  3. Ignore Characters: "-, " (add as needed, don't add the quotes).
  4. Preserve Original Values: Starting Position 1: Length 4.

 

 


Related Articles