Package yawPyCrypto :: Module KeyCipher :: Class KeyEncryptCipher
[show private | hide private]
[frames | no frames]

Class KeyEncryptCipher

             object --+    
         KeyEncryptBase --+
             object --+   |
                      |   |
            EncryptBase --+
     object --+           |
              |           |
     StreamBase --+       |
                  |       |
       OutputStream --+   |
                      |   |
     object --+       |   |
              |       |   |
AlgoDefinitions --+   |   |
                  |   |   |
       CipherStream --+   |
                      |   |
          EncryptStream --+

Key encryption cipher class. This is the main entrypoint for all stream encryption which is to be done side by side with public key ciphers, so that more data than can be encrypted than using the normal public key encryption schemes. An instance of this class works similar to an instance of the EncryptCipher class.
Method Summary
  __init__(self, enc_keys, sign_keys, cipher_algo, cipher_mode, IV, hash_algo)
Initialize the encryption cipher.
a new object with type S, a subtype of T __new__(S, ...)

Method Details

__init__(self, enc_keys=[], sign_keys=[], cipher_algo=3, cipher_mode=0, IV=None, hash_algo=5)

Initialize the encryption cipher. The parameters used here are
the following:
    enc_keys - List of keys for which the stream will be
               encrypted. Any of the private keys belonging to
               the (public) keys passed in will be able to decrypt
               the cipher stream.
    sign_keys - List of keys with which the stream will be signed.
                If you pass in more than one key, the stream will
                be signed by all of these keys. On decryption,
                using any of these keys public part will mark the
                stream as being signed.
    cipher_algo - One of the CIPHER_* constants, specifying the
                  cipher algorithm to use.
    cipher_mode - One of the MODE_* constants, specifying the
                  cipher block mode to use. Special constant is
                  MODE_NONE, which must be used with stream
                  ciphers, and when used with block ciphers means
                  to use the standard mode of that cipher
    IV - Initialization value for block chaining modes. This must
         be at least as long as the blocksize of the algorithm
         which is used. Special value None means that the default
         IV, declared in _Imports, is used. It is actually not
         necessary, nor safer to pass a custom IV, as the first
         block of data written for block ciphers is always a
         random block of data, which seeds the IV to a default
         value for the actual data. IV is only used on block
    hash_algo - One of the HASH_* constants, specifying the hash
                algorithm to use for the stream signature.
All arguments except enc_keys and sign_keys have safe defaults.

__new__(S, ...)

a new object with type S, a subtype of T

Generated by Epydoc 1.1 on Sun Aug 17 03:32:32 2003