Skip to content
OpenPGP.php is a pure-PHP implementation of the OpenPGP Message Format (RFC 4880).
Branch: master
Clone or download
Pull request Compare This branch is 156 commits ahead, 23 commits behind dryphp:master.
Latest commit fb671e1 Nov 21, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples These coefficients go in the other order Jul 27, 2016
lib Wordwrap enarmor output Nov 21, 2018
tests S2K salt is *always* 8 bytes Jul 25, 2018
AUTHORS Add myself as an author Mar 30, 2010
Doxyfile Initial doxygen setup Jun 28, 2014
README Created repository. Jan 22, 2010
VERSION Bump version number Apr 12, 2017
composer.json Tell composer what versions of PHP we test against Jul 25, 2018
phpunit.xml Make autoload work for phpunit tests Mar 14, 2015

Build Status

OpenPGP.php: OpenPGP for PHP

This is a pure-PHP implementation of the OpenPGP Message Format (RFC 4880).

About OpenPGP

OpenPGP is the most widely-used e-mail encryption standard in the world. It is defined by the OpenPGP Working Group of the Internet Engineering Task Force (IETF) Proposed Standard RFC 4880. The OpenPGP standard was originally derived from PGP (Pretty Good Privacy), first created by Phil Zimmermann in 1991.


  • Encodes and decodes ASCII-armored OpenPGP messages.
  • Parses OpenPGP messages into their constituent packets.
    • Supports both old-format (PGP 2.6.x) and new-format (RFC 4880) packets.
  • Helper class for verifying, signing, encrypting, and decrypting messages
  • Helper class for encrypting and decrypting messages and keys using
    • openssl or mcrypt required for CAST5 encryption and decryption

Bugs, Feature Requests, Patches

This project is primarily maintained by a single volunteer with many other things vying for their attention, please be patient.

Bugs, feature request, pull requests, patches, and general discussion may be submitted publicly via email to:

Github users may alternately submit on the web there.


OpenPGP.php is currently being used in the following projects:


To get a local working copy of the development repository, do:

git clone

Alternatively, you can download the latest development version as a tarball as follows:




OpenPGP.php is free and unencumbered public domain software. For more information, see or the accompanying UNLICENSE file.

You can’t perform that action at this time.