diff options
Diffstat (limited to 'doc/reference.rst')
-rw-r--r-- | doc/reference.rst | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/reference.rst b/doc/reference.rst index c667840..a1a7d35 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -14,6 +14,11 @@ Functions .. autofunction:: rsa.newkeys(keysize) +.. autofunction:: rsa.bigfile.encrypt_bigfile + +.. autofunction:: rsa.bigfile.decrypt_bigfile + + Classes -------------------------------------------------- @@ -35,4 +40,28 @@ Exceptions .. autoclass:: rsa.pkcs1.VerificationError(CryptoError) +.. index:: VARBLOCK (file format) + +The VARBLOCK file format +-------------------------------------------------- + +The VARBLOCK file format allows us to encrypt files that are larger +than the RSA key. The format is as follows; || denotes byte string +concatenation:: + + VARBLOCK := VERSION || BLOCK || BLOCK || ... + + VERSION := 1 + + BLOCK := LENGTH || DATA + + LENGTH := varint-encoded length of the followng data, in bytes + + DATA := the data to store in the block + +The varint-format was taken from Google's Protobuf_, and allows us to +efficiently encode an arbitrarily long integer. + +.. _Protobuf: + http://code.google.com/apis/protocolbuffers/docs/encoding.html#varints |