Skip to content

Commit

Permalink
import Crypt::OpenPGP 0.15 from CPAN
Browse files Browse the repository at this point in the history
git-cpan-module: Crypt::OpenPGP
git-cpan-version: 0.15
  • Loading branch information
Benjamin Trott authored and Benjamin Trott committed Dec 10, 2009
1 parent 1830919 commit 780b909
Show file tree
Hide file tree
Showing 25 changed files with 1,560 additions and 192 deletions.
41 changes: 40 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,46 @@
$Id: Changes,v 1.43 2001/08/09 16:55:01 btrott Exp $
$Id: Changes,v 1.54 2001/08/15 22:11:14 btrott Exp $

Revision history for Crypt::OpenPGP

0.15 2001.08.15
- Added bin/pgplet as an example of Crypt::OpenPGP usage.
- Added PassphraseCallback parameter to Crypt::OpenPGP::decrypt
and Crypt::OpenPGP::sign; this callback will be invoked when a
passphrase to unlock the secret key is not provided, but is needed.
Allows more flexibility etc.
- Added RecipientsCallback parameter to Crypt::OpenPGP::encrypt;
this callback will be invoked after recipients have been mapped
to public keys, and allows review/modification of that key list.
- Crypt::OpenPGP::decrypt will now look through all encrypted
session key packets until it finds one for which we have a
secret key. Once it finds that known key, it uses that key to
decrypt the message.
- Added Recipients param to Crypt::OpenPGP::encrypt, accepts either
key IDs or user IDs. Deprecated usage of KeyID.
- Fixed bug in Certificate::fingerprint with version 3 keys. Was
concatenating integers when should have been concatenating octet
string representations.
- Added Crypt::OpenPGP::Words, which encodes octet/hex strings into
lists of English words. Thanks to Mike Dillon for sending me his
PGPWords.pm, which this module is based on.
- Added Certificate::fingerprint_words and fingerprint_hex. The
former uses Crypt::OpenPGP::Words to encode the fingerprint into a
list of English words; the latter returns the fingerprint as a
string of hex digits.
- Added KeyRing::find_keyblock_by_index, which, given an index into
a list of keyblocks, returns the keyblock at that index. Thanks to
Vipul for the idea.
- Crypt::OpenPGP::Message interface changed: instead of passing
params to read, now pass params to new, and read is called
automatically. Then call pieces to get pieces of message. This
should not affect anyone, unless you were directly accessing
the $msg->{pieces} member, for lack of a better interface :).
- Added Key param to Crypt::OpenPGP::decrypt and Crypt::OpenPGP::verify;
Key should be a Certificate object. This has the effect of bypassing
the keyring lookup and might be useful for decrypting using a key
deserialized from some external source (network, database, etc.).
Thanks to Vipul for the idea.

