4 ms·
Some nits about your encrypted API: 1. The ciphertext is not authenticated. You should MAC it. 2. The plaintext is padded with spaces to be block-aligned. "He
by sweis 14y ago
Some nits about your encrypted API:
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/leftronic.py#L260 https://github.com/sonofabell/leftronic/blob/master/python/l...
- cdelsolar 14y agoCesar 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!