[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The toplevel interface of this library is quite simple, and only intended to use with public-key cryptographic operation.
To use PGG, evaluate following expression at the beginning of your application program.
(require 'pgg) |
If you want to check existence of pgg.el at runtime, instead you can list autoload setting for desired functions as follows.
(autoload 'pgg-encrypt-region "pgg" "Encrypt the current region." t) (autoload 'pgg-decrypt-region "pgg" "Decrypt the current region." t) (autoload 'pgg-sign-region "pgg" "Sign the current region." t) (autoload 'pgg-verify-region "pgg" "Verify the current region." t) (autoload 'pgg-insert-key "pgg" "Insert the ASCII armored public key." t) (autoload 'pgg-snarf-keys-region "pgg" "Import public keys in the current region." t) |
3.1 User Commands | ||
3.2 Selecting an implementation | ||
3.3 Caching passphrase | ||
3.4 Default user identity |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
At this time you can use some cryptographic commands. The behavior of
these commands relies on a fashion of invocation because they are also
intended to be used as library functions. In case you don't have the
signer's public key, for example, the function pgg-verify-region
fails immediately, but if the function had been called interactively, it
would ask you to retrieve the signer's public key from the server.
If encryption is successful, it replaces the current region contents (in the accessible portion) with the resulting data.
If optional argument sign is non-nil
, the function is
request to do a combined sign and encrypt. This currently only work
with GnuPG.
nil
, or the
function is called interactively, it does not create a detached
signature. In such a case, it replaces the current region contents (in
the accessible portion) with the resulting data.
nil
, or the function
is called interactively, it is treated as the detached signature of the
current region.
If the optional 4th argument fetch is non-nil
, or the
function is called interactively, we attempt to fetch the signer's
public key from the key server.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Since PGP has a long history and there are a number of PGP implementations available today, the function which each one has differs considerably. For example, if you are using GnuPG, you know you can select cipher algorithm from 3DES, CAST5, BLOWFISH, and so on, but on the other hand the version 2 of PGP only supports IDEA.
By default, if the variable pgg-scheme
is not set, PGG searches the
registered scheme for an implementation of the requested service
associated with the named algorithm. If there are no match, PGG uses
pgg-default-scheme
. In other words, there are two options to
control which command is used to process the incoming PGP armors. One
is for encrypting and signing, the other is for decrypting and
verifying.
gpg
, pgp
, and pgp5
.
gpg
, pgp
, and pgp5
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
PGG uses a simple passphrase caching mechanism, which is enabled by default.
nil
, store passphrases. The default value of this
variable is t
. If you were worry about security issue, however,
you could stop caching with setting it nil
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The PGP implementation is usually able to select the proper key to use for signing and decryption, but if you have more than one key, you may need to specify the key id to use.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.