PGP

application/pgp-encrypted

Safe

Magic Bytes

Offset: 0
85

The Pretty Good Privacy (PGP) format is an encryption standard originally developed by Phil Zimmermann and currently maintained by Broadcom. It is primarily used for securing electronic communications, verifying digital signatures, and protecting sensitive data stored on local disks or transmitted over insecure networks. Although modern implementations typically adhere to the OpenPGP specification, this legacy format remains an established tool for ensuring data confidentiality and authenticity in various enterprise environments.

Extension

.pgp

MIME Type

application/pgp-encrypted

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .pgp files in Python

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

How to validate .pgp files in Node.js

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

API Endpoint

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

Related Formats