@@ -198,7 +198,7 @@ You can create a detached signature for a message using the
198198 >>> (pubkey, privkey) = rsa.newkeys(512 )
199199 >>> message = ' Go left at the blue tree'
200200 >>> signature = rsa.sign(message, privkey, ' SHA-1' )
201-
201+
202202This hashes the message using SHA-1. Other hash methods are also
203203possible, check the :py:func: `rsa.sign ` function documentation for
204204details. The hash is then signed with the private key.
@@ -285,7 +285,7 @@ Only using Python-RSA: the VARBLOCK format
285285.. warning ::
286286
287287 The VARBLOCK format is NOT recommended for general use, has been deprecated since
288- Python-RSA 3.4, and will be removed in a future release . It's vulnerable to a
288+ Python-RSA 3.4, and has been removed in version 4.0 . It's vulnerable to a
289289 number of attacks:
290290
291291 1. decrypt/encrypt_bigfile() does not implement `Authenticated encryption `_ nor
@@ -299,55 +299,6 @@ Only using Python-RSA: the VARBLOCK format
299299.. _Authenticated encryption : https://en.wikipedia.org/wiki/Authenticated_encryption
300300.. _issue #19 on Github : https://github.com/sybrenstuvel/python-rsa/issues/13
301301
302-
303- As far as we know, there is no pure-Python AES encryption. Previous
304- versions of Python-RSA included functionality to encrypt large files
305- with just RSA, and so does this version. The format has been improved,
306- though.
307-
308- Encrypting works as follows: the input file is split into blocks that
309- are just large enough to encrypt with your RSA key. Every block is
310- then encrypted using RSA, and the encrypted blocks are assembled into
311- the output file. This file format is called the :ref: `VARBLOCK
312- <VARBLOCK>` format.
313-
314- Decrypting works in reverse. The encrypted file is separated into
315- encrypted blocks. Those are decrypted, and assembled into the original
316- file.
317-
318- .. note ::
319-
320- The file will get larger after encryption, as each encrypted block
321- has 8 bytes of random padding and 3 more bytes of overhead.
322-
323- Since these encryption/decryption functions are potentially called on
324- very large files, they use another approach. Where the regular
325- functions store the message in memory in its entirety, these functions
326- work on one block at the time. As a result, you should call them with
327- :py:class: `file `-like objects as the parameters.
328-
329- Before using we of course need a keypair:
330-
331- >>> import rsa
332- >>> (pub_key, priv_key) = rsa.newkeys(512 )
333-
334- Encryption works on file handles using the
335- :py:func: `rsa.bigfile.encrypt_bigfile ` function:
336-
337- >>> from rsa.bigfile import *
338- >>> with open (' inputfile' , ' rb' ) as infile, open (' outputfile' , ' wb' ) as outfile:
339- ... encrypt_bigfile(infile, outfile, pub_key)
340-
341- As does decryption using the :py:func: `rsa.bigfile.decrypt_bigfile `
342- function:
343-
344- >>> from rsa.bigfile import *
345- >>> with open (' inputfile' , ' rb' ) as infile, open (' outputfile' , ' wb' ) as outfile:
346- ... decrypt_bigfile(infile, outfile, priv_key)
347-
348- .. note ::
349-
350- :py:func: `rsa.sign ` and :py:func: `rsa.verify ` work on arbitrarily
351- long files, so they do not have a "bigfile" equivalent.
352-
353-
302+ As of Python-RSA version 4.0, the VARBLOCK format has been removed from the
303+ library. For now, this section is kept here to document the issues with that
304+ format, and ensure we don't do something like that again.
0 commit comments