Comments on: Temporary Public Key: Continued http://www.terminally-incoherent.com/blog/2010/12/20/temporary-public-key-continued/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Martinho Fernandes http://www.terminally-incoherent.com/blog/2010/12/20/temporary-public-key-continued/#comment-18103 Mon, 20 Dec 2010 23:14:19 +0000 http://www.terminally-incoherent.com/blog/?p=7300#comment-18103

I used to forget about that particular limitation of RSA, too. I’ve made that mistake two or three times before I finally gave up and started remembering it.

Regarding the praticality of use against large files: instead of reading all of the data into memory, you could use a CryptoStream and “stream through it”. You provide it with the encryptor or decryptor creating from the Aes algorithm and it takes care of all the error-prone streaming and buffering operations.

If you can use .NET4 (maybe you can’t because your victims audience won’t have it installed), there’s a CopyTo method on the Stream class that simply pumps an entire stream to another, with a buffer size parameter. If you can’t you’ll have to do the pumping “by hand”.

Reply  |  Quote
]]>