Help Signing
-
@anticimex said in Help Signing:
Hi,
first of all, you have spelled a define wrong,#define MY_SIGNING_REQUEST_SIGNATUREshould be
#define MY_SIGNING_REQUEST_SIGNATURESSecondly, you have to enable signing on the gateway as well.
Thirdly, you have to personalize your devices (as per the documentation) or signing won't work at all.Hello!!
I resume my discussion !! Finally after a long time, I was able to understand the "3" point that Anticimex told me. Where it is said that the device (node / gateway) must be customized through the SecureActuator.ino files.I did this way:
I loaded the scketch SecureActuator.ino, on the node or on the gateway, and I followed these steps, and we're talking about using only the Firma Software.
Enable GENERATE_KEYS_SOFT
This will generate random keys for HMAC (signing) and AES (encryption). Copy the keys generated and replace the corresponding definitions under "User defined key data", specifically MY_HMAC_KEY and MY_AES_KEY.
Disable GENERATE_KEYS_SOFT and enable PERSONALIZE_SOFT
This will store the HMAC key and the AES key to EEPROM. It will also write a checksum of the personalization data in EEPROM to be able to detect if the data is altered.
Personalization is now complete.At this point if I understand correctly I write my scketch, adding at the beginning before Config.h
How much:#define MY_SIGNING_SOFT
#define MY_SIGNING_REQUEST_SIGNATURES
#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7And load everything, on the node ...... It should be all right now ?? Quite right???
Of course, loading this scketck, gate from the Sardinian SecureActuator.ino, but this is normal because however the HMAC (signing) and AES (encryption), are stored in the EEPROM of arduino !! Quite right???
At this point I'm using the Signature correctly or do I have to do anything else ???
@sindrome73 assuming you have executed the personalizer sketch with your generated keys on both the gateway and the node(s), then yes. You can always see in the log if signing is being used. There is a parser for the log on the homepage.