Improve English
[python-cryptoplus.git] / README
blob7cce1b751ef512fbbdafb7353e8199c202378af7
1 PYCRYPTOPLUS
2 =============
4 TABLE OF CONTENTS
5 ==================
7 1. WHAT IS CRYPTOPLUS
8 2. INSTALLING
9 3. GETTING STARTED
10 4. LIMITATIONS
12 1. WHAT IS CRYPTOPLUS
13 ======================
15 PyCryptoPlus is an extension to the Python Crypto module (www.pycrypto.org).
16 PyCryptoPlus provides same ciphers as included in pycrypto but also new ones,
17 all being written 100% in Python. Some additional chaining modes have been
18 added, also in pure Python, while the ones already available in pycrypto are
19 provided in pure python in this package.
20 The reasoning is that Python code has the advantage to be more readable and
21 so easier to be adapted to your needs or experiments.
22 All other functions of pycrypto are still available via the interface
23 of CryptoPlus. The new cipher implementations can be accessed via
24 CryptoPlus.Cipher.python_* while the original ones from pycrypto are
25 still available under their original name via CryptoPlus.Cipher.*.
26 When using the original ciphers, the original pycrypto code written in C is
27 used but the chaining modes being used are the new ones in Python.
29 New functions:
30     Ciphers:
31         Rijndael
32         Serpent
33         Twofish
34     Chaining Modes:
35         XTS
36         CMAC
38 Note: for the cipher algorithms, code has been reused from third parties.
39 Corresponding copyright notices are available in their source code.
41 2. INSTALLING
42 ==============
44 required packages before installing:
45     - python-setuptools
46     - python-pkg-resources
48 python setup.py install
50 3. GETTING STARTED
51 ===================
53 Same API from PyCrypto can be used. See:
54 http://www.dlitz.net/software/pycrypto/doc/
56 Biggest changes are the addition of some chain modes and block ciphers.
57 A lot of examples are provided as docstrings.
58 Have a look at them in '../CryptoPlus/Cipher/*.py' or via an interactive
59 python session by using 'CryptoPlus.Cipher.python_AES.new?'.
60 Once a cipher object is constructed with
61 'cipher = CryptoPlus.Cipher.python_AES.new(...)'
62 you can get more info about encrypting and decrypting by reading
63 the apprioprate docstring ('cipher.encrypt?','cipher.decrypt?').
65 Some test functions are provided in the docstrings and in the 'test'
66 folder. Run all the doctests in the new Cipher function by using
67 the '../test/test_doctest.py' script. '../test/test.py' provides
68 some test function for the testvectors available from the module via
69 'CryptoPlus.Cipher.testvectors'. Have a look at the test.py sourcecode
70 to have an idea of how to use those test vectors.
72 4. LIMITATIONS
73 ===============
75 CMAC can only be used with ciphers of 64 or 128 bits blocksizes
76 XTS can only be used with ciphers of 128 bits blocksize