OLD | NEW |
(Empty) | |
| 1 Reference |
| 2 ================================================== |
| 3 |
| 4 This is the class and function reference. For more usage information |
| 5 see the :ref:`usage` page. |
| 6 |
| 7 Functions |
| 8 -------------------------------------------------- |
| 9 |
| 10 .. autofunction:: rsa.encrypt |
| 11 |
| 12 .. autofunction:: rsa.decrypt |
| 13 |
| 14 .. autofunction:: rsa.sign |
| 15 |
| 16 .. autofunction:: rsa.verify |
| 17 |
| 18 .. autofunction:: rsa.newkeys(keysize) |
| 19 |
| 20 |
| 21 Classes |
| 22 -------------------------------------------------- |
| 23 |
| 24 .. autoclass:: rsa.PublicKey |
| 25 :members: |
| 26 :inherited-members: |
| 27 |
| 28 .. autoclass:: rsa.PrivateKey |
| 29 :members: |
| 30 :inherited-members: |
| 31 |
| 32 Exceptions |
| 33 -------------------------------------------------- |
| 34 |
| 35 .. autoclass:: rsa.pkcs1.CryptoError(Exception) |
| 36 |
| 37 .. autoclass:: rsa.pkcs1.DecryptionError(CryptoError) |
| 38 |
| 39 .. autoclass:: rsa.pkcs1.VerificationError(CryptoError) |
| 40 |
| 41 |
| 42 .. index:: VARBLOCK (file format) |
| 43 |
| 44 Module: rsa.bigfile |
| 45 -------------------------------------------------- |
| 46 |
| 47 The :py:mod:`rsa.bigfile` module contains functions for encrypting and |
| 48 decrypting files that are larger than the RSA key. See |
| 49 :ref:`bigfiles` for more information. |
| 50 |
| 51 .. autofunction:: rsa.bigfile.encrypt_bigfile |
| 52 |
| 53 .. autofunction:: rsa.bigfile.decrypt_bigfile |
| 54 |
| 55 .. _VARBLOCK: |
| 56 |
| 57 The VARBLOCK file format |
| 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 59 |
| 60 The VARBLOCK file format allows us to encrypt files that are larger |
| 61 than the RSA key. The format is as follows; || denotes byte string |
| 62 concatenation:: |
| 63 |
| 64 VARBLOCK := VERSION || BLOCK || BLOCK || ... |
| 65 |
| 66 VERSION := 1 |
| 67 |
| 68 BLOCK := LENGTH || DATA |
| 69 |
| 70 LENGTH := varint-encoded length of the following data, in bytes |
| 71 |
| 72 DATA := the data to store in the block |
| 73 |
| 74 The varint-format was taken from Google's Protobuf_, and allows us to |
| 75 efficiently encode an arbitrarily long integer. |
| 76 |
| 77 .. _Protobuf: |
| 78 http://code.google.com/apis/protocolbuffers/docs/encoding.html#varints |
| 79 |
| 80 |
| 81 Module: rsa.core |
| 82 -------------------------------------------------- |
| 83 |
| 84 At the core of the RSA encryption method lie these functions. They |
| 85 both operate on (arbitrarily long) integers only. They probably aren't |
| 86 of much use to you, but I wanted to document them anyway as they are |
| 87 the core of the entire library. |
| 88 |
| 89 .. autofunction:: rsa.core.encrypt_int |
| 90 |
| 91 .. autofunction:: rsa.core.decrypt_int |
| 92 |
OLD | NEW |