Module yawPyCrypto.KeyCipher
KeyCipher.py
KeyEncryptCipher
Key encryption wrapper class. This class offers support for encrypting
streams of data using both normal ciphers and public key algorithms.
They work in a way similar to that of GPG, in that a session password
is randomly generated, which is then encrypted using public key
functions, and the stream is written out as is.
DecryptCipher
Key decryption wrapper class. This class reverses any encryption done
by KeyEncryptCipher. You need to pass the private part of one of the
keys used on encryption to be able to decrypt a key cipher
stream.
ZipEn/DecryptCipher
Classes which expose a similar interface as KeyEncryptCipher and
KeyDecryptCipher, but which additionally to doing encryption compress
the passed in byte-stream on encryption, and decompress it on
decryption. This makes the data which is actually stored in the
encrypted stream more "random", which most security experts
recommend as a security bonus. These classes are only defined if
USE_ZLIB is defined as True in the configuration file.
Interfacing and overriding methods
The documentation put forth in the Cipher module remains completely
valid in this context.
Copyright
yawPyCrypto is copyright (C) 2002-3 by Heiko Wundram
<heiko@asta.uni-saarland.de>.
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library in the file "COPYLEFT"; if
not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
Classes |
KeyDecryptCipher |
Key cipher decryption class. |
KeyEncryptCipher |
Key encryption cipher class. |
ZipKeyDecryptCipher |
Class which works similar to KeyDecryptCipher, but streams all data
read from the encrypted stream through unzipping on reading. |
ZipKeyEncryptCipher |
Class which works similar to KeyEncryptCipher, but streams all data
through zipping on writing, so that it is in effect
"randomized" on writing. |
__date__
-
- Type:
-
str
- Value:
|
__version__
-
- Type:
-
str
- Value:
|
CIPHER_AES
-
- Type:
-
int
- Value:
|
CIPHER_ARC2
-
- Type:
-
int
- Value:
|
CIPHER_ARC4
-
- Type:
-
int
- Value:
|
CIPHER_BLOWFISH
-
- Type:
-
int
- Value:
|
CIPHER_CAST
-
- Type:
-
int
- Value:
|
CIPHER_DES3
-
- Type:
-
int
- Value:
|
HASH_MD2
-
- Type:
-
int
- Value:
|
HASH_MD4
-
- Type:
-
int
- Value:
|
HASH_MD5
-
- Type:
-
int
- Value:
|
HASH_NONE
-
- Type:
-
int
- Value:
|
HASH_SHA
-
- Type:
-
int
- Value:
|
HAVE_AES
-
- Type:
-
bool
- Value:
|
HAVE_ARC2
-
- Type:
-
bool
- Value:
|
HAVE_ARC4
-
- Type:
-
bool
- Value:
|
HAVE_BLOWFISH
-
- Type:
-
bool
- Value:
|
HAVE_CAST
-
- Type:
-
bool
- Value:
|
HAVE_DES3
-
- Type:
-
bool
- Value:
|
HAVE_DSA
-
- Type:
-
bool
- Value:
|
HAVE_ELGAMAL
-
- Type:
-
bool
- Value:
|
HAVE_IDEA
-
- Type:
-
bool
- Value:
|
HAVE_MD2
-
- Type:
-
bool
- Value:
|
HAVE_MD4
-
- Type:
-
bool
- Value:
|
HAVE_MD5
-
- Type:
-
bool
- Value:
|
HAVE_QNEW
-
- Type:
-
bool
- Value:
|
HAVE_RC5
-
- Type:
-
bool
- Value:
|
HAVE_RIPEMD
-
- Type:
-
bool
- Value:
|
HAVE_RSA
-
- Type:
-
bool
- Value:
|
HAVE_SHA
-
- Type:
-
bool
- Value:
|
LOAD_INSECURE_CIPHER_ALGOS
-
- Type:
-
int
- Value:
|
MODE_CBC
-
- Type:
-
int
- Value:
|
MODE_CFB
-
- Type:
-
int
- Value:
|
MODE_CTR
-
- Type:
-
int
- Value:
|
MODE_ECB
-
- Type:
-
int
- Value:
|
MODE_NONE
-
- Type:
-
int
- Value:
|
MODE_OFB
-
- Type:
-
int
- Value:
|
MODE_PGP
-
- Type:
-
int
- Value:
|
PUBLICKEY_DSA
-
- Type:
-
int
- Value:
|
PUBLICKEY_ELGAMAL
-
- Type:
-
int
- Value:
|
PUBLICKEY_QNEW
-
- Type:
-
int
- Value:
|
PUBLICKEY_RSA
-
- Type:
-
int
- Value:
|
USE_ZLIB
-
- Type:
-
bool
- Value:
|