0
$\begingroup$

Embedded devices send messages to the server. The server occasionally sends messages to individual devices(Reboot, upgrade firmware etc)

After some research this is my ad-hoc solution:

1) Each devices gets a unique id(like MAC address) and a public/private key pair when first programmed at the factory. The server will have a copy of the unique id and the public key for each device.

2) The server has a public certificate.

3) When the device wants to send a message: If it wants confidentiality it can encrypt the message using symmetric encryption and the key,salt etc will be encrypted with the servers public key. Then it can use it's private key to digitally sign the message which gives the message Authentication and Integrity.

4) The same process could be reversed when the server wants to send a message to the client.

5) Timestamps will be part of the message to resist replay attacks. The time needs to be fairly synchronized (within a minute of each other) for data collection purposes.

Are there any flaws with doing it this way? The devices are fairly resource constrained so have to pick fast public key algorithms.

$\endgroup$
  • $\begingroup$ Probably there is no flaw, but some questions remain. You claim that the server has a copy of each device info, does it mean that the number of device is fixed at the start up of the system and no device can be added or retired in the future? What happens if a particular device is compromised. The server has a public certificate ? Does the devices are also all be certified by the same autority? The management of Pub Keys in this case seems too restricted. $\endgroup$ – Robert NACIRI Dec 25 '14 at 22:39
  • 1
    $\begingroup$ @RobertNACIRI: When the devices are programmed with public/private key pairs. The public keys are recorded and sent to the server by the admin. The devices are programmed in batches. The server certificate will be CA issued(for revocation and easy verification etc). The client key pair is generated at the factory. A bit like generating GPG key pairs. [Note: This was posted by the OP as a non-answer, because they've apparently lost access to their original account.] $\endgroup$ – Ilmari Karonen Dec 29 '14 at 1:37
2
$\begingroup$

I do not see an immediate flow, but the public-key cryptography seems to be an overkill in your system with a single server. As long as the server keeps some keys of each device $D$, it may as well keep a single symmetric key $K_D$, and use a single authenticated encryption scheme $\Pi$ with key $K_D$, for instance, AES-GCM. This would simplify your system significantly, and you would not need certificates. You would not even need random number generator, except for the key generation.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ the public-key cryptography seems to be an overkill in your system. With a single symmetric key (remember these are embedded devices), attacking a single device means you own the 1K/10K/100K/1M deployed devices, no? Plus, remember many of these embedded devices are small, resource-constrained, and often unattended (translation: easy targets). $\endgroup$ – Dan Dec 26 '14 at 4:23
  • $\begingroup$ The key is device-dependent, it is "single" only for the purpose of encryption and authentication. $\endgroup$ – Dmitry Khovratovich Dec 26 '14 at 10:59
  • $\begingroup$ @DmitryKhovratovich: A per device AES-GCM key can take place of public/private key pairs but what happens if the server was hacked and all the keys go with it? But your point about needing a RNG is quite important, which I really didn't take into account. [Note: This was posted by the OP as a non-answer, because they've apparently lost access to their original account.] $\endgroup$ – Ilmari Karonen Dec 29 '14 at 1:38

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.