[Solved] Soft signing with whitelist on nodes
-
Hello,
This is what I want to do:
- soft signing between a serial gateway and different nodes
- serial gateway accept data from any nodes (no whitelist on it)
- nodes only accept data from the serial gateway using whitelist
The code in the gateway:
uint8_t soft_serial[SHA204_SERIAL_SZ] = {0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA}; MySigningAtsha204Soft signer(true, 0, NULL, soft_serial); MyHwATMega328 hw; MyTransportRFM69 transport; MySensor gw(transport, hw, signer, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN);The code in the node:
whitelist_entry_t node_whitelist[] = { { .nodeId = 0, .serial = {0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA} }}; uint8_t soft_serial[SHA204_SERIAL_SZ] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}; MySigningAtsha204Soft signer(true, 1, node_whitelist, soft_serial); MyHwATMega328 hw; MyTransportRFM69 transport; MySensor gw(transport, hw, signer);In MyConfig.h I enabled
MY_SIGNING_FEATUREandMY_SECURE_NODE_WHITELISTING.Do you think it's correct ?
If I enable
DEBUG_SIGNINGinMySigningAtsha204Soft.cpp, on reception of a message I got aSNOKand aW?. Why ?David.
-
@carlierd Is this a duplicate of this thread? http://forum.mysensors.org/topic/2491/verify-fail-when-enabling-whitelist-in-signing-function
Lets continue in that one if so.
-
Hello !
It's not exactly the same thing. In this post I described what I want to do and how I implemented it. It's a global vision of what I understood or not correctly understood

We can continue on the previous post.
-
Well, then I do believe your vision is described in my signing thread

But let's focus on the problem you describe in the other thread.