Pretty Good Privacy • Modern Cryptography for React, Next.js & Modern Web

OpenPGP Without the Complexity.

PGPJS is a modern JavaScript toolkit for secure encryption and cryptography, built for React, Next.js, and the modern web.

encrypt.ts ×
1import PGPJS from "@/lib/pgpjs";
2
3// 1. Generate an RFC 9580 keypair (Ed25519 / X25519)
4const keys = await PGPJS.generateKey({
5 name: "Alice",
6 email: "alice@example.com"
7});
8
9// 2. Seal data (accepts objects, strings, arrays)
10const ciphertext = await PGPJS.seal({ user: "Bob", balance: 500 }, {
11 to: keys.publicKey
12});
13
14// 3. Open data
15const data = await PGPJS.open(ciphertext, {
16 privateKey: keys.privateKey
17});
18
19console.log(data.balance); // 500
React
Next.js
TypeScript
RFC 9580
Node & Edge

Tool what pgpjs use

@pgpjs/core
RFC 9580 engine
read me
@pgpjs/next
Next.js encrypted routes
read me
@pgpjs/react
Hooks and PGPProvider
read me

pgpjs cli

read me
PGPJS on Win10
read me
PGPJS on macOS
read me
PGPJS on PRS
Prysel © 2026 Prysel, Inc. All rights reserved.
PGPJS is open source software released under the MIT License.