Crypt::OpenPGP::KeyBlock represents a single keyblock in a keyring. A key block is essentially just a set of associated keys containing exactly one master key, zero or more subkeys, some user ID packets, some signatures, etc. The key is that there is only one master key associated with each keyblock.

Returns the key that performs encryption in this key block. For example, if a DSA key is the master key in a key block with an ElGamal subkey, encrypting_key returns the ElGamal subkey certificate, because DSA keys do not perform encryption/decryption.

Returns the key that performs signing in this key block. For example, if a DSA key is the master key in a key block with an ElGamal subkey, encrypting_key returns the DSA master key certificate, because DSA supports signing/verification.

Serializes each of the packets contained in the KeyBlock object, in order, and returns the serialized data. This output can then be fed to Crypt::OpenPGP::Armour for ASCII-armouring, for example, or can be written out to a keyring file.