[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.
-
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. -
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login