, above); instead you should
use the subclasses of this module. There are, however, useful interface
methods that are shared by all subclasses.
=head2 Key Data Access
Each public-key algorithm has different key data associated with it.
For example, a public DSA key has 4 attributes: I, I, I, and
I. A secret DSA key has the same attributes as a public key, and
in addition it has an attribute I.
All of the key data attributes can be accessed by calling methods of
the same name on the I object. For example:
my $q = $dsa_key->q;
The attributes for each public-key algorithm are:
=over 4
=item * RSA
Public key: I, I
Secret key: I, I, I, I

, I, I__
=item * DSA
Public key: I__

__, I__, I, I
Secret key: I

__, I__, I, I, I
=item * ElGamal
Public key: I

__, I, I
Secret key: I__

__, I, I, I
=back
=head2 $key->check
Check the key data to determine if it is valid. For example, an RSA
secret key would multiply the values of I__

__ and I__ and verify that
the product is equal to the value of I. Returns true if the key
is valid, false otherwise.
Not all public key algorithm implementations implement a I
method; for those that don't, I will always return true.
=head2 $key->size
Returns the "size" of the key. The definition of "size" depends on
the public key algorithm; for example, DSA defines the size of a key
as the bitsize of the value of I

__.
=head2 $key->bytesize
Whereas I will return a bitsize of the key, I returns
the size in bytes. This value is defined as C.
=head2 $key->is_secret
Returns true if the key I<$key> is a secret key, false otherwise.
=head2 $key->public_key
Returns the public part of the key I<$key>. If I<$key> is already a
public key, I<$key> is returned; otherwise a new public key object
(I) is constructed, and the public values
from the secret key are copied into the public key. The new public
key is returned.
=head2 $key->can_encrypt
Returns true if the key algorithm has encryption/decryption
capabilities, false otherwise.
=head2 $key->can_sign
Returns true if the key algorithm has signing/verification
capabilities, false otherwise.
=head2 $key->alg
Returns the name of the public key algorithm.
=head2 $key->alg_id
Returns the number ID of the public key algorithm.
=head1 AUTHOR & COPYRIGHTS
Please see the Crypt::OpenPGP manpage for author, copyright, and
license information.
=cut
__