IRI Blog Articles

Diving Deeper into Data Management



Data Masking: Masking Social Security and other National IDs

by Rob Howard

Data masking is one method to combat the nearly 72,000 documented breaches of personally identifiable information (PII) that occur every day. With data privacy breaches still at unacceptably high levels, how can companies protect PII such as their national ID numbers across their myriad sources of data?

IRI’s data masking solutions are delivered in the FieldShield product. FieldShield is a uniquely powerful data-centric security tool that shields fields in ODBC-connected database tables and most (very large) flat file formats. FieldShield allows compliance teams and DBAs to choose a specific data privacy function for each field, based on potential recipients and each field’s need for security, realism, and recoverability.

If the column value needs to be secured now but recovered later, an encryption routine makes sense. If the value is numeric and needs to look real, a FieldShield user could choose a format-preserving encryption algorithm. If the field were a person’s name, a pseudonym function would work better. However, if the data need to be totally secure and not recovered, then masking all, or part of that field with characters like a* or x would be more appropriate.

In the United States, it is common to see the ‘x’ data masking character for social security and credit card numbers.  The IRI Workbench GUI for FieldShield offers pre-defined masks for multiple national ID numbers, credit card numbers (12 digits), and whole-field redaction where all field digits are replaced.

FieldShield users can also customize their data masking behavior using offset values, offset lengths, and desired data masking characters. Consider the following input sample, where the third field may be a national identification card number:


That third field, called ID_CODE, could be masked as shown in this FieldShield dialog editor for data masking:

Here is an output sample with data masking applied:


While social security and credit card number masking have been the most common requirements that IRI is called to address, FieldShield also supports data masking functions for other national ID numbers in their native formats:

NID Data Masking

We invite our customers and resellers outside the United States to suggest or request the development of more pre-defined masks that satisfy either national ID formats or specific business needs. Any data privacy masks we create can be added to our library and included in the IRI Workbench for front-end selection.

Leave a comment below, or contact us at

Print Friendly

{ 2 comments… read them below or add one }

Sunil November 21, 2017 at 7:31 am

For security purposes, no one should store SSNs in text format in DBs (they should encrypt it). While masking you don’t have real SSN’s but the encrypted ones. You don’t want to decrypt it but to replace them with a random number ranging from 111111111, 999999999 and decrypt it back. Can we include this scenario?


David Friedland December 1, 2017 at 4:35 pm

This article demonstrates a still too-common plaintext scenario that IRI software users can address through a masking technique like partial or whole-field redaction. Typically randomization of that kind (generation alone) cannot be restored, but you could use randomization and then a pseudonymization process whereby a restore set exists to auto-recover the associated original values from the new real-random pairs. Contact for help with your use case.


Leave a Comment

Previous post:

Next post: