DeepCover Embedded Security in IoT: Public-key Secured Data Paths

Dependencies:   MaximInterface

The MAXREFDES155# is an internet-of-things (IoT) embedded-security reference design, built to authenticate and control a sensing node using elliptic-curve-based public-key cryptography with control and notification from a web server.

The hardware includes an ARM® mbed™ shield and attached sensor endpoint. The shield contains a DS2476 DeepCover® ECDSA/SHA-2 coprocessor, Wifi communication, LCD push-button controls, and status LEDs. The sensor endpoint is attached to the shield using a 300mm cable and contains a DS28C36 DeepCover ECDSA/SHA-2 authenticator, IR-thermal sensor, and aiming laser for the IR sensor. The MAXREFDES155# is equipped with a standard Arduino® form-factor shield connector for immediate testing using an mbed board such as the MAX32600MBED#. The combination of these two devices represent an IoT device. Communication to the web server is accomplished with the shield Wifi circuitry. Communication from the shield to the attached sensor module is accomplished over I2C . The sensor module represents an IoT endpoint that generates small data with a requirement for message authenticity/integrity and secure on/off operational control.

The design is hierarchical with each mbed platform and shield communicating data from the sensor node to a web server that maintains a centralized log and dispatches notifications as necessary. The simplicity of this design enables rapid integration into any star-topology IoT network to provide security with the low overhead and cost provided by the ECDSA-P256 asymmetric-key and SHA-256 symmetric-key algorithms.

More information about the MAXREFDES155# is available on the Maxim Integrated website.

Revision:
13:6a6225690c2e
Parent:
0:33d4e66780c0
--- a/SensorNode.hpp	Thu Jun 01 14:21:58 2017 -0500
+++ b/SensorNode.hpp	Mon Nov 06 18:12:27 2017 -0600
@@ -34,68 +34,81 @@
 #define SENSORNODE_HPP
 
 #include <stdint.h>
-#include <Callback.h>
-#include "DS28C36.hpp"
+#include <utility>
+#include <MaximInterface/Devices/DS28C36_DS2476.hpp>
+#include <MaximInterface/Utilities/Function.hpp>
 
-namespace mbed { class I2C; }
+namespace MaximInterface {
 class DS2476;
+class I2CMaster;
+} // namespace MaximInterface
 
 /// Interface to the authenticated sensor node peripheral board.
-class SensorNode
-{
+class SensorNode {
 public:
-    /// Prints a null-terminated char string.
-    typedef mbed::Callback<void(const char *)> PrintHandler;
+  /// Prints a null-terminated char string.
+  typedef MaximInterface::Function<void(const char *)> PrintHandler;
+
+  /// Style of temperature to measure.
+  enum TempStyle { AmbientTemp, ObjectTemp };
+
+  enum State {
+    Disconnected,       // No sensor node is connected.
+    Invalid,            // Sensor node is not valid.
+    ValidLaserDisabled, // Sensor node is valid, and laser is disabled.
+    ValidLaserEnabled,  // Sensor node is valid, and laser is enabled.
+    NotProvisioned      // Sensor node is not provisioned.
+  };
+
+  /// @param i2c
+  /// I2C bus connected to the sensor node. Communicates with DS28C36 and MLX90614.
+  /// @param ds2476 Coprocessor used for authentication computations.
+  SensorNode(MaximInterface::I2CMaster & i2c, MaximInterface::DS2476 & ds2476);
+
+  /// Detects if a potential sensor node is connected.
+  /// @returns True if something was detected.
+  std::pair<State, MaximInterface::error_code> detect();
+
+  /// Enable or disable the laser.
+  /// @param enabled True to enable the laser or false to disable.
+  /// @param print
+  /// Optional callback for displaying informational messages to the user.
+  /// @returns True if the operation was successful.
+  MaximInterface::error_code
+  setLaserEnabled(bool enabled, const PrintHandler & print = PrintHandler());
 
-    /// Style of temperature to measure.
-    enum TempStyle
-    {
-        AmbientTemp,
-        ObjectTemp
-    };
-    
-    /// @param i2c I2C bus connected to the sensor node. Communicates with DS28C36 and MLX90614.
-    /// @param ds2476 Coprocessor used for authentication computations.
-    SensorNode(mbed::I2C & i2c, DS2476 & ds2476);
-    
-    /// Detects if a potential sensor node is connected.
-    /// @returns True if something was detected.
-    bool detect();
-    
-    /// Checks if the sensor node is authentic.
-    /// @returns True if the sensor node passed the authentication check.
-    bool authenticate();
-    
-    /// Checks if the laser is enabled.
-    /// @param[out] enabled Set to true if the laser is enabled. Only valid if check successful.
-    /// @returns True if check was successful.
-    bool getLaserEnabled(bool & enabled);
-    
-    /// Enable or disable the laser.
-    /// @param enabled True to enable the laser or false to disable.
-    /// @param print Optional callback for displaying informational messages to the user.
-    /// @returns True if the operation was successful.
-    bool setLaserEnabled(bool enabled, const PrintHandler & print = PrintHandler());
-    
-    /// Get a temperature measurement from the MLX90614.
-    /// @param style Temperature style to read.
-    /// @param[out] temp Temperature in Celsius. Only valid if operation successful.
-    /// @returns True if the operation was successful.
-    bool readTemp(TempStyle style, double & temp);
-    
-    /// Checks if the sensor node is provisioned.
-    /// @param[out] provisioned True if provisioned. Only valid if check successful.
-    /// @returns True if the check was successful.
-    bool getProvisioned(bool & provisioned);
-    
-    /// Provision the sensor node.
-    /// @returns True if the operation was successful.
-    bool provision();
-    
+  /// Get a temperature measurement from the MLX90614.
+  /// @param style Temperature style to read.
+  /// @param[out] temp Temperature in Celsius. Only valid if operation successful.
+  /// @returns True if the operation was successful.
+  bool readTemp(TempStyle style, double & temp);
+
+  /// Provision the sensor node.
+  /// @returns True if the operation was successful.
+  MaximInterface::error_code provision();
+
 private:
-    mbed::I2C & i2c;
-    DS28C36 ds28c36;
-    DS2476 & ds2476;
+  /// Checks if the sensor node is authentic.
+  /// @returns True if the sensor node passed the authentication check.
+  MaximInterface::error_code authenticate();
+
+  /// Checks if the laser is enabled.
+  /// @param[out] enabled
+  /// Set to true if the laser is enabled. Only valid if check successful.
+  /// @returns True if check was successful.
+  MaximInterface::error_code getLaserEnabled(bool & enabled);
+
+  /// Checks if the sensor node is provisioned.
+  /// @param[out] provisioned
+  /// True if provisioned. Only valid if check successful.
+  /// @returns True if the check was successful.
+  MaximInterface::error_code getProvisioned(bool & provisioned);
+
+  MaximInterface::I2CMaster & i2c;
+  MaximInterface::DS28C36 ds28c36;
+  MaximInterface::DS2476 & ds2476;
+  MaximInterface::RomId romId;
+  MaximInterface::ManId manId;
 };
 
 #endif