Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rsa key generation #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

MarcosNicolau
Copy link
Owner

Description
Fixes some rsa key generation bugs related to the management of the biguint sizes, some operations were overflowing because we were not allocating enough space.

Key generation test has been modified to verify the RSA premise:

Given three larger integers e,d,n such that for every integer $0 \le m \le n$:
$(m^e)^d \equiv m \mod n$

Copy link

github-actions bot commented Feb 5, 2025

Library Benchmark Name Iterations Total Execution Time Average Execution Time
primitive-types biguint_add random 1024 bits 1000000 2.020465 seconds 0.000002 seconds
primitive-types biguint_sub random 1024 bits 1000000 1.958292 seconds 0.000002 seconds
primitive-types biguint_divmod random 1024 bits 1000000 2.524188 seconds 0.000003 seconds
primitive-types biguint_mul random 1024 bits 1000000 8.959132 seconds 0.000009 seconds
primitive-types biguint_pow random 1024 bits 1000 11.547769 seconds 0.011548 seconds
primitive-types biguint_pow_mod random 1024 bits 10 10.776888 seconds 1.077689 seconds
math random_prime 256 bits 1 0.537939 seconds 0.537939 seconds
math random_prime 512 bits 1 18.468756 seconds 18.468756 seconds
math random_prime 1024 bits 1 28.295858 seconds 28.295858 seconds
math is_prime_solovay_strassen 512 bits prime 1 3.760932 seconds 3.760932 seconds
math is_prime_solovay_strassen 1024 bits prime 1 25.432913 seconds 25.432913 seconds
math jacobi 512 bits prime 1 0.043537 seconds 0.043537 seconds
math jacobi 1024 bits prime 1 0.320819 seconds 0.320819 seconds
digital-signature rsa_key_generation 256 bits 1 0.188430 seconds 0.188430 seconds
digital-signature rsa_key_generation 512 bits 1 1.792781 seconds 1.792781 seconds
digital-signature rsa_key_generation 1024 bits 1 18.142116 seconds 18.142116 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant