3 ms·
Be careful following this advice. There are several issues with the suggested approach. The result is that it's nothing more than a layer of obscurity. As us
by zgs 3y ago
Be careful following this advice. There are several issues with the suggested approach. The result is that it's nothing more than a layer of obscurity. As usual: "don't roll your own cryptography".
AES-CTR isn't ideal, a bit flip in the ciphertext flips the corresponding bit in the plaintext when decrypted. I.e. the image is mutable. The solution is to authenticate the data in a cryptographically secure manner. The article suggests using a CRC which is always trivial to circumvent.
A second issue is where to store the AES key. A mention is made of doing this in a secure manner on the device (which is good) but it must be in a form which doesn't allow access by an attacker -- either directly or via a side channel.
Instead of trying to create something, use TLS which will get the data to the device in a secure manner.