File integrity verification methods

File integrity is an essential component of information security, especially in the context of document management platforms, where data accuracy and reliability are fundamental. Ensuring that a file has not been altered or corrupted, whether through accidental errors or malicious intervention, is vital to maintaining trust in any document management system and keeping it operational. In this article, we explore the most effective file integrity verification methods and analyse their applications, benefits and limitations. Moreover, as cyber threats become increasingly sophisticated, understanding and implementing these techniques is crucial to protect an organisation’s digital assets and ensure that documents retain their authenticity over time.

 

What file integrity means

File integrity refers to the assurance that a file remains unchanged from the moment it was created or approved. Any unauthorised or accidental modification of a file can compromise its integrity. This can have serious consequences, especially in business environments where documents are frequently shared, stored and used as the basis for important decisions.

Verifying file integrity involves using specific methods to ensure that the content of a file remains unchanged. These methods are often based on cryptographic algorithms that generate a unique “digest” of the original file. Therefore, any change to the file will result in a different digest, flagging a possible breach of integrity.

 

Common file integrity verification methods

There are several methods for verifying file integrity, each with its own characteristics and applications. The most common methods are as follows:

Checksums

One of the simplest methods for verifying file integrity is to use checksums. A checksum is a numerical value calculated from a file’s data using a specific algorithm, such as CRC32 (Cyclic Redundancy Check).

Cryptographic hashes

Cryptographic hashes are another popular and more robust method of integrity verification. For example, many organisations use algorithms such as SHA-256 to generate a unique hash (digest) of a file.

Digital signatures

Digital signatures are a more advanced method that combines asymmetric cryptography with hashing to guarantee both the integrity and the authenticity of a file.

 

Integrity verification tools

Several tools are available that automate the file integrity verification process, and many of them combine multiple verification methods. Some of the most widely used include:

Tripwire

An open source tool that monitors critical system files and directories and raises alerts when they change. It uses cryptographic hashes to verify file integrity.

AIDE (Advanced Intrusion Detection Environment)

Similar to Tripwire, AIDE creates a database of file states based on cryptographic hashes and compares it with the current state of the files to detect changes.

FCIV (File Checksum Integrity Verifier)

An older Microsoft tool that has now been discontinued. On Windows, the recommended options are the PowerShell Get-FileHash command or certutil.

These tools are particularly useful in large business environments, where verifying file integrity manually would be impractical.

 

Implementing integrity verification in document management platforms

Integrating integrity verification methods into document management platforms is essential to ensure the security and reliability of stored documents. For effective implementation, organisations should follow a few recommended practices:

Integrity verification policies

Define clear policies specifying how and when files should be checked to ensure their integrity. In addition, the company should build these policies into its document management practices and apply them consistently.

Process automation

Use integrity verification tools that integrate directly with the document management platform. In this way, verification runs automatically, which reduces the risk of human error and ensures continuous monitoring.

Employee training and awareness

Make sure that all employees who use the platform understand the importance of integrity verification and know how to interpret the results of the checks. For this reason, ongoing training is essential to maintain a robust security posture.

Regular monitoring and audits

Carry out regular audits to ensure that integrity verification systems are working correctly and that everyone follows the defined policies. Furthermore, continuous monitoring makes it possible to identify and quickly resolve any problems that may arise.

 

How to check a hash in practice

Verifying a file’s integrity does not require complex tools. Today’s operating systems include commands that calculate the SHA-256 hash in seconds:

SystemCommand
Windows (PowerShell)Get-FileHash file.pdf -Algorithm SHA256
Windows (command prompt)certutil -hashfile file.pdf SHA256
Linuxsha256sum file.pdf
macOSshasum -a 256 file.pdf

Next, simply compare the value obtained with the reference value. If they match, the file has not been altered. However, MD5 and SHA-1 should no longer be used for documents with legal value, because they are vulnerable to collisions.

 

Checking signed PDF documents

Many certificates, declarations and reports arrive as digitally signed PDFs. In these cases, the PDF reader itself shows whether the signature is valid and whether the document was altered after signing. Validators should therefore open the signatures panel and confirm three points: the identity of the signer, the validity of the certificate and the absence of later changes.

 

Practical example: A batch of scanned documents

Consider a company that receives a batch of 500 scanned documents from a partner for archiving. To make sure nothing is lost or altered in transfer, the partner also sends a list with the SHA-256 hash of each file.

On arrival, a small script calculates the hashes of all the files and compares them with the list. Two files do not match, because they were corrupted during the transfer. The company then asks for only those files to be resent. In this way, it ensures that the final archive matches the original exactly.

 

Choosing the right method for each situation

Each verification method meets a different need. The choice should therefore take into account the purpose and value of the document:

SituationRecommended method
Detect accidental corruption in copies or backupsChecksum or SHA-256 hash
Confirm that a file was not altered during a transferSHA-256 hash sent through a separate channel
Prove the origin and integrity of a documentDigital signature
Prove that a document existed on a given dateQualified timestamp
Monitor critical files on a serverIntegrity monitoring tools

As a result, the organisation applies the right level of protection without complicating processes that do not need it. It can also explain to auditors why it chose each method.

 

Integrity over time

Integrity is not only checked at the moment of upload. Archived documents may be kept for many years, migrated between systems and restored from backups. It is therefore advisable to repeat the check periodically and whenever there is a migration. This way, the organisation detects any degradation early and can recover the correct version while it still exists.

 

Common integrity verification mistakes

The most frequent mistake is storing the reference hash in the same location as the file. If an attacker alters the file, they can also alter the hash, and the check loses its value. For this reason, reference values should be kept in a protected location or be signed. Another common mistake is calculating hashes without ever checking them again. In addition, many organisations still use MD5 out of habit, even for documents with legal value. Finally, the procedure is often not documented, which prevents other people from repeating the check.

 

Frequently asked questions

Does a hash guarantee that a document is genuine?

No. A hash only guarantees that the file has not been altered since the hash was calculated. To confirm its origin, a digital signature or another form of authentication is required.

Do document management platforms calculate hashes automatically?

Many platforms do so internally to detect duplicates and ensure integrity. Even so, it is worth confirming with the supplier which algorithm is used and whether the logs can be exported.

How often should archive integrity be checked?

For documents with legal value, a periodic automatic check is recommended, for example once a year, as well as whenever there are migrations or restores. This way, any problem is detected while correct copies still exist.

 

Conclusion

File integrity verification is an essential practice for protecting data stored on document management platforms. Using methods such as checksums, cryptographic hashes and digital signatures, combined with monitoring tools, ensures that files remain intact and free from unauthorised changes.

By implementing these practices effectively, organisations can not only protect their digital assets against threats but also ensure compliance with information security standards and regulations. In short, in an environment where trust in data is vital, file integrity verification should be a top priority for anyone managing document management platforms.

Read also: Data integrity in document management platforms and File integrity in document management platforms.

For European recommendations on information security, see ENISA.

We don’t just implement platforms. We make sure they work.

Talk to the AISP team about implementation, administration and ongoing support for your operation after go-live, in any country, from administration centres in Portugal.