Paper 2024/1083 Original: eprint.iacr.org/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.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Preprint.
History
2024-07-03: last updated
2024-07-03: published
Short URL
https://ia.cr/2024/1083
License
https://creativecommons.org/publicdomain/zero/1.0/

BibTeX

@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}
}
Note: In order to protect the privacy of readers, this archive does not use cookies or embedded third party content.