Skip to main content

Modification Detection Code (MDC)

Files encrypted by PGP or GPG include a Modification Detection Code (MDC) that confirms the integrity of the file.

In current versions of PGP and GPG (version 7 onwards), the MDC is included by default. Older versions (version 6 and earlier) did not include the MDC by default, but allowed it to be optionally added.

MDC Errors

When Files.com decrypts a PGP or GPG encrypted file that does not include the MDC, the logs and site alert emails show one of the following errors:

File is gpg encrypted but is missing modification detection code (MDC): path/to/folder/encrypted_file.txt.pgp

nomdc_with_legacy_cipher

The nomdc_with_legacy_cipher error appears when a file is encrypted with a legacy cipher algorithm such as CAST5, which modern GnuPG flags as missing MDC protection.

Both errors mean that the integrity of the file cannot be cryptographically confirmed.

Accepting Files Without MDC

The missing MDC is not necessarily an indication that a file was tampered with. It can reflect a limitation of the counterparty's encryption tools: their system runs GPG version 6 or earlier, or uses legacy cipher algorithms like CAST5 that predate MDC.

In those cases, bypassing the integrity check is a deliberate and supported configuration. Files.com lets you accept these files to keep transacting with a legacy counterparty while they work toward a system upgrade. The tradeoff is that you are trusting the transport layer rather than a cryptographic check on the file contents.

Bypassing the MDC Check for Automated Folder Decryption

Files.com's folder-level GPG decryption runs automatically on files as they are uploaded. The Ignore MDC integrity check option controls whether that automated decryption proceeds when an uploaded file is missing an MDC.

With the option enabled, files uploaded to that folder are decrypted even when MDC is absent. The MDC error is still recorded in the logs and site alert emails, but it does not block decryption.

Requesting an Upgrade from Your Counterparty

If your counterparty uses GPG to encrypt files, ask them to use version 7 or later, which includes the MDC by default. With older GPG versions, they can pass the --force-mdc flag to enforce MDC inclusion.