learningequality/ka-lite — pull request #596 by bcipolli (2013-08-28 11:06:14+00:00)
Title: less memory-intensive signing and verification of large files.

This is used in future code to sign zip files. Signing the entire (base64-encoded) file at once was too memory-intensive.

Solution proposed here is to sign chunks of the file, then make a signature file with all of the chunk signatures joined by newlines. Verification proceeds with the same procedure. Chunk size is a parameter to the functions.

Is this solution fair? @jamalex any concerns?

Testing:
* Tested this by calling verification from the signing function directly--it worked.