php-gpg - библиотека gpg шифрования на php
Пример использования
require __DIR__ . '/vendor/autoload.php';
require_once 'libs/GPG.php';
$gpg = new GPG();
// create an instance of a GPG public key object based on ASCII key
$pub_key = new GPG_Public_Key($public_key_ascii);
// using the key, encrypt your plain text using the public key
$encrypted = $gpg->encrypt($pub_key,$plain_text_string);
echo $encrypted;
https://github.com/jasonhinkle/php-gpg