[Paper Review] An Experimental Study of Cryptography Capability using Chained Key Exchange Scheme for Embedded Devices
This paper proposes a Chained Key Exchange (CKE) scheme to evaluate cryptographic capabilities of embedded microcontrollers, specifically the ARM-based Raspberry Pi. It enhances TFTP with secure key exchange using modified GMP bignum libraries in U-Boot firmware, achieving 12.035s for 2048-bit key exchange on OS, but unexpectedly finding bare-metal execution slower than OS due to lack of caching—highlighting a critical hardware-software trade-off in lightweight cryptography.
After 38 years of birthday Diffie-Hellman Key Exchange (DHKE), there are many proposed improvements in the DHKE protocol to encounter modern security issues. This protocol seems quite simple to be implemented, but it can be vulnerable to many types of attacks. In this work, we propose the Chained Key Exchange scheme as a case study to explore cryptographic computation capability of embedded microcontroller. We choose ARM RaspberryPi board as hardware platform for experimental setup. To enable RasberberryPi system on chip (SoC) to perform cryptographic computation, we modified the GNU GMP Bignum library to support a simple primitive cryptographic computation in the UBOOT firmware. The main purpose of our study is to determine whether there is any gap between cryptographic protocol-scheme (in term of theoretical) and its engineering implementation. Our scheme will be integrated with Trivial File Transfer Protocol (TFTP) application in the UBOOT firmware. Our proposed scheme in the TFTP protocol will secure the sharing of secrets and symmetric keys (e.g., AES256). After that, the symmetric encryption algorithm can be used to encrypt data in the cases of remote system updates, patching and upgrades (e.g., firmware, kernel or application).
Motivation & Objective
- To assess the cryptographic computation capability of embedded microcontrollers, particularly the ARM-based Raspberry Pi, in constrained environments.
- To investigate the gap between theoretical cryptographic protocol design and practical engineering implementation in resource-limited devices.
- To integrate a secure key exchange mechanism into the U-Boot firmware for trusted remote system updates via TFTP.
- To evaluate performance differences between bare-metal execution and execution under an operating system (OS) on the same hardware.
- To explore the feasibility of building a generic, secure, and lightweight cryptographic device from a standard microcontroller.
Proposed method
- Proposes a Chained Key Exchange (CKE) scheme based on the Diffie-Hellman Key Exchange (DHKE) protocol, using a core root of trust (crt) for initial keying material.
- Modifies the GNU GMP Bignum library to support cryptographic computation directly in U-Boot firmware, enabling modular exponentiation for key exchange.
- Uses pre-shared core root of trust parameters (p_crt, g_crt, a_crt, b_crt) generated during device production and stored in tamper-resistant non-volatile memory.
- Establishes a shared secret key (Key_crt) via modular exponentiation: Key_crt ≡ A_crt^b_crt mod p_crt and Key_crt ≡ B_crt^a_crt mod p_crt.
- Integrates the CKE scheme into the TFTP protocol stack within U-Boot to secure firmware, kernel, and application updates.
- Employs a modified U-Boot environment with both bare-metal and OS-based execution modes to compare performance under identical input data and code.
Experimental results
Research questions
- RQ1Is there a significant performance gap between theoretical cryptographic protocol design and its practical implementation on embedded microcontrollers?
- RQ2Does bare-metal execution on a microcontroller like the Raspberry Pi outperform execution under a full operating system due to reduced OS overhead?
- RQ3Can a secure key exchange protocol be effectively integrated into U-Boot firmware to protect TFTP-based remote updates?
- RQ4How do different hardware and software configurations (e.g., cache settings, OS presence) impact the performance of cryptographic operations like modular exponentiation?
- RQ5What are the critical implementation challenges in achieving secure, efficient, and lightweight cryptography on constrained devices?
Key findings
- The performance of the Chained Key Exchange scheme on the Raspberry Pi was significantly slower in bare-metal mode (8.364s for 1024-bit keys) compared to execution under the Linux OS (1.571s for 1024-bit keys).
- Enabling the CPU’s internal caches in bare-metal mode reduced execution time from 8.364s to 1.887s for 1024-bit keys, indicating that caching is more impactful than OS overhead.
- For 2048-bit keys, the scheme required 63.998s in bare-metal mode and 12.035s under the OS, confirming that key size has a substantial performance impact.
- The unexpected result that OS-based execution was faster than bare-metal execution contradicted the initial hypothesis that bare-metal would be faster due to reduced OS interference.
- The U-Boot firmware with the integrated CKE scheme increased in size to 185,584 bytes, demonstrating the feasibility of integrating cryptographic functionality into low-level firmware.
- The study revealed that hardware-level optimizations such as caching, pipelining, and memory management are critical for performance, even in minimal firmware environments.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.