Close

Encrypted Communications Working

A project log for Star Trek Communicator Badge

In the true spirit of Star Trek, this communicator badge is completely autonomous, while fitting in the form factor of an original badge

joeJoe 07/18/2017 at 04:350 Comments

I have been thinking about how to encrypt the audio communications with the system limitations:

  1. The RFM encryption method is way too slow and can't support any reasonable data-rate
  2. Therefore, we have to find a method that can work in real time on the microcontroller with a limited number of cycles.

The solution I have come up with still leverages the RFM69 encryption but only for the initial handshake. Here's how it works:

  1. Master sends encrypted packet to slave using same private key. Packet contains a 30-byte random cypher
  2. If the slave responds with an ACK, we know both the master and slave have the same cypher.
  3. We now switch to non-encrypted mode.
  4. For each 61-byte packet, the data is XORd with the cypher before transmission
  5. The slave then XORs the same cypher after receiving the packet, full reconstructing the data.

Can this be hacked? Probably. I can envision a hack where you have a good idea of what data to expect (frequency content, mid-scale 0-value, etc.). You might then be able to reconstruct the cypher to get audible data. However, once you have found the cypher (assuming you can find it), the next transmission will have a completely new one. So, I think it's pretty secure for the application.

Discussions