AES method for data stream in Python
I want to apply an AES 128b encryption (probably CBC + Padding) on a data stream.
In case it matters, I'm sending chunks of around 1500bits each. I work in Python, and I did a small test with M2Crypto with AES encrypt in one side and decrypt at the other side. It works perfect, but probably don't really secures anything since I use the same key, same IVS and all that. So, the question is: What the best approach for AES encryption on large data streams? I thought about loading a new 'keys' file from time to time. Then, the application will use this file to expend and开发者_开发问答 extract AES keys or something like that, but it still sounds awful to build a new AES object for each chunk, so there must be a better way. I believe I can also use the IVS here, but not quite sure where and how.
精彩评论