This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC2652P:如果"安全帧计数器"溢出、会发生什么情况?

Guru**** 2460850 points
Other Parts Discussed in Thread: Z-STACK

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1243584/cc2652p-if-security-frame-counter-overflow-what-will-happen

器件型号:CC2652P
主题中讨论的其他器件:Z-STACK

我已经研究过 Z-stack 3.0.2上的"安全帧计数器"处理

    // check frame counter
    linkInfo = nwkNeighborGetLinkInfo( dataInd->mac.srcAddr.addr.shortAddr, dataInd->mac.srcPanId );
    if ( linkInfo )
    {
      keySeqNum = *(dataInd->msdu.p + ff.hdrLen + NWK_AUX_HDR_LEN - 1);

      // check if the frame counter needs to be reset
      if ( linkInfo->inKeySeqNum != keySeqNum )
      {
        linkInfo->inKeySeqNum = keySeqNum;
        linkInfo->inFrmCntr   = 0;
      }

      rcvdFrmCntr = osal_build_uint32( dataInd->msdu.p + ff.hdrLen + 1, 4 );

      if ( rcvdFrmCntr < linkInfo->inFrmCntr )
      {
        return; // Bad frm count
      }
      else
      {
        linkInfo->inFrmCntr = rcvdFrmCntr + 1;
      }
    }

我们可以看到、当当前存储的  帧计数器为0xFFFFFFFF 但接收到的帧计数器为0时、传入的消息将 被忽略。 SDK 7.10是否解决了此问题?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Aries:

    传出 NWK 帧计数器在整个设备活动(包括标准工厂新复位和无线复位)中保持不变、以帮助防止重放攻击。 一旦网络帧计数器溢出、它将从零开始重新开始、由于该值小于前一个值、因此其他 Zigbee 3.0器件将丢弃设备的数据包。  这在 Zigbee R22 2017规范的第4.3.1章中进行了介绍、其中还建议偶尔更新网络密钥、以重置帧计数器并避免持久问题。   执行 NWK 密钥更新时、如果 NWK 帧计数器的值大于0x80000000、则 NWK 帧计数器将复位。

    此致、
    瑞安