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

[IMPLEMENTATION] RSA algorithm #727

Merged
merged 5 commits into from
Jul 2, 2024
Merged

Conversation

ddaniel27
Copy link
Contributor

This is my implementation for RSA crypto algorithm. There is another implementation in the repo, but that file just contains the encryption/decryption algorithm assuming that we have the private/public key and modulus. My implementation contains:

  • RSA struct to easily manage keys and methods.
  • Keys Generation (with random prime numbers selection).
  • String encryption/decryption.
  • Number encryption/decryption.
  • Getters for both (public key, modulus) and (private key).

Tests and benchmarks are included :)

@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2024

Codecov Report

Attention: Patch coverage is 84.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 87.49%. Comparing base (cddedb6) to head (6db6526).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
cipher/rsa/rsa2.go 84.00% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #727      +/-   ##
==========================================
- Coverage   87.53%   87.49%   -0.04%     
==========================================
  Files         204      205       +1     
  Lines        5389     5439      +50     
==========================================
+ Hits         4717     4759      +42     
- Misses        533      539       +6     
- Partials      139      141       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cipher/rsa/rsa2.go Outdated Show resolved Hide resolved
cipher/rsa/rsa2.go Outdated Show resolved Hide resolved
raklaptudirm
raklaptudirm previously approved these changes Jul 2, 2024
cipher/rsa/rsa2.go Outdated Show resolved Hide resolved
cipher/rsa/rsa2.go Outdated Show resolved Hide resolved
cipher/rsa/rsa2.go Outdated Show resolved Hide resolved
@raklaptudirm raklaptudirm merged commit 483431b into TheAlgorithms:master Jul 2, 2024
5 checks passed
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.

3 participants