<commit_before><commit_msg>pgp: add Readme<commit_after>PGP Signing
===========

.. sectnum::
.. contents:: Table of Contents

This signer implements the Pretty Good Privacy signature format. It accepts data
on the `/sign/data` interface and returns armored detached signatures.

Configuration
-------------

Place a PGP Private Key in `autograph.yaml`:

.. code:: yaml

	signers:
    - id: some-pgp-key
      type: pgp
      privatekey: |
        -----BEGIN PGP PRIVATE KEY BLOCK-----

        lQOYBFuW9xABCACzCLYHwgGba7hi+lwhD/Hr5qqpg+UuN+88N<KEY>2D
		...
        HQASoA7mirON
        =vJUu
        -----END PGP PRIVATE KEY BLOCK-----

Signature request
-----------------

This signer only supports the `/sign/data/` endpoint.

.. code:: json

	[
		{
			"input": "Y2FyaWJvdW1hdXJpY2UK",
			"keyid": "some-pgp-key"
		}
	]

Signature response
------------------

The response to a data signing request contains a PGP armored detached
signature in its raw form, with newlines preserved but wrapped on a single line
due to JSON marshalling. You can write it out to a file to recover the standard
armored signature that gnupg expects.

.. code:: json

	[
	  {
	    "ref": "7khgpu4gcfdv30w8joqxjy1cc",
	    "type": "pgp",
	    "signer_id": "some-pgp-key",
		"public_key":"-----BEGIN PGP PUBLIC KEY	BLOCK-----\n\nxsBNBFuW9xABCACzCLYHwg...",
	    "signature":"-----BEGIN PGP	SIGNATURE-----\n\nwsBcBAABCAAQBQJbt3KqCRDdCl2Z...."
	  }
	]
{'fraction_non_alphanumeric': 0.15826330532212884, 'fraction_numerical': 0.01330532212885154, 'mean_word_length': 2.519704433497537, 'pattern_counts': {'":': 7, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7620847', 'n_tokens_mistral': 544, 'n_tokens_neox': 498, 'n_words': 139}