From SpectLog
Jump to: navigation, search

These are just notes from corresponding man-page for quick reference.

Configuration

Command gpgconf allows querying GPG configuration.

Generating signature

To sign a document use --sign option:

gpg --output doc.sig --sign doc

A detached signature is created using the --detach-sig option:

gpg --output doc.sig --detach-sig doc

Checking signature

To check the signature use the --verify option:

gpg --output doc --verify doc.sig

To verify the signature and extract the document use the --decrypt option:

gpg --output doc --decrypt doc.sig

The option --clearsign causes the document to be wrapped in an ASCII-armored signature but otherwise does not modify the document:

gpg --clearsign doc

The --verify option can check the signature:

gpg --verify doc.sig doc

Key managment

List existing keys:

gpg --list-key

Generate new key:

gpg --gen-key