GNU Privacy Guard

application/pgp-encrypted

Safe

Magic Bytes

Offset: 0
85

GNU Privacy Guard (GPG) is an open-source implementation of the OpenPGP standard, maintained by the Free Software Foundation for secure communication. This format utilizes asymmetric cryptography to encrypt sensitive files, secure email correspondence, and verify data integrity via digital signatures. Developed as a free alternative to the proprietary PGP suite, GPG provides robust privacy protection, though the security of encrypted content relies strictly on proper private key management.

Extension

.gpg

MIME Type

application/pgp-encrypted

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .gpg files in Python

Python
def is_gpg(file_path: str) -> bool:
    """Check if file is a valid GPG by magic bytes."""
    signature = bytes([0x85])
    with open(file_path, "rb") as f:
        return f.read(1) == signature

How to validate .gpg files in Node.js

Node.js
function isGPG(buffer: Buffer): boolean {
  const signature = Buffer.from([0x85]);
  return buffer.subarray(0, 1).equals(signature);
}
Go
func IsGPG(data []byte) bool {
    signature := []byte{0x85}
    if len(data) < 1 {
        return false
    }
    return bytes.Equal(data[:1], signature)
}

API Endpoint

GET /api/v1/gpg
curl https://filesignature.org/api/v1/gpg

Related Formats