Monday, April 10, 2023

MD5 Reminder

In our digital age, it has become increasingly important to protect our personal data and information from accidental loss, malicious individuals and cyber threats. Photos can hold a lot of sentimental value and unsuspected personal information. A simple way to ensure the integrity of our photos is by creating an MD5 hash code.

An MD5 hash code is a one-way encryption that produces a fixed-length string of characters that is unique to the photo, and supposedly a unique identifier. By checking an MD5 hash code for your photos, you can verify that the photo has not been tampered with or altered in any way.

My heart sank recently when I realised I had a significant difference in the archived directories and files saved during 2010. I have been using a couple of repurposed old harddisk, standing in for one set of my photo archives, and alas they are showing signs of aging, and probably slow failure. Maybe I’ve been backing up a corrupted or damaged digital photo set. I hadn’t even gone looking for photo there for a while.

Yet it wasn’t time to panic, I had actually gone back and generated an MD5 hash code list for each directory of files (one list per monthly directory) back in 2017. Despite having three versions of the archives (one possibly suspect) and significant differences in files, these MD5 directory lists were largely the same and when checked identified the missing files. Fortunately, there was always one version of these missing files, sometimes in a different directory,  and on checking they were photos I didn’t want to keep (out of focus, almost duplicate shots, overexposed etc.). There were just three photos in the end that may have gone astray. Trying to do this by visually browsing the pictorial version of the photos amongst such a large group of files would have been very difficult, if not almost impossible. So phew…

I didn’t find any corrupted files looking through the photos or the MD5 Checks but I am confident the hash code will identify such damaged files, but avoid overwriting older undamaged versions and unknowingly backing them up. I can breathe easy now...

PS Another advantage of creating an MD5 hash codes for photos is that it provides a way to detect if the photo has been tampered with or modified. For example a hacker might encrypt the photo in order to send you a ransome, the MD5 hash code will change, indicating that the photo has been altered. To beat the hacker you should already have a viable backup, but you will be able to avoid unknowingly backup his altered file(s) and could ignore his ransome request. 

No comments: