Data integrity ensures stored and transmitted information remains accurate, complete, and unchanged. This content covers key integrity-checking methods including data mirroring, parity bits, and cryptographic hashing.
Data Integrity
These 3 and 1/2 inch floppies store little magnetic signals on them that can actually become corrupt. That is, if you didn't treat these right, then it could cause problems. I remember many times I would just shove them in my book bag back in school, and then they would become corrupt and then I couldn't use or access the data that's on them.
This is problematic. Can you imagine if we had data on our drives and it just started flipping and changing? Well, that actually does happen, and we need some sort of way to check to see if something has become corrupt, if we're getting the wrong data, if it's changed at all. So we call that integrity.
Can you imagine if data just started changing on you? The fact is that storage, and some storage is worse than others, is not perfect. Same thing with transmitting data: it's not perfect. Can you imagine, let's say your bank balance just starts changing numbers? That's obviously problematic. And so we want a certain amount of integrity, making sure that the data is accurate, complete, consistent and valid.
There's a lot of different ways that we can maintain integrity. We're just going to cover a few examples in here, and really these examples boil down to either identifying when there is a problem, when there is a lack of integrity, or there's some technologies that can actually correct when there is some sort of corruption of the data.
One method of checking integrity is just make a copy of the data. If we make a copy of a file that resides in two different places, then we just check the two copies, and if they match we have integrity. If they don't, then there's a problem here. Now, one problem with this is that we're storing twice as much information than we need to.
One way that we can reduce the amount of information that we store but still have an integrity check is by using something called a parity bit. A parity bit just uses an extra bit for a block of data.
So for instance, right here, let's say we have one byte, eight bits of information, and what we're going to do is either choose a zero or one to make the addition of all this come out to an even or odd number of ones. In this scenario right here we're going to go with even, which is a little more common, so we're going to say that the answer must be even.
Well, what does that mean? We have 1, 2, 3, 4, five bits over here, five ones, which is an odd number, and so we need to either add a zero or one to make it an even number. In this case right here we have to add a one to make it six. Six is even. So now what we've done is a little check to make sure that this is accurate.
If any one of these were to flip, and let's say this number ends up being a one, something happens and the integrity is compromised and it flips to be a one, now we have six over here plus 1, which is seven, which is an odd number, and now we know something is wrong with our data.
A hash creates a fingerprint of data that allows us to check to make sure that that data has not changed. Essentially what happens is we have a hashing algorithm. This is a process that data goes through to create a unique fingerprint. That unique fingerprint looks like ones and zeros, or in this case right here some hexadecimal numbers. It doesn't really matter what this fingerprint looks like on here, but the point is whatever data we put into the hashing algorithm creates a very unique outcome, a very unique fingerprint there. And if we were to change just a little bit of data, just maybe even a bit of data, we would get an entirely different fingerprint on the other side.
The way we use hashing algorithms to do an integrity check is we grab a fingerprint of a set of data. Now, what we can go do, if we want to ever check this data, is that we can put it back into the hashing algorithm to get the fingerprint and compare it against the fingerprint we already have. By doing this, we can verify that the data is correct. Come up with a different fingerprint and we know that the data is incorrect. This is actually how blockchain and cryptocurrency, it's a key part on how those work.
So what we covered really is to identify when there are integrity issues, and then we need to take some sort of corrective action. There's ways that we can take corrective action depending on what kind of data ition there is, how it's being stored, how it's being transmitted, however the case may be.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →