I'd like to stream encrypted files from a server. I know that for example RSA supports streaming decryption. I am not sure whether twofish or Rijndael supports it either.
I guess if they do not support, it can be implemented by splitting up the data into chunks with known size and encrypt the actual chunk instead of the whole data. So the result will be something like this:
[enc(chunk(data, 0)), enc(chunk(data, 1)), ... enc(chunk(data, index))]
[chunk(enc(data), 0)), chunk(enc(data), 1)), ... chunk(enc(data), index))]
Am I right, or were these algorithms designed with streaming support in mind?
To clarify what I meant by "streaming decryption":
Streaming is described in the node.js manual very well, but it is a general concept and a well known Linux feature, so it should not be new to any programmer. It is roughly sending a big file in small chunks, so you can start to work with it (display, transform, etc.) before the whole file arrives and you don't have to keep the entire file in the memory, which reduces memory consumption.
Streaming decryption is using a transform stream to decrypt the data. So you read a small chunk of the ciphertext, decrypt it and write the resulting data chunk to another stream. There can be several problems here, for example the ciphertext has different size than the actual data, so if you want to seek the data you need to convert data index to ciphertext index. Another problem that decrypting a chunk with arbitrary size might not result the same data as you would have by decripting the whole ciphertext and split it up into chunks after that.