Package yawPyCrypto :: Module _KeyCipherBase :: Class KeyDecryptBase
[show private | hide private]
[frames | no frames]

Class KeyDecryptBase

object --+
         |
        KeyDecryptBase

Known Subclasses:
ZipKeyDecryptCipher, KeyDecryptCipher

Abstract base class for decrypting streams written by a class derived from KeyEncryptBase. This class handles decrypting the stream password and checking the signatures appended to the end of the stream.
Method Summary
  __init__(self, dec_keys, verify_keys)
Initialize the decryption stream by storing the keys that are used to decrypt and verify the data which is found in the stream.
a new object with type S, a subtype of T __new__(S, ...)
  _encryptionHeader(self, pdata)
Read the encryption header.
  _encryptionSignature(self, pdata)
Read the encryption signature, and try to verify the signatures presented there.
  _KeyDecryptBase__getDecryptionKey(self)
Returns the key used to decrypt this stream, if available.
  _KeyDecryptBase__getVerifyKey(self)
Returns the key which was successfully used to verify one of the signatures in the encrypted stream.

Class Variable Summary
property decryptionKey
property verifyKey
bool _showpassword

Method Details

__init__(self, dec_keys=[], verify_keys=[])
(Constructor)

Initialize the decryption stream by storing the keys that are used to decrypt and verify the data which is found in the stream.

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

_encryptionHeader(self, pdata)

Read the encryption header. The encryption header contains the session password in encrypted form. This is decrypted, and the key which was used to decrypt the packet is stored for later retrieval.

_encryptionSignature(self, pdata)

Read the encryption signature, and try to verify the signatures presented there. In case a signature is found which matches one of the keys present, but does not match the stream, an error condition is raised, otherwise the signing key can be retrieved using the verifyKey property.

_KeyDecryptBase__getDecryptionKey(self)

Returns the key used to decrypt this stream, if available.

_KeyDecryptBase__getVerifyKey(self)

Returns the key which was successfully used to verify one of the signatures in the encrypted stream. The first key which matches one of the signatures is returned.

Class Variable Details

decryptionKey

Type:
property
Value:
<property object at 0x40232dec>                                        

verifyKey

Type:
property
Value:
<property object at 0x40232e14>                                        

_showpassword

Type:
bool
Value:
False                                                                  

Generated by Epydoc 1.1 on Sun Aug 17 03:32:34 2003 http://epydoc.sf.net