Commit Graph
11 Commits
Author SHA1 Message Date
Patrick Fallberg 02fbe536d4 Signing infrastructure refactored
Signing logic has now been centralized to MySigning.cpp in order to simplify
maintenance and debugging.
Debug prints have been extended and "demoted" to verbose level.
To get signing related debug info, MY_DEBUG_VERBOSE will need to be defined.
This fixes #278
2016-01-12 08:41:54 +01:00
Thomas Mørch 62f9d9e654 Updated core atsha204 driver for avr/samd compatability, renamed macro names in fat library 2015-12-10 17:24:58 +01:00
Thomas Mørch e2f45251a0 Bringing back AVR specific code, for time critical operations 2015-12-10 17:11:37 +01:00
Thomas Mørch 396a5fe5b0 converted (fat) sha204 to use standard arduino cmds for pin handling 2015-12-08 21:12:57 +01:00
Patrick Fallberg af6e5d3019 Resolved various compiler warnings
This should make Jenkins happy.
2015-08-09 10:06:09 +02:00
Henrik Ekblad fb1c542862 Move SHA204 personalizer sketch to MySensors examples
Fix include errors.
2015-02-22 23:22:06 +01:00
Patrick Fallberg 4d3fc96ebf ATSHA204 personalization sketch updated
New default pin is A3.

New option to skip UART confirmation: SKIP_UART_CONFIRMATION
This option prohibits the possibility to auto-generate key as there
will probably not be a way to show the generated key to the user.

More copy+paste friendly serial output of the generated key for
insertion into personalization sketch.
2015-02-16 22:30:50 +01:00
Patrick Fallberg 6aa370d6f2 Personalization sketch for ATSHA204
This sketch is used to personalize the ATSHA204 crypto
circuit.
This is required in order to use the device for secure
communication.

The sketch also supports random key generation.

To personalize a ATSHA204 device, do the following:
1. Ensure the correct pin is used for the ATSHA204.
2. Execute the sketch without other changes to verify
   that it can communicate properly with the device.
3g. For a device used in a gateway:
    Enable LOCK_CONFIGURATION to lock the configuration
    and enable random key generation as well as key storage.
4g. Execute the sketch to lock the configuration and obtain
    a unique key. Be sure to note down the key printed in the
    UART log as it has been stored in the chip and will never
    be accessible again (a new key is calculated on subsequent
    runs).
    The key can still be changed.
5g. Enable SKIP_KEY_STORAGE to prevent generating new random
    keys on sketch re-execution.
3n. For a device used as a node:
    Enable USER_KEY_DATA and enter your private key data
    in user_key_data.
    Then enable LOCK_CONFIGURATION to lock the configuration
4n. Execute the sketch to lock the configuration and store
    the user-supplied key.
5n. Optionally: Enable SKIP_KEY_STORAGE to prevent re-writing
    the user supplied key on sketch re-execution.
6.  Optionally: Enable LOCK_DATA to prevent the key to be
    changed.
2015-01-10 19:57:09 +01:00
Patrick Fallberg 963a756605 sha204 library extended with CRC calculator
Locking operations are recommended to include CRC
and since sha204 library internally carries the proper
algorithm for this, it has now been refactored to support
both static and incremental calculations needed for both
command marchalling and locking.
2015-01-10 18:39:47 +01:00
Patrick Fallberg 1ac6f0a291 Removed examples from sha204 libraries
MySensors will have native support for sha204 and the
source for usage and personalization of sha204 will be
much more elaborate than this example so it does not
provide additional understanding for the chip.
2015-01-10 18:39:46 +01:00
Patrick Fallberg 9fd41b4030 Added sha204 library
Taken from the sha204_library folder in
https://github.com/jimblom/sha204-Breakout
Commit 8e1ac05ef987b1869605ad067db2bdbaec1c109f

ATSHA204 is a crypto cirquit from Atmel that enables
SHA256-based MAC and HMAC calculations as well as
secure key storage and random number generation.

This can be used to sign messages passed between
sensor nodes and prevent both man-in-the-middle and
replay attacking.
2015-01-10 18:37:43 +01:00