ATSHA204 signing backend
Default SDA pin is A3 for single wire communication. The pin is selected in MyConfig.h. I2C variant of ATSHA204 is not supported. Messages are signed using HMAC-SHA256 where some parts of the message digest are ATSHA204 specific.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
// Choose signing backend by enabling one of the following
|
||||
#define MYSENSORS_SIGNING_DUMMY
|
||||
//#define MYSENSORS_SIGNING_ATSHA204
|
||||
|
||||
// Define a suitable timeout for a signature verification session
|
||||
// Consider the turnaround from a nonce being generated to a signed message being received
|
||||
@@ -39,6 +40,24 @@ typedef class MyRFDriverRF69 MyRFDriverClass;
|
||||
typedef class MySigningDriverDummy MySigningDriverClass;
|
||||
#endif
|
||||
|
||||
#ifdef MYSENSORS_SIGNING_ATSHA204
|
||||
#ifdef MYSENSORS_SENSOR
|
||||
#define ATSHA204_PIN 17 //A3
|
||||
#endif
|
||||
|
||||
#ifdef MYSENSORS_SERIAL_GATEWAY
|
||||
#define ATSHA204_PIN 17 //A3
|
||||
#endif
|
||||
|
||||
#ifdef MYSENSORS_ETHERNET_MQTT_GATEWAY
|
||||
#define ATSHA204_PIN 17 //A3
|
||||
#endif
|
||||
|
||||
#include "MySigningDriverAtsha204.h"
|
||||
#define SIGNING_IDENTIFIER (1) // SHA256-based HMAC (ATSHA204 specific)
|
||||
typedef class MySigningDriverAtsha204 MySigningDriverClass;
|
||||
#endif
|
||||
|
||||
/***
|
||||
* Enable/Disable debug logging
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user