License includes hash functions
[python-cryptoplus.git] / README
blob5b07c346a3d2a2896058d04b6fe7754ef4591eab
1 CRYPTOPLUS
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 CryptoPlus is an extions to the Crypto module (www.pycrypto.org) for
16 python. CryptoPlus makes the ciphers included in pycrypto and some new
17 onse available in pure python code. Some new chain modes are also added
18 in pure python, while the ones allready available in pycrypto are also
19 avaible in pure python in this package. Making these available in pure
20 python has the advantage of easier understandable code and thus making
21 it easier to adjust the code to your needs.
22 All other functions of pycrypto are 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.*. When
26 using the original Ciphers, the original pycrypto (C) code is used but
27 the chains will still be made by my new python code.
29 New functions:
30     Ciphers:
31         Rijndael
32         Serpent
33         Twofish
34     Chain Modes:
35         XTS
36         CMAC
38 Note: for all the cipher algorithms, code has been reused from
39 others. Appropriate copyright notices are in the source code.
41 2. INSTALLING
42 ==============
44 necessary 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
57 block ciphers. There are lot of examples provided in the
58 docstrings. Have a look at them by looking in the source code
59 '../CryptoPlus/Cipher/*.py' or via an interactive python session by using
60 'CryptoPlus.Cipher.python_AES.new?'. Once you constructed a cipher object
61 with 'cipher = CryptoPlus.Cipher.python_AES.new(...)' you can get more
62 info about encrypting and decrypting by reading the apprioprate docstring
63 ('cipher.encrypt?','cipher.decrypt?').
65 Some test functions are provided in the docstrings and in the 'test'
66 folder. Run all the doctest 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 avaible 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