0
$\begingroup$

Is it possible to have different keys on alot of (embedded) devices and just have 1 key on a server (to witch all these devices connect)? The main point here being when 1 device is compromised this does not mean the traffic between other devices and the server is compromised (even if the server does not know that 1 device is compromised).

Background:
All the devices will have a key pre-installed during the assembly of the device but must be changeable over internet.
Currently all devices in 1 system (a customer can have multiple systems) have the same key. But I am trying to create it in such a way that they all have different keys, hence the question.

What I think I know:
1. I believe DVD's and dvd-players use a similar scheme (ccr?) but this is broken.
2. There are Key Derivation Functions which could be used for this scenario.

For point 2 I am not quite sure how to use this i can (when assembling the device) make a salt and use it with (for example) PBKDF2 and a master key (which the server will have) than store the PBKDF2 generated key and the salt on the device and send over the salt to the server when the device is connecting so the server can create the key again. though after this i should set up a session key as well. and worst of all the salt will be vulnerable.

So this to me does not seem like a solution.

How should I do this properly, or am I looking at this the wrong way and should i do something different?

$\endgroup$
3
$\begingroup$

Simple solution (with symmetric encryption):

  • Assign each device an ID (probably already present)
  • Store a master key on the server
  • Use a KDF on the master key and the device ID to generate the key for the device. Then you only need the device ID on the device, and the server can re-create that key as required with the master key and the device ID. Of course the device ID has to be transmitting at the connection phase.
  • If you want to change keys for the devices, you will also need some random input to the KDF, which also has to be stored for each device ID.

That way each device has its own key, and the server can reconstruct all keys just from his one master key. However, this way the devices have no shared keys and cannot communicate with each other. For that you would either need some sort of public key infrastructure, or you could apply an IBE scheme to your devices, where the server holds the master key. However, public key encryption is quite a bit less efficient than symmetric encryption and hashing, so that you have to check the limitations of your devices.

$\endgroup$
  • $\begingroup$ Communication between devices always runs through the server, so there we are safe. But i would have to send the device ID in the plain to the server right? wouldn't that make it vulnerable? $\endgroup$ – Vincent Apr 20 '15 at 14:50
  • $\begingroup$ Your device needs to tell the server anyway, who is sending a message or where the answer should be send back. If you use a proper KDF, then knowing the ID does not help finding the key for the device (assuming your master key is still save and long enough). If your scenario should also consider e.g. replay attacks, you probably should have some algorithm for key agreement for an actual session key. $\endgroup$ – tylo Apr 21 '15 at 9:07

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.