Paper 2024/1083

LEA Block Cipher in Rust Language: Trade-off between Memory Safety and Performance

Sangwon Kim
Siwoo Eum
Minho Song
Hwajeong Seo
Abstract

Cryptography implementations of block cipher have been written in C language due to its strong features on system-friendly features. However, the C language is prone to memory safety issues, such as buffer overflows and memory leaks. On the other hand, Rust, novel system programming language, provides strict compile-time memory safety guarantees through its ownership model. This paper presents the implementation of LEA block cipher in Rust language, demonstrating features to prevent common memory vulnerabilities while maintaining performance. We compare the Rust implementation with the traditional C language version, showing that while Rust incurs a reasonable memory overhead, it achieves comparable the execution timing of encryption and decryption. Our results highlight Rust’s suitability for secure cryptographic applications, striking the balance between memory safety and execution efficiency.

PDF
BibTeX
ePrint ↗
@misc{cryptoeprint:2024/1083,
      author = {Sangwon Kim and Siwoo Eum and Minho Song and Hwajeong Seo},
      title = {LEA Block Cipher in Rust Language: Trade-off between Memory Safety and Performance},
      howpublished = {Cryptology {ePrint} Archive, Paper 2024/1083},
      year = {2024},
      url = {https://eprint.iacr.org/2024/1083}
}
Category
Implementation
License
CC0
Submitted
Versions

Report a problem

Comments

Log in or create an account

Privacy