Troubleshooting GPG
GPG processing requires a usable key and a file within the supported size limit. Use the reported error to distinguish a processing failure from a key import problem, then check the key's expiration, passphrase, and matching public and private portions as applicable.
GPG Key is Expired
Files.com rejects expired GPG/PGP keys for encryption, signing, and decryption, including when a file was encrypted before the key expired. An expired subkey also prevents processing. Renew the key and import the updated key material before retrying. Renewing the matching private key preserves the ability to decrypt files encrypted before it expired.
File Too Large
Files larger than the 10 GB GPG limit exceed the supported size for encryption or decryption. The limit controls the CPU capacity required to process an individual file. If your workflow requires larger files, contact Files.com Support to discuss the workload and capacity needed to raise the limit.
Modification Detection Code (MDC)
A Modification Detection Code (MDC) lets the decrypting tool check the integrity of encrypted content. Older files can lack this protection; GnuPG documents the compatibility option for decrypting them without the check.
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 produces an older encrypted format without MDC, including files associated with a legacy cipher such as CAST5.
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
Ask the counterparty to update its encryption software or settings so new deliveries include file-content integrity protection. Confirm the format is compatible with Files.com before changing a recurring delivery, then remove the bypass when it is no longer needed.
Key Import Errors
The most common errors come from importing GPG keys incorrectly.
Key Has Expired
An import error message of contains an invalid public key: key has expired means Files.com rejected the public key because it is expired. Ask its provider for an unexpired key or an updated copy with an extended expiration date.
An import error message of contains an invalid private key: key has expired means Files.com rejected the private key because it is expired. Extend the expiration date and import the updated key. Renew the same private key when you need to decrypt files encrypted to its matching public key.
Password is Missing
The contains an invalid private key: Private key password is missing error message means the private key requires a password (passphrase) and one was not provided.
Provide the password (passphrase) that was used to protect the private key.
Incorrect Private Key Password
The contains an invalid private key: Incorrect private key password error message means the password (passphrase) provided does not match the one used to protect the private key.
Provide the correct password (passphrase) that was used to protect the private key.
Password Not Required
The contains an invalid private key: Password present but private key does not require one error message means the private key does not require a password (passphrase), but one was provided.
Remove the password (passphrase) from the input form and retry the import.
Key Mismatch
When importing a key pair, the fingerprints of the public and private keys must match. If the fingerprints don't match, contact the key's provider and ask for a matching key pair.
The public key to private key mismatch error message means the public and private keys in the imported pair do not correspond to each other.
Whenever possible, the error message includes details about the keys, including the user ID (key owner) and fingerprint.
Keys do not have to be imported as pairs. You can import public or private keys independently. Only import a key pair together when they are a matching pair.
You can also double-check a key pair mismatch using the GPG command line application. Use the command gpg --list-packets <keyfile> to see details about a key. When comparing a private and public key, the output shows matching keyid: and hashed subpkt 33 len 21 entries. If these values differ, the keys are not a matching pair.
Example cropped output for matching keys, showing the relevant sections containing the keyid: and hashed subpkt 33 fingerprint:
% gpg --list-packets PUBLIC_keyfile.pem
# off=0 ctb=c6 tag=6 hlen=3 plen=525 new-ctb
:public key packet:
...
keyid: 7EA2B584CEBEE146
# off=528 ctb=cd tag=13 hlen=2 plen=44 new-ctb
:user ID packet: "My Key <my.email@files.com>"
# off=574 ctb=c2 tag=2 hlen=3 plen=586 new-ctb
:signature packet: algo 1, keyid 7EA2B584CEBEE146
...
hashed subpkt 33 len 21 (issuer fpr v4 B852EA7705D7875D927681957EA2B584CEBEE146)
...
% gpg --list-packets PRIVATE_keyfile.pem
# off=0 ctb=c5 tag=5 hlen=3 plen=1816 new-ctb
:secret key packet:
...
keyid: 7EA2B584CEBEE146
# off=1819 ctb=cd tag=13 hlen=2 plen=44 new-ctb
:user ID packet: "My Key <my.email@files.com>"
# off=1865 ctb=c2 tag=2 hlen=3 plen=586 new-ctb
:signature packet: algo 1, keyid 7EA2B584CEBEE146
...
hashed subpkt 33 len 21 (issuer fpr v4 B852EA7705D7875D927681957EA2B584CEBEE146)
...
In the output above, the values for keyid: and hashed subpkt 33 len 21 must match across the public and private keys. Keys with differing keyid: values, or differing hashed subpkt 33 len 21 values, are not a matched pair.