ALGORITHM FOR SECURE COMMUNICATIONS USING SYMMETRIC KEYS
A method and system for establishing an encrypted communication between a server and client device. A method may include receiving an integrity check image in random-access memory (RAM) from a server; storing the integrity check image in the RAM of the device; and executing an integrity check using instructions of the integrity check image from the RAM. The method may include transmitting a hash value and a temporary cryptographic key to the server based on validating the integrity check image; receiving an encryption key from the server; and communicating with the server using the received encryption key.
1 . A method for a client device to establish an encrypted communication, the method comprising:
receiving, at a client device, an integrity check image in random-access memory (RAM) from a server;
storing the integrity check image in the RAM of the device;
executing an integrity check using instructions of the integrity check image from the RAM;
transmitting a hash value and a temporary cryptographic key to the server based on validating the integrity check image;
receiving an encryption key from the server; and
communicating with the server using the received encryption key.
2 . The method of claim 1 , wherein the integrity check image comprises a random key and instructions to validate an identifier of the client device and an application image of the client device.
3 . The method of claim 1 , further comprising terminating the integrity check in the RAM of the client device and switching to application code, responsive to receiving and validating the encryption key, wherein the application code is stored in flash memory, wherein the encryption key is a symmetric encryption key.
4 . The method of claim 1 , further comprising erasing the integrity check image from the RAM responsive to storing the encryption key on a flash memory of the client device.
5 . The method of claim 1 , further comprising validating the encryption key prior to storing the encryption key in the flash memory of the client device.
6 . The method of claim 1 , further comprising receiving a subsequent integrity check image for execution in the client device or terminating communication with the server responsive to the integrity check failing.
7 . The method of claim 1 , further comprising erasing the flash memory and write the proper application image to the flash memory of the client device.
8 . The method of claim 1 , further comprising periodically changing the encryption key.
9 . A method for operating a server for establishing an encrypted communication, the method comprising:
transmitting, at the server, an integrity check image to a client device for storing on random-access memory (RAM) of the client device, wherein the integrity check image is executed in the RAM and controls operation of the client device;
executing instructions of the integrity check image from the RAM;
receiving a hash value and a temporary cryptographic key from the client device, responsive to performing instructions of the integrity check image on the client device based on validating the integrity check image at the client device;
transmitting an encryption key to the client device; and
communicating with the client device using the received encryption key.
10 . The method of claim 9 , wherein the integrity check image comprises a random key and instructions to validate an identifier of the client device and an application image of the client device.
11 . The method of claim 9 , further comprising verifying the temporary cryptographic key and the application image prior to transmitting the encryption key to the client device, wherein the encryption key is a symmetric encryption key.
12 . The method of claim 9 , further comprising terminating the integrity check in the RAM of the client device and switching to application code of the client device, responsive to receiving and validating the symmetric key, wherein the application code is stored in flash memory.
13 . The method of claim 9 , further comprising validating the encryption key at the client device prior to storing the encryption on the flash memory of the client device.
14 . The method of claim 9 , further comprising transmitting a subsequent integrity check image for execution in the client device or terminating communication with the client device responsive to the integrity check failing at the client device.
15 . A system for establishing an encrypted communication between a server and client device, the method comprising:
a server configured to:
generate an integrity check image;
transmit the integrity check image to a client device;
the client device configured to:
receive and store the integrity check image in the random-access memory (RAM);
execute instructions of the integrity check image from the RAM;
transmit a hash value and a temporary cryptographic key to the server based on validating the integrity check image;
receive an encryption key from the server; and
communicate with the server using the received encryption key.
16 . The system of claim 15 , wherein the integrity check image comprises a random key and instructions to validate an identifier of the client device and an application image of the client device.
17 . The system of claim 15 , wherein the encryption key is a symmetric encryption key.
18 . The system of claim 15 , wherein the client device is further configured to terminate the integrity check in the RAM of the client device and switch to application code responsive to receiving and validating the symmetric key, wherein the application code is stored in flash memory.
19 . The system of claim 15 , wherein the client device is further configured to erase the integrity check image from the RAM responsive to storing the encryption key on a flash memory of the client device.
20 . The system of claim 15 , wherein the client device is further configured to validate the encryption key prior to storing the encryption key in the flash memory of the client device.