Что такое формат файла PGP?
Pretty Good Privacy (PGP) encrypted file - a .pgp file is a binary OpenPGP data file most commonly holding encrypted content, though the same extension also appears on signature files and exported key files. PGP cryptographic tools use .pgp files to decipher information and sign files or messages. The PGP system was originally developed in 1991 as a proprietary format by Phil Zimmermann, but was later implemented as an open standard in the form of OpenPGP (RFC 4880, updated to RFC 9580 in 2024) and the GnuPG implementation. The main goal of PGP is to ensure security and integrity of information exchange.
Files with a .pgp extension can be used to decrypt information encrypted using the public key associated with a recipient's private key. .pgp files should not be manually opened or edited, as doing so may irrevocably damage the encrypted data. Unlike early PGP versions that relied primarily on RSA, modern implementations support multiple public-key algorithms - including RSA, ECDH, ECDSA, and EdDSA - combined with a symmetric session key (AES-256, CAST5 or 3DES) to encrypt the payload. Typical content encrypted and stored as .pgp files includes:
- e-mail messages,
- text files,
- folders,
- file archives such as ZIP archives.
The .pgp and .gpg extensions are interchangeable - both carry the same OpenPGP packet stream; .pgp tends to come from the original commercial PGP lineage (now Broadcom Encryption Desktop), while .gpg tends to come from GnuPG. The ASCII-armored text equivalent uses the .asc extension and begins with -----BEGIN PGP MESSAGE-----. There are many different implementations of the PGP standard used on various operating systems - programs available from the command line or with a dedicated GUI all use the same underlying cryptographic encryption and decryption standard.
Безопасность и защита
РИСК: LOWThe .pgp format is a security tool, not a threat - the file is encrypted (and possibly signed) OpenPGP data and contains no executable code itself. The real cautions concern keys and secrets: if a .pgp is actually an exported PRIVATE key, never share it and protect it with a strong passphrase. Always decrypt locally with GnuPG/PGP - never paste a passphrase or private key into a website; "online PGP decryptors" that ask for your key are scams (and cannot decrypt anything they don't have the key for). A successful decrypt only means it decrypted; the recovered file (e.g. a document or an executable) still carries whatever risk that file type normally would.
Детали формата
в двух словах- PGP public/private key file - An exported OpenPGP key is sometimes saved as .pgp (binary) rather than .asc - imported, not decrypted.
- PGP/OpenPGP signature file - A detached binary signature can carry the .pgp extension (the text-armored equivalent is .asc or .sig).
Программы, открывающие файлы PGP
Технические подробности
глубокая спецификация| Container format | OpenPGP packet stream - tag-length-value (TLV) packets concatenated into a single binary file |
| Encoding | Binary (raw OpenPGP packets); ASCII-armored text variants of the same data use the .asc extension |
| Byte order | Big-endian for multi-octet length fields and MPI (multi-precision integer) fields |
| Public-key algorithms | RSA, DSA, ECDH (X25519/X448), ECDSA, EdDSA (Ed25519/Ed448) - algorithm declared per packet |
| Symmetric cipher | AES-128, AES-192, AES-256, CAST5, 3DES - a randomly generated session key is encrypted to recipient public key(s) or derived from a passphrase |
| Compression | Optional - plaintext may be compressed with ZIP, ZLIB, or BZIP2 before encryption (Compressed Data packet) |
| Integrity protection | Modified Detection Code (MDC) / SEIP or AEAD authentication tag (RFC 9580); decryption fails or warns if ciphertext was tampered with |
| Packet format versions | v3 (legacy), v4 (RFC 4880, widely used), v6 (RFC 9580, 2024) - cipher suite and AEAD mode declared per-packet |
| MIME type | application/pgp-encrypted (primary); also application/pgp and application/octet-stream |
| Typical file size | Tracks the encrypted payload - a few KB for short messages to many GB for large archives, plus a small per-packet header overhead |
| Magic / file signature | No single universal magic; first byte is an OpenPGP packet tag (high bit always set) - common values: 0x85, 0x84 (encrypted data), 0x99 (public key), 0x89 (signature) |
| Interchangeable extension | .gpg carries identical OpenPGP data; .pgp is the commercial PGP / Broadcom convention, .gpg is the GnuPG convention |
| Platform support | Cross-platform - Windows, macOS, Linux and any OS running GnuPG or a compatible OpenPGP implementation |
| Decryption requirement | Recipient must possess the private key matching the public key used during encryption, or know the passphrase for symmetric-only (passphrase-based) encryption |
| Выпущен | PGP 1.0 in 1991 (Phil Zimmermann); OpenPGP standardized as RFC 2440 (1998) / RFC 4880 (2007) / RFC 9580 (2024) |
| Последняя версия | OpenPGP RFC 9580 (2024); .pgp is also produced by legacy/commercial PGP and Symantec/Broadcom Encryption Desktop |
| Открыть стандартное | Да · без роялти |
| Спецификация | www.rfc-editor.org |
Конвертации PGP
Вопросы и ответы сообщества
спрошено пользователямиВопросов пока нет - станьте первым, кто спросит о файлах PGP.