Open In App
Related Articles

What is Data Masking?

Improve Article
Save Article
Like Article

Data masking is a very important concept to keep data safe from any breaches. Especially, for big organizations that contain heaps of sensitive data that can be easily compromised. Details like credit card information, phone numbers, house addresses are highly vulnerable information that must be protected. To understand data masking better we first need to know what computer networks are.

What are computer networks?

A computer network is a coordinated system of computers that share resources. These resources are provided by a redistribution point or endpoint called a network node. The computers use common communication protocols over digital interconnections to communicate with each other. Computer networks are an integral part of telecommunication systems. The connections can consist of telecommunication network technologies that are based on physically wired, optical, and wireless radio-frequency methods.

Computer networks and Network Security  

Network security consists of many layers and an attack can happen in any one of these layers. These networks usually consist of three controls

  • Physical network security  
  • Technical network security
  • Administrative network security  

Physical network security: this is designed to keep the system network safe from unauthorized personnel from breaking into the network components that include OUI, Fiber optic cable, etc.,

Technical network security: this protects the data that is stored in the network or which is transmitted throughout it.  It ensures no one gets away with any unauthorized activities apart from the user themself.

Administrative network security:  this includes all the policies and procedures that need to be followed by the authorized users for other personnel.  

Data masking:

Data masking means creating an exact replica of pre-existing data in order to keep the original data safe and secure from any safety breaches. Various data masking software is being created so organizations can use them to keep their data safe. That is how important it is to emphasize data masking.

Types of data masking

There are various types of data masking. Some of them are given below

  •  Static data masking(SDM): Static data masking works at a state of rest by altering the data thereby, permanently replacing sensitive data. It helps an organization to create a clean and nearly breaches free copy of their database. SDM is commonly used for development and data testing.  

static  data masking takes place at the state of rest

  • Dynamic data masking(DDM): Just like the name suggests, dynamic data masking alters the data simultaneously or while the data transfer is taking place. With DDM you can do full masking and partial masking as well. A random mask option is also present for numeric data.

Dynamic data masking takes place at the time of data commute

  • Deterministic data masking: How deterministic data masking works is, it replaces a value in a column of a given table with a similar value present in the very same row. This can be done in various formats for example., substitute format.
  • On-the-fly data masking: In this type of data masking the data is transferred from one place to another without having anything to do with the disk while commuting. It is similar to dynamic data masking except this is done with one value at a time.

On fly data masking masks data one record at a time


Data masking can be done using the following techniques

  •  Substitution: The substitution method is considered one of the most efficient and reliable techniques, to achieve the desired result. In the method, any sensitive information that needs to be protected should be substituted with a fake yet realistic-looking value. Only the person with authorized access to the system will be able to look under the masked values.
    • Pros: Makes the data look as realistic as possible
    • Cons: Not applicable when dealing with large amounts of data that are unrelated
  • Before Substitution:
Participant Name Problem Type Score
Alena Hard 45.33
Rory Hard 33.21
Miguel Easy 20
Samara Medium 37.2
  • After Substitution :
Participant Name Problem Type Score
Alena Hard 30.22
Rory Hard 40.9
Miguel Easy 50
Samara Medium 46.24
  • Averaging: This method can be used in the case of numeric data. Instead of showing individual numeric data, you can replace the value in all cells with a collective average of all the values in the column. For example, if you have student details and you don’t want other students to see the total number of marks other students have got then you can change the data by averaging the marks of all the students and replacing it with the average in the column.
Participant Name Problem Type Score
Alena Hard 41.84
Rory Hard 41.84
Miguel Easy 41.84
Samara Medium 41.84
  • Shuffling: Shuffling and averaging are similar techniques so to say but there’s a difference that sets them apart. instead of replacing all the values in the column, you can simply shuffle the values around. With this nobody can tell which value belongs to which dataset because they will be in different locations.
    • Pros: Deals with large amounts of data efficiently while keeping the data as realistic as possible.
    • Cons: Can be undone easily if the data set is relatively small.
  • Before Shuffling:
Participant Name Problem Type Score
Alena Hard 45.33
Rory Hard 33.21
Miguel Easy 20
Samara Medium 37.2
  • After Shuffling:
