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.

Committer:
IanBenzMaxim
Date:
Fri Jan 19 10:28:27 2018 -0600
Revision:
15:75404fab3615
Parent:
13:6a6225690c2e
Updated MaximInterface revision.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
IanBenzMaxim 0:33d4e66780c0 1 /*******************************************************************************
IanBenzMaxim 0:33d4e66780c0 2 * Copyright (C) 2017 Maxim Integrated Products, Inc., All Rights Reserved.
IanBenzMaxim 0:33d4e66780c0 3 *
IanBenzMaxim 0:33d4e66780c0 4 * Permission is hereby granted, free of charge, to any person obtaining a
IanBenzMaxim 0:33d4e66780c0 5 * copy of this software and associated documentation files (the "Software"),
IanBenzMaxim 0:33d4e66780c0 6 * to deal in the Software without restriction, including without limitation
IanBenzMaxim 0:33d4e66780c0 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
IanBenzMaxim 0:33d4e66780c0 8 * and/or sell copies of the Software, and to permit persons to whom the
IanBenzMaxim 0:33d4e66780c0 9 * Software is furnished to do so, subject to the following conditions:
IanBenzMaxim 0:33d4e66780c0 10 *
IanBenzMaxim 0:33d4e66780c0 11 * The above copyright notice and this permission notice shall be included
IanBenzMaxim 0:33d4e66780c0 12 * in all copies or substantial portions of the Software.
IanBenzMaxim 0:33d4e66780c0 13 *
IanBenzMaxim 0:33d4e66780c0 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
IanBenzMaxim 0:33d4e66780c0 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
IanBenzMaxim 0:33d4e66780c0 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IanBenzMaxim 0:33d4e66780c0 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
IanBenzMaxim 0:33d4e66780c0 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
IanBenzMaxim 0:33d4e66780c0 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
IanBenzMaxim 0:33d4e66780c0 20 * OTHER DEALINGS IN THE SOFTWARE.
IanBenzMaxim 0:33d4e66780c0 21 *
IanBenzMaxim 0:33d4e66780c0 22 * Except as contained in this notice, the name of Maxim Integrated
IanBenzMaxim 0:33d4e66780c0 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
IanBenzMaxim 0:33d4e66780c0 24 * Products, Inc. Branding Policy.
IanBenzMaxim 0:33d4e66780c0 25 *
IanBenzMaxim 0:33d4e66780c0 26 * The mere transfer of this software does not imply any licenses
IanBenzMaxim 0:33d4e66780c0 27 * of trade secrets, proprietary technology, copyrights, patents,
IanBenzMaxim 0:33d4e66780c0 28 * trademarks, maskwork rights, or any other form of intellectual
IanBenzMaxim 0:33d4e66780c0 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
IanBenzMaxim 0:33d4e66780c0 30 * ownership rights.
IanBenzMaxim 0:33d4e66780c0 31 *******************************************************************************/
IanBenzMaxim 0:33d4e66780c0 32
IanBenzMaxim 0:33d4e66780c0 33 #ifndef GRAPHIC_HPP
IanBenzMaxim 0:33d4e66780c0 34 #define GRAPHIC_HPP
IanBenzMaxim 0:33d4e66780c0 35
IanBenzMaxim 0:33d4e66780c0 36 #include <stddef.h>
IanBenzMaxim 0:33d4e66780c0 37 #include <vector>
IanBenzMaxim 0:33d4e66780c0 38 #include "Keys.hpp"
IanBenzMaxim 0:33d4e66780c0 39
IanBenzMaxim 10:71359af61af8 40 class Bitmap;
IanBenzMaxim 8:a0d75dff3c9b 41
IanBenzMaxim 0:33d4e66780c0 42 /// Base class for all graphical elements.
IanBenzMaxim 13:6a6225690c2e 43 /// @details Includes unique parent-child relationships for creating trees of
IanBenzMaxim 13:6a6225690c2e 44 /// graphical objects.
IanBenzMaxim 13:6a6225690c2e 45 class Graphic {
IanBenzMaxim 0:33d4e66780c0 46 public:
IanBenzMaxim 13:6a6225690c2e 47 typedef std::vector<Graphic *> ChildContainer;
IanBenzMaxim 13:6a6225690c2e 48
IanBenzMaxim 13:6a6225690c2e 49 Graphic();
IanBenzMaxim 13:6a6225690c2e 50 virtual ~Graphic();
IanBenzMaxim 13:6a6225690c2e 51
IanBenzMaxim 13:6a6225690c2e 52 /// @{
IanBenzMaxim 13:6a6225690c2e 53 /// Get or set the parent graphic of this graphic. Set to NULL if this graphic
IanBenzMaxim 13:6a6225690c2e 54 /// has no parent.
IanBenzMaxim 13:6a6225690c2e 55 Graphic * parent() { return m_parent; }
IanBenzMaxim 13:6a6225690c2e 56 const Graphic * parent() const { return m_parent; }
IanBenzMaxim 13:6a6225690c2e 57 /// @note Adds this graphic to the parent's list of children.
IanBenzMaxim 13:6a6225690c2e 58 /// @sa childrenChanged
IanBenzMaxim 13:6a6225690c2e 59 void setParent(Graphic * parent);
IanBenzMaxim 13:6a6225690c2e 60 /// @}
IanBenzMaxim 13:6a6225690c2e 61 /// List of child graphics for this parent.
IanBenzMaxim 13:6a6225690c2e 62 /// @note Children should be added and removed by calling setParent. Children
IanBenzMaxim 13:6a6225690c2e 63 /// will be removed automatically when they are destroyed.
IanBenzMaxim 13:6a6225690c2e 64 const ChildContainer & children() const { return m_children; }
IanBenzMaxim 0:33d4e66780c0 65
IanBenzMaxim 13:6a6225690c2e 66 /// @brief Check if this graphic is focused.
IanBenzMaxim 13:6a6225690c2e 67 /// @returns True if focused.
IanBenzMaxim 13:6a6225690c2e 68 bool focused() const;
IanBenzMaxim 13:6a6225690c2e 69 /// @brief Set this graphic as the focused graphic.
IanBenzMaxim 13:6a6225690c2e 70 /// @details The focused graphic is the first to receive input events such as
IanBenzMaxim 13:6a6225690c2e 71 /// key presses.
IanBenzMaxim 13:6a6225690c2e 72 /// @sa focusChanged
IanBenzMaxim 13:6a6225690c2e 73 void setFocused();
IanBenzMaxim 13:6a6225690c2e 74
IanBenzMaxim 13:6a6225690c2e 75 /// @{
IanBenzMaxim 13:6a6225690c2e 76 /// Coordinates of this graphic in pixels.
IanBenzMaxim 13:6a6225690c2e 77 /// @details
IanBenzMaxim 13:6a6225690c2e 78 /// Coordinates are relative to the top-left corner of the parent graphic.
IanBenzMaxim 13:6a6225690c2e 79 int x() const { return m_x; }
IanBenzMaxim 13:6a6225690c2e 80 int y() const { return m_y; }
IanBenzMaxim 13:6a6225690c2e 81 /// @}
IanBenzMaxim 13:6a6225690c2e 82
IanBenzMaxim 13:6a6225690c2e 83 /// @{
IanBenzMaxim 13:6a6225690c2e 84 /// Displayed dimensions of this graphic in pixels.
IanBenzMaxim 13:6a6225690c2e 85 int width() const { return m_width; }
IanBenzMaxim 13:6a6225690c2e 86 int height() const { return m_height; }
IanBenzMaxim 13:6a6225690c2e 87 /// @}
IanBenzMaxim 13:6a6225690c2e 88
IanBenzMaxim 13:6a6225690c2e 89 /// Move graphic to a new location measured in pixels.
IanBenzMaxim 13:6a6225690c2e 90 /// @details
IanBenzMaxim 13:6a6225690c2e 91 /// Coordinates are relative to the top-left corner of the parent graphic.
IanBenzMaxim 13:6a6225690c2e 92 /// @sa moved
IanBenzMaxim 13:6a6225690c2e 93 void move(int x, int y);
IanBenzMaxim 0:33d4e66780c0 94
IanBenzMaxim 13:6a6225690c2e 95 /// Resize graphic to a new size measure in pixels. Minimum width and height is 1.
IanBenzMaxim 13:6a6225690c2e 96 /// @sa resized
IanBenzMaxim 13:6a6225690c2e 97 void resize(int width, int height);
IanBenzMaxim 13:6a6225690c2e 98
IanBenzMaxim 13:6a6225690c2e 99 /// @{
IanBenzMaxim 13:6a6225690c2e 100 /// Render this graphic onto a bitmap.
IanBenzMaxim 13:6a6225690c2e 101 void render(Bitmap & bitmap, int xOffset, int yOffset) const;
IanBenzMaxim 13:6a6225690c2e 102 void render(Bitmap & bitmap) const;
IanBenzMaxim 13:6a6225690c2e 103 /// @}
IanBenzMaxim 13:6a6225690c2e 104
IanBenzMaxim 13:6a6225690c2e 105 /// Update this graphic and all child graphics. Checks if graphic has been
IanBenzMaxim 13:6a6225690c2e 106 /// invalidated and should be redrawn.
IanBenzMaxim 13:6a6225690c2e 107 /// @param canvas Canvas used for rendering. May be set to NULL to defer redraw.
IanBenzMaxim 13:6a6225690c2e 108 /// @returns True if the canvas has been updated.
IanBenzMaxim 13:6a6225690c2e 109 /// @sa updated
IanBenzMaxim 13:6a6225690c2e 110 bool update(Bitmap * canvas);
IanBenzMaxim 13:6a6225690c2e 111
IanBenzMaxim 13:6a6225690c2e 112 /// Process a key-press input event.
IanBenzMaxim 13:6a6225690c2e 113 /// @details
IanBenzMaxim 13:6a6225690c2e 114 /// The event will first be directed to the focused graphic. Processing will
IanBenzMaxim 13:6a6225690c2e 115 /// proceed to each parent graphic until it has been handled.
IanBenzMaxim 13:6a6225690c2e 116 /// @sa doProcessKey
IanBenzMaxim 13:6a6225690c2e 117 /// @returns True if the key event was handled.
IanBenzMaxim 13:6a6225690c2e 118 bool processKey(Key key);
IanBenzMaxim 13:6a6225690c2e 119
IanBenzMaxim 13:6a6225690c2e 120 protected:
IanBenzMaxim 13:6a6225690c2e 121 /// Mark the visual region as invalid.
IanBenzMaxim 13:6a6225690c2e 122 /// @note Indicates a redraw is necessary during next update.
IanBenzMaxim 13:6a6225690c2e 123 void invalidate() { m_valid = false; }
IanBenzMaxim 13:6a6225690c2e 124
IanBenzMaxim 13:6a6225690c2e 125 /// Event handler for when a child is added or removed.
IanBenzMaxim 13:6a6225690c2e 126 virtual void childrenChanged();
IanBenzMaxim 13:6a6225690c2e 127
IanBenzMaxim 13:6a6225690c2e 128 /// Event handler for when this graphic has been focused or unfocused.
IanBenzMaxim 13:6a6225690c2e 129 /// @param focused True if focused or false if unfocused.
IanBenzMaxim 13:6a6225690c2e 130 virtual void focusChanged(bool focused);
IanBenzMaxim 13:6a6225690c2e 131
IanBenzMaxim 13:6a6225690c2e 132 /// Event handler for when this graphic has been moved.
IanBenzMaxim 13:6a6225690c2e 133 virtual void moved();
IanBenzMaxim 13:6a6225690c2e 134
IanBenzMaxim 13:6a6225690c2e 135 /// Event handler for when this graphic has been resized.
IanBenzMaxim 13:6a6225690c2e 136 virtual void resized();
IanBenzMaxim 13:6a6225690c2e 137
IanBenzMaxim 13:6a6225690c2e 138 /// Event handler for when this graphic has been updated.
IanBenzMaxim 13:6a6225690c2e 139 virtual void updated();
IanBenzMaxim 13:6a6225690c2e 140
IanBenzMaxim 13:6a6225690c2e 141 /// Render this graphic onto a bitmap.
IanBenzMaxim 13:6a6225690c2e 142 /// @details The default implementation renders each child in order.
IanBenzMaxim 13:6a6225690c2e 143 virtual void doRender(Bitmap & bitmap, int xOffset, int yOffset) const;
IanBenzMaxim 13:6a6225690c2e 144
IanBenzMaxim 13:6a6225690c2e 145 /// Process a key-press input event.
IanBenzMaxim 13:6a6225690c2e 146 /// @returns True if the key event was handled. False if the key event should
IanBenzMaxim 13:6a6225690c2e 147 /// be propagated.
IanBenzMaxim 13:6a6225690c2e 148 virtual bool doProcessKey(Key);
IanBenzMaxim 0:33d4e66780c0 149
IanBenzMaxim 0:33d4e66780c0 150 private:
IanBenzMaxim 13:6a6225690c2e 151 Graphic * m_parent;
IanBenzMaxim 13:6a6225690c2e 152 ChildContainer m_children;
IanBenzMaxim 13:6a6225690c2e 153 Graphic * m_focusedChild;
IanBenzMaxim 13:6a6225690c2e 154 int m_x;
IanBenzMaxim 13:6a6225690c2e 155 int m_y;
IanBenzMaxim 13:6a6225690c2e 156 int m_width;
IanBenzMaxim 13:6a6225690c2e 157 int m_height;
IanBenzMaxim 13:6a6225690c2e 158 bool m_valid;
IanBenzMaxim 13:6a6225690c2e 159
IanBenzMaxim 13:6a6225690c2e 160 void updateAll();
IanBenzMaxim 13:6a6225690c2e 161 bool redrawInvalid(Bitmap & canvas);
IanBenzMaxim 13:6a6225690c2e 162 void setAllValid();
IanBenzMaxim 13:6a6225690c2e 163
IanBenzMaxim 13:6a6225690c2e 164 // Uncopyable
IanBenzMaxim 13:6a6225690c2e 165 Graphic(const Graphic &);
IanBenzMaxim 13:6a6225690c2e 166 const Graphic & operator=(const Graphic &);
IanBenzMaxim 0:33d4e66780c0 167 };
IanBenzMaxim 0:33d4e66780c0 168
IanBenzMaxim 0:33d4e66780c0 169 #endif