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:
8:a0d75dff3c9b
Parent:
0:33d4e66780c0
Child:
10:71359af61af8
--- a/Graphic.hpp	Thu Mar 09 11:38:33 2017 -0600
+++ b/Graphic.hpp	Thu Apr 06 15:16:30 2017 -0500
@@ -38,6 +38,8 @@
 #include "Bitmap.hpp"
 #include "Keys.hpp"
 
+class Display;
+
 /// Base class for all graphical elements.
 /// @details Includes unique parent-child relationships for creating trees of graphical objects.
 class Graphic
@@ -45,7 +47,7 @@
 public:
     typedef std::vector<Graphic *> ChildContainer;
 
-    explicit Graphic(Graphic * parent = NULL);
+    Graphic();
     virtual ~Graphic();
     
     /// @{
@@ -53,6 +55,7 @@
     Graphic * parent() { return m_parent; }
     const Graphic * parent() const { return m_parent; }
     /// @note Adds this graphic to the parent's list of children.
+    /// @sa childrenChanged
     void setParent(Graphic * parent);
     /// @}
     /// List of child graphics for this parent.
@@ -65,45 +68,40 @@
     bool focused() const;
     /// @brief Set this graphic as the focused graphic.
     /// @details The focused graphic is the first to receive input events such as key presses.
+    /// @sa focusChanged
     void setFocused();
 
     /// @{
-    /// Set the coordinates of this graphic in pixels.
+    /// Coordinates of this graphic in pixels.
     /// @details Coordinates are relative to the top-left corner of the parent graphic.
     int x() const { return m_x; }
-    void setX(int x);
     int y() const { return m_y; }
-    void setY(int y);
-    /// @}
-    
-    /// @{
-    /// Set the displayed dimensions of this graphic in pixels. Minimum width and height is 1.
-    int width() const { return m_width; }
-    void setWidth(int width);
-    int height() const { return m_height; }
-    void setHeight(int height);
     /// @}
     
     /// @{
-    /// Preferred (autoscaled) dimensions of this graphic.
-    virtual int preferredWidth() const { return width(); }
-    virtual int preferredHeight() const { return height(); }
+    /// Displayed dimensions of this graphic in pixels.
+    int width() const { return m_width; }
+    int height() const { return m_height; }
     /// @}
     
+    /// Move graphic to a new location measured in pixels.
+    /// @details Coordinates are relative to the top-left corner of the parent graphic.
+    /// @sa moved
+    void move(int x, int y);
+    
+    /// Resize graphic to a new size measure in pixels. Minimum width and height is 1.
+    /// @sa resized
+    void resize(int width, int height);
+    
     /// Render this graphic as a bitmap.
-    /// @details The default implementation renders each child in order.
-    virtual Bitmap render() const;
-    
-    /// Update this graphic and all child graphics.
-    /// @details
-    /// Updating consists of two stages: layout and post-layout. Layout is only performed on a
-    /// graphic if the current layout has been invalidated. Post-layout is always performed. Each
-    /// stage first performed on this graphic and then progresses through each sub-tree in child order.
-    /// All graphic properties should be valid when this function returns. The regionValid and
-    /// layoutValid properties will automatically be reset to true.
-    /// @sa doLayout doPostLayout
-    /// @returns True if the screen should be redrawn or false if it does not need to be redrawn.
-    bool update();
+    /// @sa doRender
+    Bitmap render() const;
+        
+    /// Update this graphic and all child graphics. Checks if graphic has been invalidated and
+    /// should be redrawn on the screen.
+    /// @param display Display used for rendering. May be set to NULL to defer redraw.
+    /// @sa updated
+    void update(Display * display);
     
     /// Process a key-press input event.
     /// @details
@@ -113,30 +111,34 @@
     /// @returns True if the key event was handled.
     bool processKey(Key key);
     
-protected:
-    /// Visual region valid property.
-    /// @returns True if valid, false if an update may be required.
-    bool regionValid() const { return m_regionValid; }
+protected:   
+    /// Mark the visual region as invalid.
+    /// @note Indicates a redraw is necessary during next update.
+    void invalidate() { m_valid = false; }
     
-    /// Invalidate the region valid property.
-    void invalidateRegion() { m_regionValid = false; }
+    /// Event handler for when a child is added or removed.
+    virtual void childrenChanged();
+    
+    /// Event handler for when this graphic has been focused or unfocused.
+    /// @param focused True if focused or false if unfocused.
+    virtual void focusChanged(bool focused);
     
-    /// Layout valid property.
-    /// @returns True if valid, false if a layout update is required.
-    bool layoutValid() const { return m_layoutValid; }
+    /// Event handler for when this graphic has been moved.
+    virtual void moved();
+    
+    /// Event handler for when this graphic has been resized.
+    virtual void resized();
     
-    /// Invalidate the layout valid property.
-    void invalidateLayout() { m_layoutValid = false; }
-
-    /// Perform the layout of all child objects.
-    virtual void doLayout() { }
+    /// Event handler for when this graphic has been updated.
+    virtual void updated();
     
-    /// Perform post-layout property updates and/or periodic tasks.
-    virtual void doPostLayout() { }
+    /// Render this graphic as a bitmap.
+    /// @details The default implementation renders each child in order.
+    virtual void doRender(Bitmap & bitmap) const;
     
     /// Process a key-press input event.
     /// @returns True if the key event was handled. False if the key event should be propagated.
-    virtual bool doProcessKey(Key) { return false; }
+    virtual bool doProcessKey(Key);
 
 private:
     Graphic * m_parent;
@@ -146,11 +148,11 @@
     int m_y;
     int m_width;
     int m_height;
-    bool m_regionValid;
-    bool m_layoutValid;
+    bool m_valid;
     
-    bool doLayoutAll();
-    bool doPostLayoutAll();
+    /// @param setValid True to mark this graphic as valid again.
+    /// @returns True if this graphic should be redrawn.
+    bool doUpdate(bool setValid);
     
     // Uncopyable
     Graphic(const Graphic &);