[SOLVED] Signing issue when receiving 2 nonce requests within short interval



  • Making some extensive tests on message sending/receiving, I may have discovered some issue with signing.

    This occurs when 2 nodes are requesting a nonce, while the first don't send signed message before second one asks for nonce.

    Here's an example, with nodes 123 and 127:

    0;255;3;0;9;891922 TSF:MSG:READ,123-123-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;891936 TSF:MSG:SEND,0-0-123-123,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    0;255;3;0;9;891959 TSF:MSG:READ,127-127-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;891974 TSF:MSG:SEND,0-0-127-127,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    0;255;3;0;9;891982 TSF:MSG:READ,123-123-0,s=1,c=1,t=16,pt=5,l=4,sg=1:1
    0;255;3;0;9;892011 !TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;892016 TSF:MSG:READ,127-127-0,s=0,c=2,t=2,pt=0,l=0,sg=1:
    0;255;3;0;9;892022 !TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;894198 TSF:MSG:READ,123-123-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;894213 TSF:MSG:SEND,0-0-123-123,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    0;255;3;0;9;894243 TSF:MSG:READ,123-123-0,s=1,c=1,t=16,pt=5,l=4,sg=1:0
    0;255;3;0;9;894272 TSF:MSG:ACK REQ
    0;255;3;0;9;894277 TSF:MSG:SEND,0-0-123-123,s=1,c=1,t=16,pt=5,l=4,sg=0,ft=0,st=OK:0
    123;1;1;0;16;0```
    
    Is this a known issue? A restriction of current implementation?

  • Contest Winner

    @flyingdomotic yes, it is a known limitation. The signing part cannot handle multiple nonces at once. It is a decision made to be able to support more memory restricted devices as the atmega328p without fragmenting the signing backend.



  • @Anticimex: Ok, I understand.

    Would it be possible to imagine that, for gateways having more memory (as 2560 or ESP), in the same spirit as MY_RX_MESSAGE_BUFFER_FEATURE, having a sign buffer feature allowing this?

    I should recognize that the event is not so frequent, so that's probably not a priority #1.


  • Contest Winner

    @flyingdomotic certainly. But I do not have time for MySensors development at the moment, only support. But pull requests are always welcome!


 

272
Online

8.4k
Users

9.3k
Topics

97.9k
Posts