Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

LocalPGP provides browser extensions for Chrome and Firefox that allow you to perform OpenPGP operations (encrypt, decrypt, sign, verify) using your system’s GnuPG installation. This means you can use your existing GPG keyring, including hardware security keys like Yubikey, directly from your browser.

Features

  • Encrypt - Encrypt messages for one or more recipients
  • Decrypt - Decrypt messages using your private keys
  • Sign - Create clearsign or detached signatures
  • Verify - Verify signatures on messages
  • Key Management - List, import, and manage keys via your GPG keyring
  • Hardware Key Support - Full support for Yubikey and other OpenPGP cards

Architecture

LocalPGP uses Native Messaging to communicate with your local gpgme-json binary, which is part of the GnuPG project. This architecture ensures that:

  • All cryptographic operations are performed by your local GnuPG installation
  • Private keys never leave your system
  • Hardware key operations are handled by gpg-agent (pinentry will prompt for PIN)
  • The extension only communicates with the local gpgme-json process via Native Messaging

Libraries

SlayOps - For Website Integration

The SlayOps library is the main user-level API for integrating OpenPGP operations into your websites. It communicates with the LocalPGP browser extension to perform cryptographic operations using your local GnuPG installation.

Install via npm:

npm install slayops
# or
pnpm add slayops

Or include directly in your HTML:

<script src="https://unpkg.com/slayops/dist/slayops.js"></script>

See the Usage chapter for detailed examples.

Browser Extensions