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:
11:989eabe2a376
Parent:
10:71359af61af8
Child:
13:6a6225690c2e
--- a/Bitmap.hpp	Mon Apr 10 11:55:33 2017 -0500
+++ b/Bitmap.hpp	Wed May 03 16:08:59 2017 -0500
@@ -37,38 +37,23 @@
 #include <stdint.h>
 #include <vector>
 
-/// Stores a black and white bitmap image for display on the LCD.
+/// Stores a black and white bitmap image.
 class Bitmap
 {
-public:
-    typedef std::vector<uint8_t> SegmentBuffer;
-    
-    /// Format specifier used when loading image from raw bytes.
-    enum Format
-    {
-        NativeFormat, ///< Native format used by LCD.
-        ScanLineFormat ///< Traditional left to right scan line format.
-    };
-    
-    /// Number of pixels contained in a segment.
-    static const int pixelsPerSegment = 8;
-    
-    /// Construct a bitmap with specified dimensions and optionally load from byte array.
+public:    
+    /// Construct a zero-initialized bitmap with specified dimensions.
     /// @param width Width in pixels that is >= 1.
     /// @param height Height in pixels that is >= 1.
-    /// @param data Image data to load. Data size must match the dimensions of the bitmap.
-    ///     May be set to NULL to disable loading.
-    /// @param format Format of the image data to load.
-    Bitmap(int width, int height, const uint8_t * data = NULL, Format format = NativeFormat);
+    Bitmap(int width, int height);
 
-    /// Load image data from a byte array.
-    /// @param data Image data to load. Data size must match the dimensions of the bitmap.
-    /// @param format Format of the image data to load.
-    void load(const uint8_t * data, Format format);
+    /// Load bitmap from a byte array.
+    /// @param data Array of scanline bitmap data.
+    /// @param size Size of data array.
+    /// @param width Width of loaded image in pixels that is >= 1.
+    Bitmap(const uint8_t * data, size_t size, int width);
     
     int width() const { return m_width; } ///< Width in pixels.
     int height() const { return m_height; } ///< Height in pixels.
-    const SegmentBuffer & data() const { return m_data; } ///< Image data ready for loading into LCD.
     
     /// Check if a pixel is enabled (black).
     /// @returns True if the pixel is enabled. Returns false if the coordinate is out of range.
@@ -78,10 +63,18 @@
     void setPixelEnabled(int x, int y, bool enabled);
     
     /// Overlay another bitmap on top of this bitmap.
+    /// @param x x-coordinate location to overlay.
+    /// @param y y-coordinate location to overlay.
     /// @param src Bitmap to overlay.
-    /// @param srcX x-coordinate location to overlay.
-    /// @param srcY y-coordinate location to overlay.
-    void overlay(const Bitmap & src, int srcX, int srcY);
+    void overlay(int x, int y, const Bitmap & src);
+    
+    /// Overlay bitmap data from a byte array on top of this bitmap.
+    /// @param x x-coordinate location to overlay.
+    /// @param y y-coordinate location to overlay.
+    /// @param data Array of scanline bitmap data.
+    /// @param size Size of data array.
+    /// @param width Width of overlayed image in pixels that is >= 1.
+    void overlay(int x, int y, const uint8_t * data, size_t size, int width);
     
     /// Reset to initial state.
     void clear();
@@ -94,7 +87,7 @@
 private:
     int m_width;
     int m_height;
-    SegmentBuffer m_data;
+    std::vector<uint8_t> m_data;
 };
 
 #endif