OLD | NEW |
(Empty) | |
| 1 # -*- coding: utf-8 -*- |
| 2 # |
| 3 # =================================================================== |
| 4 # The contents of this file are dedicated to the public domain. To |
| 5 # the extent that dedication to the public domain is not available, |
| 6 # everyone is granted a worldwide, perpetual, royalty-free, |
| 7 # non-exclusive license to exercise all rights associated with the |
| 8 # contents of this file for any purpose whatsoever. |
| 9 # No rights are reserved. |
| 10 # |
| 11 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 12 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 13 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 14 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
| 15 # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
| 16 # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 17 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 18 # SOFTWARE. |
| 19 # =================================================================== |
| 20 |
| 21 """Symmetric- and asymmetric-key encryption algorithms. |
| 22 |
| 23 Encryption algorithms transform plaintext in some way that |
| 24 is dependent on a key or key pair, producing ciphertext. |
| 25 |
| 26 Symmetric algorithms |
| 27 -------------------- |
| 28 |
| 29 Encryption can easily be reversed, if (and, hopefully, only if) |
| 30 one knows the same key. |
| 31 In other words, sender and receiver share the same key. |
| 32 |
| 33 The symmetric encryption modules here all support the interface described in PEP |
| 34 272, "API for Block Encryption Algorithms". |
| 35 |
| 36 If you don't know which algorithm to choose, use AES because it's |
| 37 standard and has undergone a fair bit of examination. |
| 38 |
| 39 ======================== ======= ======================== |
| 40 Module name Type Description |
| 41 ======================== ======= ======================== |
| 42 `Crypto.Cipher.AES` Block Advanced Encryption Standard |
| 43 `Crypto.Cipher.ARC2` Block Alleged RC2 |
| 44 `Crypto.Cipher.ARC4` Stream Alleged RC4 |
| 45 `Crypto.Cipher.Blowfish` Block Blowfish |
| 46 `Crypto.Cipher.CAST` Block CAST |
| 47 `Crypto.Cipher.DES` Block The Data Encryption Standard. |
| 48 Very commonly used in the past, |
| 49 but today its 56-bit keys are too small. |
| 50 `Crypto.Cipher.DES3` Block Triple DES. |
| 51 `Crypto.Cipher.XOR` Stream The simple XOR cipher. |
| 52 ======================== ======= ======================== |
| 53 |
| 54 |
| 55 Asymmetric algorithms |
| 56 --------------------- |
| 57 |
| 58 For asymmetric algorithms, the key to be used for decryption is totally |
| 59 different and cannot be derived in a feasible way from the key used |
| 60 for encryption. Put differently, sender and receiver each own one half |
| 61 of a key pair. The encryption key is often called ``public`` whereas |
| 62 the decryption key is called ``private``. |
| 63 |
| 64 ========================== ======================= |
| 65 Module name Description |
| 66 ========================== ======================= |
| 67 `Crypto.Cipher.PKCS1_v1_5` PKCS#1 v1.5 encryption, based on RSA key pairs |
| 68 `Crypto.Cipher.PKCS1_OAEP` PKCS#1 OAEP encryption, based on RSA key pairs |
| 69 ========================== ======================= |
| 70 |
| 71 :undocumented: __revision__, __package__, _AES, _ARC2, _ARC4, _Blowfish |
| 72 _CAST, _DES, _DES3, _XOR |
| 73 """ |
| 74 |
| 75 __all__ = ['AES', 'ARC2', 'ARC4', |
| 76 'Blowfish', 'CAST', 'DES', 'DES3', |
| 77 'XOR', |
| 78 'PKCS1_v1_5', 'PKCS1_OAEP' |
| 79 ] |
| 80 |
| 81 __revision__ = "$Id$" |
| 82 |
| 83 |
OLD | NEW |