This repository provides various optimized implementations of SAECHAM (Secure And Efficient CHAM), a lightweight ARX (Addition-Rotation-XOR) based block cipher. SAECHAM significantly enhances the security and efficiency of the original CHAM block cipher.
This research was published in IEEE Internet of Things Journal.
DOI: 10.1109/JIOT.2025.3569746
SAECHAM is designed for resource-constrained IoT devices and embedded systems. By restructuring the order of operations and rotation amounts of the existing CHAM-64/128 cipher, SAECHAM achieves enhanced security against differential and linear cryptanalysis and delivers faster encryption speeds across various MCU environments.
Key improvements of SAECHAM include:
- Optimized Operational Structure: After analyzing six possible operational permutation structures of CHAM, the most efficient structure (CHAM-RXA) was adopted to reduce the number of instructions in 8/16-bit MCU environments.
- Enhanced Security: Through an SMT solver-based automated analysis of 62 CHAM variants, SAECHAM was proven to have security equal to or better than CHAM64. It exhibits stronger resistance, particularly against differential cryptanalysis.
- Superior Performance: SAECHAM demonstrates superior performance compared to the original CHAM64 on all tested platforms, from low-power MCUs to high-performance CPUs using SIMD instructions.
SAECHAM shows significant performance improvements over CHAM64 across a wide range of environments. (cpb: cycles per byte)
| Environment | SAECHAM | CHAM64 | Performance Improvement |
|---|---|---|---|
| 8-bit AVR | 137.0 cpb | 148.1 cpb | ~8.1% |
| 16-bit MSP430 | 99.8 cpb | 114.6 cpb | ~14.7% |
| ARM Cortex-M3 | 84.0 cpb | 89.6 cpb | ~6.6% |
| ARM Cortex-M4 | 70.8 cpb | 82.4 cpb | ~16.3% |
| AVX2 (SIMD) | 1.885 cpb | 2.071 cpb | ~9.8% |
| AVX512 (SIMD) | 1.503 cpb | 1.631 cpb | ~8.5% |
| NEON (SIMD) | 5.865 cpb | 7.554 cpb | ~28.7% |
For a full performance comparison, please refer to Table II in the paper.
The implementations in this repository have been tested and verified on the following target MCUs and IDEs. Optimized assembly code is included for each platform directory.
| Platform | Target MCU | IDE |
|---|---|---|
| 8-bit AVR | Atmel ATmega128 | Microchip Studio |
| 16-bit MSP430 | Texas Instruments MSP430F1611 | Code Composer Studio |
| 32-bit ARM Cortex-M3 | STMicroelectronics STM32F103RB | STM32CubeIDE |
| 32-bit ARM Cortex-M4 | STMicroelectronics STM32F407VGT6 | STM32CubeIDE |
First, clone this repository to your local machine.
git clone [https://github.com/dampers/SAECHAM-implementations.git](https://github.com/dampers/SAECHAM-implementations.git)
cd SAECHAM-implementationsBelow are the specific instructions to compile and run the code for each supported platform.
This implementation is optimized for the Atmel ATmega128 MCU and is ready to be compiled using Microchip Studio.
- Navigate to Directory: Open the
AVR/folder in your cloned repository. - Open Project: Launch Microchip Studio and open the solution file (
.sln) located in the directory. - Configure Toolchain:
- Connect your ATmega128-based board (e.g., via an STK600 or similar programmer).
- Go to
Project > Properties > Tooland select your programmer/debugger. Ensure the target device is set to ATmega128.
- Build the Project: Compile the code by selecting
Build > Build Solutionfrom the top menu or by pressingF7. - Flash to Device: Upload the compiled firmware to the microcontroller by selecting
Debug > Start Without Debuggingor pressingCtrl+Alt+F5. - View Output: Open a serial terminal program (like Tera Term or the serial monitor in Microchip Studio), connect to the board's COM port, and set the baud rate to view the encryption results and performance benchmarks.
This implementation targets the Texas Instruments MSP430F1611 and uses a Code Composer Studio project.
- Navigate to Directory: Locate the
MSP430/folder in your repository. - Import Project:
- Launch Code Composer Studio (CCS).
- Select
File > Import.... - Choose
CCS > CCS Projectsand clickNext. - Click
Browse...and select theMSP430/directory as the search directory. The SAECHAM project should appear in the list. - Click
Finishto import the project into your workspace.
- Build the Project: In the
Project Explorerpanel, right-click on the project name and selectBuild Project. - Debug and Run:
- Connect your MSP430 target board (e.g., an MSP-FET or LaunchPad).
- Click the Debug icon (the green bug) in the toolbar. This will flash the code onto the device and start a debugging session.
- Press the Resume button (or
F8) to run the code.
- View Output: The performance results will be printed to the
Consolewindow within CCS.
These implementations are designed for STMicroelectronics STM32 MCUs and are provided as STM32CubeIDE projects.
- Navigate to Directory: Choose the appropriate folder for your device:
ARM/Cortex-M3/for the STM32F103RB orARM/Cortex-M4/for the STM32F407VGT6. - Import Project:
- Launch STM32CubeIDE.
- Select
File > Import.... - Choose
General > Existing Projects into Workspaceand clickNext. - For
Select root directory, browse to and select the chosen MCU folder (e.g.,ARM/Cortex-M4/). - Ensure the project is checked in the
Projectslist and clickFinish.
- Build the Project: Select the project in the
Project Explorer. Click the Build icon (the hammer) in the toolbar or pressCtrl+B. - Run on Device:
- Connect your STM32 Nucleo or Discovery board. The ST-Link debugger should be automatically detected.
- Click the Run icon (the green play button) in the toolbar or press
Ctrl+F11. This will compile, flash, and run the application on the target board.
- View Output: The encryption results and cycle counts will be displayed in the IDE's console via the Semihosting output or can be monitored through a configured UART serial connection.
SAECHAM has undergone rigorous security validation using automated analysis tools.
- [cite_start]Differential Analysis: The optimal differential probability for 39 rounds is
$2^{-65}$ , which is lower than CHAM64's$2^{-63}$ , indicating higher security against differential attacks. [cite: 453, 460, 480] - [cite_start]Linear Analysis: The optimal linear correlation for 36 rounds is
$2^{-31}$ , maintaining the same level of resistance as CHAM64. [cite: 430, 432]
[cite_start]For detailed round-by-round analysis results, please refer to Table VII and Table VIII in our paper. [cite: 485]
If you find this work and its implementations useful in your research, we would appreciate a citation to our paper.
@ARTICLE{SAECHAM_IoTJ,
author={Shin, Myoungsu and Shin, Hanbeom and Kim, Insung and Kim, Sunyeop and Lee, Dongjae and Hong, Deukjo and Sung, Jaechul and Hong, Seokhie},
journal={IEEE Internet of Things Journal},
title={SAECHAM: Secure And Efficient Lightweight Block Cipher CHAM Variant},
year={2025},
volume={12},
number={15},
pages={29989 - 30002},
doi={10.1109/JIOT.2025.3569746}
}This project is licensed under the MIT License. See the LICENSE file for details.
- Myoungsu Shin (First Author)
- Email: (houma757@gmail.com)
- GitHub: dampers
- Seokhie Hong (Corresponding Author)
- Email: shhong@korea.ac.kr