Performance and security evaluation of different RSA cryptography system implementations

  • Ana Carla Quallio Rosa UTFPR
  • Rodrigo Campiolo UTFPR
  • Daniel Macêdo Batista USP

Abstract


RSA remains one of the most prominent cryptographic systems for protecting systems and data. This study evaluates implementations of the RSA algorithm using different programming languages and libraries. The experiments were conducted in C, C++, Java, JavaScript, Python, and Rust. Rust, C, and Python implementations exhibited the shortest execution times for encryption and decryption. The analysis of data structures revealed similar patterns across languages. Memory dumps exposed fragments of the private key in several implementations, with full recovery possible in JavaScript. The results provide valuable insights for performance and security decisions in RSA implementations.

References

Afrose, S., Rahaman, S., and Yao, D. (2019). Cryptoapi-bench: A comprehensive benchmark on java cryptographic api misuses. In 2019 IEEE Cybersecurity Development (SecDev), pages 49–61.

Alzaher, R., Hantom, W., Aldweesh, A., and Allah, N. M. (2022). Parallelizing multi-keys rsa encryption algorithm using openmp. In 2022 14th International Conference on Computational Intelligence and Communication Networks (CICN), pages 778–782.

Botan (2025). Botan: Crypto and tls for modern c++. Disponível em: [link]. Acesso em: 21 jan. 2025.

Bouncy Castle (2013). The legion of the bouncy castle. Disponível em: [link]. Acesso em: 12 mar. 2024.

Cargo Bench (2025). Compile and execute benchmarks. Disponível em: [link]. Acesso em: 25 jan. 2025.

Crypto++ (2023). Crypto++ library. Disponível em: [link]. Acesso em: 12 mar. 2024.

Crypto (2025). Crypto. Disponível em: [link]. Acesso em: 21 jan. 2025.

Cryptography (2024). Pyca/cryptography. Disponível em: [link]. Acesso em: 12 mar. 2024.

Dalal, Y. M., S, S., K, A., Satheesha, T. Y., PN, A., and Somanath, S. (2024). Optimizing security: A comparative analysis of rsa, ecc, and dh algorithms. In 2024 IEEE North Karnataka Subsection Flagship International Conference (NKCon), pages 1–6.

Dodis, Y., Shamir, A., Stephens-Davidowitz, N., and Wichs, D. (2014). How to eat your entropy and have it too – optimal recovery strategies for compromised RNGs. Cryptology ePrint Archive, Paper 2014/167.

Forge (2024). A native implementation of tls in javascript and tools to write crypto-based and network-heavy webapps. Disponível em: [link]. Acesso em: 08 ago. 2024.

Google Benchmark (2025). A library to benchmark code snippets, similar to unit tests. Disponível em: [link]. Acesso em: 25 jan. 2025.

Imam, R., Areeb, Q. M., Alturki, A., and Anwer, F. (2021). Systematic and critical review of rsa based public key cryptographic schemes: Past and present status. IEEE Access, 9:155949–155976.

Islam, M., Islam, M., Islam, N., and Shabnam, B. (2018). A modified and secured rsa public key cryptosystem based on “n” prime numbers. Journal of Computer and Communications, 6:78–90.

Java Cryptography (2025). Java cryptography architecture standard algorithm name documentation for jdk 8. Disponível em: [link]. Acesso em: 21 jan. 2025.

Jintcharadze, E. and Abashidze, M. (2023). Performance and comparative analysis of elliptic curve cryptography and rsa. In 2023 IEEE East-West Design & Test Symposium (EWDTS), pages 1–4.

JMH (2025). Jmh is a java harness for building, running, and analysing nano/micro/mil-li/macro benchmarks written in java and other languages targeting the jvm. Disponível em: [link]. Acesso em: 25 jan. 2025.

Libgcrypt (2023). Libgcrypt documentation. Disponível em: [link]. Acesso em: 19 mar. 2024.

Maalavika, S., Thangavel, G., and Basheer, S. (2024). Performance evaluation of rsa type of algorithm with cuckoo optimized technique. In 2024 IEEE International Conference on Computing, Power and Communication Technologies (IC2PCT), volume 5, pages 1362–1367.

OpenSSL (2024). Openssl - cryptography and ssl/tls toolkit. Disponível em: [link] //www.openssl.org/. Acesso em: 12 mar. 2024.

PyCryptodome (2024). Pycryptodome documentation. Disponível em: [link]. Acesso em: 19 mar. 2024.

PYPL (2024). Pypl - popularity of programming language. Disponível em: [link] //pypl.github.io/PYPL.html. Acesso em: 27 jun. 2024.

Pytest (2025). Pytest: helps you write better programs. Disponível em: [link]. Acesso em: 25 jan. 2025.

Rivest, R. L., Shamir, A., and Adleman, L. (1978). A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM, 21(2):120–126.

Rosa, A. and Campiolo, R. (2024). Avaliação de diferentes implementações do sistema de criptografia rsa. In Anais Estendidos do XXIV SBSeg, pages 347–352. SBC.

Rust Crypto (2024). Cryptographic algorithms written in pure rust. Disponível em: [link]. Acesso em: 19 mar. 2024.

Rust OpenSSL (2025). Openssl bindings for the rust programming language. Disponível em: [link]. Acesso em: 21 jan. 2025.

Stallings, W. and Vieira, D. (2008). Criptografia e segurança de redes: princípios e práticas. Pearson Prentice Hall.

TIOBE (2024). Tiobe index - the software quality company. Disponível em: [link]. Acesso em: 27 jun. 2024.
Published
2025-09-01
ROSA, Ana Carla Quallio; CAMPIOLO, Rodrigo; BATISTA, Daniel Macêdo. Performance and security evaluation of different RSA cryptography system implementations. In: WORKSHOP ON SCIENTIFIC INITIATION AND UNDERGRADUATE WORKS - BRAZILIAN SYMPOSIUM ON CYBERSECURITY (SBSEG), 25. , 2025, Foz do Iguaçu/PR. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2025 . p. 180-191. DOI: https://doi.org/10.5753/sbseg_estendido.2025.11863.

Most read articles by the same author(s)

<< < 1 2