Files
MySensors/libraries
Patrick Fallberg c2a75d064e Signing driver framework
The signing driver framework resembles the radio driver framework
in the sense that it relies on MyConfig.h for driver specific
settings. This allows the constructor to be clean and the API less
likely to need change.

The API is designed with function pairs for sender and receiver of
a signed message.
The sender of a signed message uses putNonce() and signMsg()
and the receiver of a signed message uses getNonce() and
verifyMsg().
In addition, receiver is expected to call checkTimer() at regular
intervals to make sure the message session does not time out.

The program flow is that the sender transmit, after determining
that the message needs signing, a request to the receiver for a
nonce (I_GET_NONCE). The receiver calls getNonce() to obtain a
nonce and transmits the nonce back to the sender
(I_GET_NONCE_RESPONSE).
The sender stores the received nonce in the driver with putNonce()
and then calls signMsg() to sign the message to be transmitted.
The receiver then calls verifyMsg() to authenticate the signed
message using the nonce transmitted earlier.

The flow is described below:
---------------- --------            ---------- ------------------
|senders driver| |sender|            |receiver| |receivers driver|
---------------- --------            ---------- ------------------
        |            |    I_GET_NONCE     |  getNonce()  |
        |            |------------------->|------------->|
        |            |                    |              |
        | setNonce() |I_GET_NONCE_RESPONSE|              |
        |<-----------|<-------------------|<-------------|
        | signMsg()  |                    |              |
        |<-----------|                    | verifyMsg()  |
        |----------->|------------------->|------------->|
        |            |                    | OK / not OK  |
        |            |                    |<-------------|

It is expected that all signing schemes is built upon this
principle.
2015-02-17 23:25:08 +01:00
..
2014-11-25 16:18:40 +01:00
2014-03-07 21:17:56 +01:00
2014-03-07 21:17:56 +01:00
2014-12-07 10:23:41 +01:00
2015-02-17 23:25:08 +01:00
2014-03-07 21:17:56 +01:00
2014-03-07 21:17:56 +01:00
2014-03-07 21:17:56 +01:00
2014-03-07 21:17:56 +01:00
2014-03-07 21:17:56 +01:00

For information on installing libraries, see: http://arduino.cc/en/Guide/Libraries