Re:Leftronic (YC S10) turns any startup office into a comman...
by cdelsolar on Monday June 04, 2012 @05:46PM
(#4066125)
Cesar here, I wrote that part of the API package. You are right that we should likely HMAC the ciphertext for added security. I'll definitely explore the padding issue as well. Thank you for your insight on this!
1. The ciphertext is not authenticated. You should MAC it.
2. The plaintext is padded with spaces to be block-aligned. "Hello world" will collide with "Hello world_" when encrypted with the same IV, and both will decrypt as "Hello world_____" (where "_" means a space). Use PKCS#1 or some other standard padding.
https://github.com/sonofabell/leftronic/blob/master/python/l...