SWRA846 July   2025 CC2642R-Q1

 

  1.   1
  2.   Abstract
  3. 1Analysis of Bluetooth Pairing Technology Principles
    1. 1.1 LE Legacy Pairing and LE Secure Connections Pairing
    2. 1.2 Analysis of Association Mode Security Characteristics
    3. 1.3 Privacy Protection and Address Management
  4. 2Common Issues in Pairing Encryption
    1. 2.1 Integrity Check Fault—MIC Verification Failure (MIC failure)
    2. 2.2 Abnormal Key Negotiation—DHKey Verification Failure (DHKey check fail)
    3. 2.3 Key Management Defect—PIN/Key Loss (PIN or Key missing)
      1. 2.3.1 Key Missing During Pairing Phase
      2. 2.3.2 LTK Missing During Encryption Phase
  5. 3A Solution for Encryption Resource Conflicts
    1. 3.1 Environment Selection and Configuration
    2. 3.2 Implementing AES-256 Encryption and Decryption Using TinyAES Library
    3. 3.3 System-Level Optimization Exploration
      1. 3.3.1 Memory Allocation Inspection
      2. 3.3.2 Padding Processing and Thread Safety
  6. 4Conclusion
  7. 5References

A Solution for Encryption Resource Conflicts

Based on the analysis of the various pairing anomalies described above, it is evident that the encryption resource competition of CC2642 has become one of the cores of systemic security issues. The hardware encryption module of this chip adopts an exclusive architecture design, which must simultaneously carry out critical tasks such as RPA address resolution, pairing key negotiation, and link data encryption, whereas the application layer can neither monitor its workload status in real time nor implement priority scheduling strategies. Targeting this hardware limitation, this paper proposes a software-based AES encryption collaborative scheme—by building an observable and schedulable software encryption channel, it forms a complementary architecture with the hardware module. This scheme fully utilizes the computing power of the CC2642's Cortex-M4 core to implement the following innovative designs at the application layer:

  • Encryption task grading mechanism: Real-time demanding operations such as RPA resolution can be retained in the hardware module for execution, while non-real-time tasks such as ECDH calculation and LTK derivation during the pairing flow are migrated to software AES for implementation.
  • Dynamic resource arbiter: Based on the priority inheritance feature of FreeRTOS, it provides the possibility of optional software channel shunting when hardware module overload is detected.
  • Mixed encryption pipeline: Optimizes the AES-CCM encryption link at the instruction level. This hybrid architecture not only circumvents hardware resource conflict risks, but also provides developers with advanced debugging capabilities such as encryption task timing analysis and conflict event tracing through the status visualization interface at the software layer, significantly enhancing the security and robustness of Bluetooth connections in complex RF environments.