Add MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL flag
This flag, when set in a gateway sketch will make the gateway require all nodes to sign messages sent to it.
This commit is contained in:
+6
-4
@@ -156,7 +156,8 @@
|
||||
* This has to be set by at least one of the node in a "pair" or nobody will actually start calculating a signature for a message.
|
||||
* Just set the flag @ref MY_SIGNING_REQUEST_SIGNATURES and the node will inform the gateway that it expects the gateway to sign all
|
||||
* messages sent to the node. If this is set in a gateway, it will @b NOT force all nodes to sign messages to it. It will only require
|
||||
* signatures from nodes that in turn require signatures.<br>
|
||||
* signatures from nodes that in turn require signatures. If it is desired that the gateway should require signatures from all nodes,
|
||||
* @ref MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL can be set in the gateway sketch.<br>
|
||||
* If you want to have two nodes communicate securely directly with each other, the nodes that require signatures must send a presentation
|
||||
* message to all nodes it expect signed messages from (only the gateway is informed automatically). See @ref signerPresentation().<br>
|
||||
* A node can have three "states" with respect to signing:
|
||||
@@ -267,14 +268,15 @@
|
||||
*
|
||||
* If a node does require signing, any unsigned message sent to the node will be rejected.<br>
|
||||
* This also applies to the gateway. However, the difference is that the gateway will only require signed messages from nodes it knows in turn
|
||||
* require signed messages.<br>
|
||||
* require signed messages (unless @ref MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL is set).<br>
|
||||
* A node can also inform a different node that it expects to receive signed messages from it. This is done by transmitting an internal message
|
||||
* of type @ref I_SIGNING_PRESENTATION and provide flags as payload that inform the receiver of the signing preferences of the sender.<br>
|
||||
* All nodes and gateways in a network maintain a table where the signing preferences of all nodes are stored. This is also stored in EEPROM so
|
||||
* if the gateway reboots, the nodes does not have to retransmit a signing presentation to the gateway for the gateway to realize that the node
|
||||
* expect signed messages.<br>
|
||||
* Also, the nodes that do not require signed messages will also inform gateway of this, so if you reprogram a node to stop require signing,
|
||||
* the gateway will adhere to this as soon as the new node has presented itself to the gateway.
|
||||
* the gateway will adhere to this as soon as the new node has presented itself to the gateway. Note however, that if the gateway sets
|
||||
* @ref MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL a node that does not support signing will be unable to send any data to the gateway.
|
||||
*
|
||||
* The following sequence diagram illustrate how messages are passed in a MySensors network with respect to signing:
|
||||
* @image html MySigning/signingsequence.png
|
||||
@@ -429,7 +431,7 @@
|
||||
* ...
|
||||
* @endcode
|
||||
*
|
||||
* The gateway needs to configured with a whitelist (and it have to have an entry for all nodes that send and/or require signed messages):<br>
|
||||
* The gateway needs to be configured with a whitelist (and it has to have an entry for all nodes that send and/or require signed messages):<br>
|
||||
* @code{.cpp}
|
||||
* #define MY_SIGNING_SOFT
|
||||
* #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
|
||||
|
||||
Reference in New Issue
Block a user