Participant Name Problem Type Score
Alena Hard 50
Rory Hard 46.24
Miguel Easy 30.22
Samara Medium 40.9
  • Encryption: Encryption is a very common concept in cyber security and cryptography. It is achieved by completely changing the sensitive dataset in an unreadable form. What this does is ensures that no one gets to know what type of data or even what data is being represented. Only personnel who have access to the encryption key will be able to see the data.
    • Pros: Masks the data effectively  
    • Cons: Anyone with the encryption key can easily get access to the data. Also, anyone who knows cryptography and decrypts the data with enough effort.

  • Nulling out or deletion: Nulling out is exactly what the name suggests you delete the values in a column by replacing them with NULL values. This is a very effective method to eliminate showing any sensitive information in a test environment.  
    • Pros: Very useful in situations where data is not essential
    • Cons: Not applicable in test environments.  
Participant Name Problem Type Score
Alena Hard  NULL
Rory Hard NULL
Miguel Easy  NULL
Samara Medium NULL
  • Redaction Method: In this method, you can replace the sensitive information with the same unique code or a generic value for the entirety of the column.  
    • Pros: Difficult to make out what the data can be therefore making the data more secure.
    • Cons: this method should only be used when the values are not being used for development or QA purposes.
Participant Name Problem Type Score
Samara Medium XXXXXXXXXX
  • Date Aging: If you have dates in your data set that you don’t want to reveal then you can set the dates a little back or forth than what actually is given. For example, if you have a date set to 20-8-21 then you can set the date to 300 days back that is 01-02-21. This can also be done with any kind of numeric data. Make sure that the data in a column or row is aged to a definite number or similar algorithm
    • Pros: Easy to remember the algorithm and effective masking of information  
    • Cons: Only appropriate for numeric data.
  • Original Data Set:
Participant Name Problem Type Score
Alena Hard 30.22
Rory Hard 40.9
Miguel Easy 50
Samara Medium  46.24
  • Mask data set by adding 45 to all the elements of the row:
Participant Name Problem Type Score
Alena Hard 30.22
Rory  Hard 40.9
Miguel Easy  50
Samara Medium  46.24

Applications of data masking:

There is a myriad of applications of data masking, especially in information security. Some of them are:

  • Auditing: In auditing, you need to keep track of and maintain the accuracy of all the data given by an organization or some other source. Naturally, it is important to keep the data safe and secure which can be achieved by data masking.
  • Access Control: Making sure that only authorized personnel gets to access any sensitive data and modify them is known as access control. Data masking plays a vital role in access control as it can cover up for any mishaps that may indefinitely happen and prevent major damage.
  • Cryptography: As discussed earlier in the techniques section, there is a technique called encryption. Encryption is a method used in cryptography to hide sensitive data. Hence, data masking is an important concept to know in order to pursue cryptography.

Types of data that can be masked:  

Any type of data can be masked. Here are some examples:

  • Personal Information: Personal information is the most sensitive information out there. It is important for personal information to be masked be it in a professional setting or personal setting.  Vulnerable personal information is always a threat to safety.
  • Financial Data: It is important for an organization to keep its financial data safe. Important and sensitive information like transactions, profit, and loss statements, and other information is very dangerous to be disclosed in a test environment.

Benefits of data masking:

Data masking provides a solution to a myriad of cyber security problems. Therefore, data masking comes with many benefits. Some of them are:

  • Data Masking is highly effective in securing data breaches.
  • It does not allow hijackers to easily hack into your system.
  • Insiders cannot use data in a vitriolic way if the data is masked.
  • Secures any vulnerable interfaces.
  • It is very cost-effective unlike other methods of information security.
  • Data can be shared with authorized personnel without feeling any threat to your security.

Challenges of data masking:

There are certain challenges that can be encountered whilst attempting data masking. One such challenge is that you will need to mask the data in a way that it doesn’t lose its original identity to authorized personnel while being masked enough for cybercriminals to not be able to breach the original data. This in theory might seem rather simple but the practical implementation is fairly tricky.

Data masking should also be able to mask the data without actually modifying the data or the application itself. The integrity of data should also be maintained while masking. The masking system should be able to follow the parameters set by the database and not override those set parameter

Data masking is a very important concept that needs to be implemented in every organization. Soon enough data masking will not only be a concept for institutions but also be available to the common public to keep their information safe in cyberspace. This emphasizes the importance of learning data masking techniques in order to imply them in your everyday data. Safety starts at home.

Unlock the Power of Placement Preparation!
Feeling lost in OS, DBMS, CN, SQL, and DSA chaos? Our Complete Interview Preparation Course is the ultimate guide to conquer placements. Trusted by over 100,000+ geeks, this course is your roadmap to interview triumph.
Ready to dive in? Explore our Free Demo Content and join our Complete Interview Preparation course.

Last Updated : 22 Sep, 2021
Like Article
Save Article
Similar Reads
Complete Tutorials