Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I was thinking about sending some sensitive data (temperature) from an arduino (

ID: 650945 • Letter: I

Question

I was thinking about sending some sensitive data (temperature) from an arduino (AVR 8-bit processor) to a server on the internet.

But I would like to make sure that it would not be possible for Eve to find the temperature.

I understand that the only way to solve this is to share a secret between the arduino and the server that Eve doesn't know. But where is the line between security by obscurity and a compile-time constant shared by server and arduino? (I ruled out asymmetric encryption due to performance & (expected) implementation problems).

So assuming they can encrypt the data with a secret key, I still have a sort of known-plaintext problem since Eve knows (from reading the source) that I'm sending 2 floats in a predictable range (-20C..50C). The only solution I could think about is interleaving the 2 floats in an array of random floats and an initial (random) byte to signal the kind of interleaving used. While this sounds to add security, I wonder if it actually does.

So perhaps to recap: what would be the best scenario for sending two temperature measurements to a server on the internet?

Explanation / Answer

Using your recap, your problem is the same as the person who wants to securely send their credit card number to a remote server. If you get rid of the need to securely agree on a one-time symmetric key, you get rid of the majority of the complications. In your case, the symmetric key is hard-coded and the attacks from the adversary are confined to non-physical access. So the ideal situation would be that you send encrypted data that:

+ Cannot be used to recover information about the plaintext

To address this issue, use an block mode of operation with an IV. The IV should be non-repeating; not necessarily random, just unique per message.

+ Cannot be manipulated

Attacks exist on some block modes that may allow the adversary to intelligently modify plaintext. If you use a MAC you can avoid this.

+ Cannot be spoofed

I assume that if an attacker deluged the server with invalid data, this would be undesirable. A MAC will also prevent this.

Known plaintext isn't that much of a problem with modern ciphers. In practice, almost all encrypted data contains known plaintext somewhere. Document metadata, protocol headers, etc. It's not really something that we worry about in general if we authenticate the data.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote