I need to set a unit in a location that will send pertinent status updates to a server, possibly using SSL or the server's public key over TLS. Overall, I need the unit to ping changes without too much information like credentials being in the remote unit. I want it protected from man-in-the-middle attacks, but also from say, someone copying the public key onto their machine and sending phony statuses. Is there a way I can back the encryption with a verification that it is in fact coming from the unit - or at least the same gateway?

  • The "public" key is public. Do you mean "private key"? – StackzOfZtuff Jan 11 '16 at 8:32
  • No, I mean public. The public key is on a remote device, and may be subject to tampering. – Kage Jan 11 '16 at 9:14
  • 1
    I taste a misunderstanding of what a public (and what a private) key are. Kage, whether the key is on a remote device does not label its key public or private. The function the key has does. you can see the Public key like a lockbox (used to secure some data so that only the person with the private key can read it) and the private key as the key to unlock the lockbox with. Further more . have you looked at security systems like OAuth2, I believe it would solve your little problem. – LvB Jan 11 '16 at 9:23
  • The keys will be generated on the server. The server will keep its private and the public will be put on the unit so it can send encrypted status updates that the server can decrypt. – Kage Jan 11 '16 at 9:29
  • 1
    Your confusing a private/public key pair with keeping a piece of data private. With the key pair has the meaning of public and private are different than in most other contexts. – LvB Jan 11 '16 at 10:24

You can incorporate a special chip called a Trusted Platform Module. TPMs were built to be tamperproof and store cryptographic keys.

  • Awesome! Never knew that existed. Thanks! At the moment, I have a Raspberry prototype. Any way of securing that this way? – Kage Jan 11 '16 at 9:09
  • Add a TPM over USB, like the NitroKey or YubiKey. – LvB Jan 11 '16 at 10:25
  • 1
    @kage, this solution will allow someone to steal the USB TPM. That may be a problem in your threat model. – Neil Smithline Jan 11 '16 at 15:58
  • I wasn't considering the USB option because if that. Further though, a friend of mine told me that even an SoC TPM can be hacked with just a bit of knowledge in electronics, and have created huge backdoors. I'm starting to wonder if a 100% secure solution even exists. – Kage Feb 13 '16 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.