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.
Diff: main.cpp
- Revision:
- 13:6a6225690c2e
- Parent:
- 10:71359af61af8
diff -r 46c5974a565f -r 6a6225690c2e main.cpp --- a/main.cpp Thu Jun 01 14:21:58 2017 -0500 +++ b/main.cpp Mon Nov 06 18:12:27 2017 -0600 @@ -33,13 +33,15 @@ #include <string> #include <DigitalIn.h> #include <I2C.h> -#include "SensorNode.hpp" -#include "DS2476.hpp" +#include <MaximInterface/Platforms/mbed/I2CMaster.hpp> +#include <MaximInterface/Platforms/mbed/Sleep.hpp> +#include <MaximInterface/Devices/DS28C36_DS2476.hpp> #include "CC3100.hpp" #include "Display.hpp" +#include "InitWindow.hpp" #include "Keys.hpp" +#include "SensorNode.hpp" #include "WindowManager.hpp" -#include "InitWindow.hpp" static mbed::DigitalIn upButton(D5); static mbed::DigitalIn downButton(D4); @@ -51,71 +53,56 @@ static Display display(D11, D12, D13, D7, D6); static WindowManager windowManager(display.canvas()); -static mbed::I2C i2c(D14, D15); -DS2476 coproc(i2c); +static mbed::I2C mbedI2C(D14, D15); +static MaximInterface::mbed::I2CMaster i2c(mbedI2C); +MaximInterface::DS2476 coproc(MaximInterface::mbed::Sleep::instance(), i2c); SensorNode sensorNode(i2c, coproc); std::string webId; static bool buttonPressed(mbed::DigitalIn & button); -int main() -{ - i2c.frequency(100000); - display.initialize(); - // Set initial window. - { - std::auto_ptr<Window> window(new InitWindow); - windowManager.push(window); +int main() { + mbedI2C.frequency(100000); + display.initialize(); + // Set initial window. + { + std::auto_ptr<Window> window(new InitWindow); + windowManager.push(window); + } + while (true) { + // Update window manager and redraw screen if necessary. + if (windowManager.update()) { + display.update(); } - while (true) - { - // Update window manager and redraw screen if necessary. - if (windowManager.update()) - { - display.update(); - } - // Update CC3100 Wi-Fi interface. - CC3100::instance().update(); - // Check if any buttons are pressed. - if (buttonPressed(leftClickButton)) - { - windowManager.processKey(LeftClickKey); - } - else if (buttonPressed(rightClickButton)) - { - windowManager.processKey(RightClickKey); - } - else if (buttonPressed(upButton)) - { - windowManager.processKey(UpKey); - } - else if (buttonPressed(downButton)) - { - windowManager.processKey(DownKey); - } - else if (buttonPressed(leftButton)) - { - windowManager.processKey(LeftKey); - } - else if (buttonPressed(rightButton)) - { - windowManager.processKey(RightKey); - } + // Update CC3100 Wi-Fi interface. + CC3100::instance().update(); + // Check if any buttons are pressed. + if (buttonPressed(leftClickButton)) { + windowManager.processKey(LeftClickKey); + } else if (buttonPressed(rightClickButton)) { + windowManager.processKey(RightClickKey); + } else if (buttonPressed(upButton)) { + windowManager.processKey(UpKey); + } else if (buttonPressed(downButton)) { + windowManager.processKey(DownKey); + } else if (buttonPressed(leftButton)) { + windowManager.processKey(LeftKey); + } else if (buttonPressed(rightButton)) { + windowManager.processKey(RightKey); } + } } /// Checks if button is pressed and waits for release. /// @param button Active low button to check. /// @returns True if pressed. -static bool buttonPressed(mbed::DigitalIn & button) -{ - const int buttonPressed = 0; // Active low - if (button == buttonPressed) - { - while (button == buttonPressed) ; - return true; - } - // else - return false; +static bool buttonPressed(mbed::DigitalIn & button) { + const int buttonPressed = 0; // Active low + if (button == buttonPressed) { + while (button == buttonPressed); + return true; + } + // else + return false; }