Avaliação de diferentes implementações do sistema de criptografia RSA

Detalhes bibliográficos
Autor(a) principal: Rosa, Ana Carla Quallio
Data de Publicação: 2025
Tipo de documento: Trabalho de conclusão de curso
Idioma: por
Título da fonte: Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
Texto Completo: http://repositorio.utfpr.edu.br/jspui/handle/1/37285
Resumo: With the increasing flow of information between different devices, encryption systems have become essential to ensure data authenticity, confidentiality, and integrity. A common approach is asymmetric encryption, which uses two keys: one for encrypting messages and another for decrypting them. In this context, the RSA algorithm emerges as one of the most widely adopted encryption systems. This study aims to evaluate RSA implementations, investigating the impact of adopting different approaches, including selecting libraries within the same programming language and using various programming languages. Experiments were conducted in C, C++, Java, JavaScript, Python, and Rust, using two libraries per language: OpenSSL and Libgcrypt (C), Botan and Crypto++ (C++), Bouncy Castle and Java Crypto (Java), Forge and Crypto (JavaScript), Cryptography and PyCryptodome (Python), and Rust OpenSSL and Rust Crypto (Rust). The analysis of average execution times demonstrated that Rust, C, and Python achieved the best performance in encryption and decryption processes, mainly due to their implementations’ use of OpenSSL as the foundation. Regarding key generation, C++ and Python obtained the shortest average times for 2048 and 4096-bit keys. Additionally, an analysis of confidential data storage structures revealed similar patterns used to store private keys across the studied languages. Finally, a memory dump analysis exposed fragments of private keys in various libraries. In the case of JavaScript, it was possible to recover the private key entirely in both tested implementations, highlighting a vulnerability that could compromise system security if an attacker gains access to the program’s core dump. The results provide a basis for selecting RSA implementations, considering performance and security.
id UTFPR-12_92c8025b50c3160fbec10d9af0d11275
oai_identifier_str oai:repositorio.utfpr.edu.br:1/37285
network_acronym_str UTFPR-12
network_name_str Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
repository_id_str
spelling Avaliação de diferentes implementações do sistema de criptografia RSAEvaluation of different implementations of the RSA encryption systemLinguagem de programação (Computadores)Criptografia de dados (Computação)Proteção de dadosProgramming languages (Electronic computers)Data encryption (Computer science)Data protectionCNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAOWith the increasing flow of information between different devices, encryption systems have become essential to ensure data authenticity, confidentiality, and integrity. A common approach is asymmetric encryption, which uses two keys: one for encrypting messages and another for decrypting them. In this context, the RSA algorithm emerges as one of the most widely adopted encryption systems. This study aims to evaluate RSA implementations, investigating the impact of adopting different approaches, including selecting libraries within the same programming language and using various programming languages. Experiments were conducted in C, C++, Java, JavaScript, Python, and Rust, using two libraries per language: OpenSSL and Libgcrypt (C), Botan and Crypto++ (C++), Bouncy Castle and Java Crypto (Java), Forge and Crypto (JavaScript), Cryptography and PyCryptodome (Python), and Rust OpenSSL and Rust Crypto (Rust). The analysis of average execution times demonstrated that Rust, C, and Python achieved the best performance in encryption and decryption processes, mainly due to their implementations’ use of OpenSSL as the foundation. Regarding key generation, C++ and Python obtained the shortest average times for 2048 and 4096-bit keys. Additionally, an analysis of confidential data storage structures revealed similar patterns used to store private keys across the studied languages. Finally, a memory dump analysis exposed fragments of private keys in various libraries. In the case of JavaScript, it was possible to recover the private key entirely in both tested implementations, highlighting a vulnerability that could compromise system security if an attacker gains access to the program’s core dump. The results provide a basis for selecting RSA implementations, considering performance and security.Com o aumento do fluxo de informações entre diferentes dispositivos, os sistemas de criptografia tornaram-se essenciais para garantir a autenticidade, confidencialidade e a integridade dos dados. Uma abordagem comum é a criptografia assimétrica, que utiliza duas chaves: uma para cifrar mensagens e outra para decifrá-las. Nesse contexto, o algoritmo RSA emerge como um dos sistemas mais amplamente adotados nessa abordagem de criptografia. Este trabalho tem como objetivo conduzir uma avaliação das implementações do RSA, investigando o impacto da adoção de diferentes abordagens, incluindo a seleção de bibliotecas em uma mesma linguagem, e a utilização de linguagens de programação distintas. Os experimentos foram conduzidos em C, C++, Java, JavaScript, Python e Rust, utilizando duas bibliotecas por linguagem: OpenSSL e Libgcrypt (C), Botan e Crypto++ (C++), Bouncy Castle e Java Crypto (Java), Forge e Crypto (JavaScript), Cryptography e PyCryptodome (Python), além de Rust OpenSSL e Rust Crypto (Rust). A análise dos tempos médios de execução demonstrou que Rust, C e Python apresentaram o melhor desempenho nos processos de cifração e decifração, principalmente devido ao uso do OpenSSL como base de suas implementações. Quanto à geração de chaves, C++ e Python obtiveram os menores tempos médios para chaves de 2048 e 4096 bits. Além disso, foi conduzida uma análise das estruturas de armazenamento de informações confidenciais, revelando similaridades nos padrões utilizados para armazenar chaves privadas entre as linguagens selecionadas. Por fim, a análise de despejo de memória revelou a presença de fragmentos da chave privada em diversas bibliotecas. No caso do JavaScript, foi possível recuperar a chave integralmente nas duas bibliotecas, evidenciando uma vulnerabilidade que pode comprometer a segurança do sistema caso um atacante obtenha acesso ao despejo de memória do programa. Os resultados obtidos fornecem uma base para a escolha de implementações do RSA, considerando tanto desempenho quanto segurança.Universidade Tecnológica Federal do ParanáCampo MouraoBrasilDepartamento Acadêmico de ComputaçãoCiência da ComputaçãoUTFPRCampiolo, RodrigoCampiolo, RodrigoSantos, Luiz Arthur Feitosa dosGonçalves, Rogério AparecidoCorrêa, Wellington JoséRosa, Ana Carla Quallio2025-06-30T20:36:08Z2025-06-30T20:36:08Z2025-02-17info:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/bachelorThesisapplication/pdfROSA, Ana Carla Quallio. Avaliação de diferentes implementações do sistema de criptografia RSA. 2025. Trabalho de Conclusão de Curso (Bacharelado em Ciência da Computação) – Universidade Tecnológica Federal do Paraná, Campo Mourão, 2025.http://repositorio.utfpr.edu.br/jspui/handle/1/37285porAttribution 4.0 Internationalhttp://creativecommons.org/licenses/by/4.0/info:eu-repo/semantics/openAccessreponame:Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))instname:Universidade Tecnológica Federal do Paraná (UTFPR)instacron:UTFPR2025-07-01T06:12:24Zoai:repositorio.utfpr.edu.br:1/37285Repositório InstitucionalPUBhttp://repositorio.utfpr.edu.br:8080/oai/requestriut@utfpr.edu.br || sibi@utfpr.edu.bropendoar:2025-07-01T06:12:24Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT)) - Universidade Tecnológica Federal do Paraná (UTFPR)false
dc.title.none.fl_str_mv Avaliação de diferentes implementações do sistema de criptografia RSA
Evaluation of different implementations of the RSA encryption system
title Avaliação de diferentes implementações do sistema de criptografia RSA
spellingShingle Avaliação de diferentes implementações do sistema de criptografia RSA
Rosa, Ana Carla Quallio
Linguagem de programação (Computadores)
Criptografia de dados (Computação)
Proteção de dados
Programming languages (Electronic computers)
Data encryption (Computer science)
Data protection
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO
title_short Avaliação de diferentes implementações do sistema de criptografia RSA
title_full Avaliação de diferentes implementações do sistema de criptografia RSA
title_fullStr Avaliação de diferentes implementações do sistema de criptografia RSA
title_full_unstemmed Avaliação de diferentes implementações do sistema de criptografia RSA
title_sort Avaliação de diferentes implementações do sistema de criptografia RSA
author Rosa, Ana Carla Quallio
author_facet Rosa, Ana Carla Quallio
author_role author
dc.contributor.none.fl_str_mv Campiolo, Rodrigo
Campiolo, Rodrigo
Santos, Luiz Arthur Feitosa dos
Gonçalves, Rogério Aparecido
Corrêa, Wellington José
dc.contributor.author.fl_str_mv Rosa, Ana Carla Quallio
dc.subject.por.fl_str_mv Linguagem de programação (Computadores)
Criptografia de dados (Computação)
Proteção de dados
Programming languages (Electronic computers)
Data encryption (Computer science)
Data protection
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO
topic Linguagem de programação (Computadores)
Criptografia de dados (Computação)
Proteção de dados
Programming languages (Electronic computers)
Data encryption (Computer science)
Data protection
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO
description With the increasing flow of information between different devices, encryption systems have become essential to ensure data authenticity, confidentiality, and integrity. A common approach is asymmetric encryption, which uses two keys: one for encrypting messages and another for decrypting them. In this context, the RSA algorithm emerges as one of the most widely adopted encryption systems. This study aims to evaluate RSA implementations, investigating the impact of adopting different approaches, including selecting libraries within the same programming language and using various programming languages. Experiments were conducted in C, C++, Java, JavaScript, Python, and Rust, using two libraries per language: OpenSSL and Libgcrypt (C), Botan and Crypto++ (C++), Bouncy Castle and Java Crypto (Java), Forge and Crypto (JavaScript), Cryptography and PyCryptodome (Python), and Rust OpenSSL and Rust Crypto (Rust). The analysis of average execution times demonstrated that Rust, C, and Python achieved the best performance in encryption and decryption processes, mainly due to their implementations’ use of OpenSSL as the foundation. Regarding key generation, C++ and Python obtained the shortest average times for 2048 and 4096-bit keys. Additionally, an analysis of confidential data storage structures revealed similar patterns used to store private keys across the studied languages. Finally, a memory dump analysis exposed fragments of private keys in various libraries. In the case of JavaScript, it was possible to recover the private key entirely in both tested implementations, highlighting a vulnerability that could compromise system security if an attacker gains access to the program’s core dump. The results provide a basis for selecting RSA implementations, considering performance and security.
publishDate 2025
dc.date.none.fl_str_mv 2025-06-30T20:36:08Z
2025-06-30T20:36:08Z
2025-02-17
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/bachelorThesis
format bachelorThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv ROSA, Ana Carla Quallio. Avaliação de diferentes implementações do sistema de criptografia RSA. 2025. Trabalho de Conclusão de Curso (Bacharelado em Ciência da Computação) – Universidade Tecnológica Federal do Paraná, Campo Mourão, 2025.
http://repositorio.utfpr.edu.br/jspui/handle/1/37285
identifier_str_mv ROSA, Ana Carla Quallio. Avaliação de diferentes implementações do sistema de criptografia RSA. 2025. Trabalho de Conclusão de Curso (Bacharelado em Ciência da Computação) – Universidade Tecnológica Federal do Paraná, Campo Mourão, 2025.
url http://repositorio.utfpr.edu.br/jspui/handle/1/37285
dc.language.iso.fl_str_mv por
language por
dc.rights.driver.fl_str_mv Attribution 4.0 International
http://creativecommons.org/licenses/by/4.0/
info:eu-repo/semantics/openAccess
rights_invalid_str_mv Attribution 4.0 International
http://creativecommons.org/licenses/by/4.0/
eu_rights_str_mv openAccess
dc.format.none.fl_str_mv application/pdf
dc.publisher.none.fl_str_mv Universidade Tecnológica Federal do Paraná
Campo Mourao
Brasil
Departamento Acadêmico de Computação
Ciência da Computação
UTFPR
publisher.none.fl_str_mv Universidade Tecnológica Federal do Paraná
Campo Mourao
Brasil
Departamento Acadêmico de Computação
Ciência da Computação
UTFPR
dc.source.none.fl_str_mv reponame:Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
instname:Universidade Tecnológica Federal do Paraná (UTFPR)
instacron:UTFPR
instname_str Universidade Tecnológica Federal do Paraná (UTFPR)
instacron_str UTFPR
institution UTFPR
reponame_str Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
collection Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
repository.name.fl_str_mv Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT)) - Universidade Tecnológica Federal do Paraná (UTFPR)
repository.mail.fl_str_mv riut@utfpr.edu.br || sibi@utfpr.edu.br
_version_ 1850497826957557760