0.14 2001.08.09
- Crypt::OpenPGP::CFB now works in both standard and PGP-variant
mode (where PGP-variant is the slightly strange mode with the
Expand Down
5 changes: 5 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ MANIFEST
Makefile.PL
README
ToDo
bin/pgplet
lib/Crypt/DES_EDE3.pm
lib/Crypt/OpenPGP.pm
lib/Crypt/OpenPGP/Armour.pm
Expand Down Expand Up @@ -41,6 +42,10 @@ lib/Crypt/OpenPGP/Signature/SubPacket.pm
lib/Crypt/OpenPGP/Trust.pm
lib/Crypt/OpenPGP/UserID.pm
lib/Crypt/OpenPGP/Util.pm
lib/Crypt/OpenPGP/Words.pm
lib/Crypt/OpenPGP/trans.pl
lib/Crypt/OpenPGP/wordlist
lib/Crypt/OpenPGP/wordlist-3
t/00-compile.t
t/01-util.t
t/02-buffer.t
Expand Down
13 changes: 12 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$Id: README,v 1.5 2001/07/28 00:58:33 btrott Exp $
$Id: README,v 1.6 2001/08/15 22:11:14 btrott Exp $

This is Crypt::OpenPGP. It provides a pure-Perl implementation of the
OpenPGP standard, including support for all versions of PGP and
Expand Down Expand Up @@ -63,4 +63,15 @@ Then install it:

% make install

SAMPLES/TUTORIALS

Take a look at bin/pgplet for an example of usage of Crypt::OpenPGP.
It gives you an example of using the four main major methods (encrypt,
sign, decrypt, and verify), as well as the various parameters to those
methods. It also demonstrates usage of the callback parameters (eg.
PassphraseCallback).

bin/pgplet currently does not have any documentation, but its interface
mirrors that of gpg.

Benjamin Trott / ben@rhumba.pair.com
53 changes: 29 additions & 24 deletions ToDo
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
$Id: ToDo,v 1.24 2001/08/09 19:12:05 btrott Exp $
$Id: ToDo,v 1.31 2001/08/12 23:33:07 btrott Exp $

Crypt::OpenPGP todo
--------
xx * Crypt::OpenPGP main USAGE docs
xx * docs (for other classes)
xx * PassphraseCallback param for sign and decrypt. give callback function the
Certificate object (anything else?), let it ask the user for a passphrase.
xx * RecipientCallback for encrypt
* support for CAST5, ElGamal signing
xx * clear text signatures; need to make text into canonical text for
signing
xx * more support for looking up keys in keyring (eg. look up userid, etc.)
xx * encrypt and sign/decrypt and verify
* caching in find_keyblock. let caller pass in 'marker' code-ref that, given
a packet, returns a unique 'marker' to point to that keyblock. eg. lookup
by keyid returns the certificate keyid, lookup by userid returns the
userid, etc. then, two levels of caching: 1) store offsets of keyblocks
by marker; 2) store already-parsed keyblocks by marker. we could let the
calling function do the latter, of course, ie. find_keyblock_by_keyid
would manage a hash of keyids => keyblocks. also: when reading a keyblock
(after already finding the start offset), maybe don't parse SECRET_KEY
and PUBLIC_KEY packets? since we already have the start cert there is
no use in parsing the next one we come to, because that indicates the
start of a new keyblock.
* add KeyRing::find_keyblock_by_index; given index, return that keyblock.
also allow negative indices. create map of keyring on KeyRing::init.
xx * add KeyRing::find_keyblock_by_index; given index, return that keyblock.
also allow negative indices. create map of keyring on KeyRing::init.
xx * KeyBlock needs some methods to "do stuff" with the keyblock contents;
for example, there should be a method to return: 1) the master key;
2) a key given a key ID; 3) the key to be used for encryption, and the
key to be used for signing.
for example, there should be a method to return: 1) the master key;
2) a key given a key ID; 3) the key to be used for encryption, and the
key to be used for signing.
xx * KeyRing::find_keyblock_by_keyid should no longer return certificate if
called in list context. Instead it should just return a list of all
matching keys if called in list context, first match otherwise. Caller
should use KeyBlock methods to get actual certificate.
called in list context. Instead it should just return a list of all
matching keys if called in list context, first match otherwise. Caller
should use KeyBlock methods to get actual certificate.
* KeyRing support multiple keyrings so that lookups occur over multiple
rings.
xx * compatibility param to encrypt and sign (and keygen, maybe), eg.
Compat => 'PGP2' turns on Version => 3 and Cipher => 'IDEA'
* read existing PGPx/GnuPG config files into Config object
* smart detection and description of arbitrary files, eg. pass in some
data and give back 'RSA signed message, Version 3, probably PGP2'
xx * compressed packets
xx * symmetrically-encrypted encrypted data packets
* subkey generation
* add PGPWords from Mike Dillon; probably should add an interface to this
through Certificate? ie. $cert->word_fingerprint, which would take
$cert->fingerprint and run it through the Words module.
xx * add PGPWords from Mike Dillon; probably should add an interface to this
through Certificate? ie. $cert->word_fingerprint, which would take
$cert->fingerprint and run it through the Words module.
* keyserver capabilities, key import
xx * encrypted MDC packets
xx * make find_keyblock_by_keyid work with subkeys
xx * key generation, secret certificate saving and encrypting
Expand All @@ -58,8 +52,19 @@ xx * generate fingerprint on cert while reading in (in 'parse'); that way we
signatures, etc.
xx * better installation: determine prereqs based on answers to prompts
about preferred ciphers, pk systems, etc.
* use key flags to determine "what a key can do" (ie. signing, encryption)
* use key flags to determine key capabilities (signing, encryption, etc.)
xx * support writing v4 packet headers
* add some example scripts
* caching in find_keyblock. let caller pass in 'marker' code-ref that, given
a packet, returns a unique 'marker' to point to that keyblock. eg. lookup
by keyid returns the certificate keyid, lookup by userid returns the
userid, etc. then, two levels of caching: 1) store offsets of keyblocks
by marker; 2) store already-parsed keyblocks by marker. we could let the
calling function do the latter, of course, ie. find_keyblock_by_keyid
would manage a hash of keyids => keyblocks. also: when reading a keyblock
(after already finding the start offset), maybe don't parse SECRET_KEY
and PUBLIC_KEY packets? since we already have the start cert there is
no use in parsing the next one we come to, because that indicates the
start of a new keyblock.
* improve CRC24 implementation by using C implementation. problem:
String::CRC does not work for me (doesn't accept init, for one thing).
Loading

0 comments on commit 780b909

Please sign in to comment.