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] DSA algorithm implementation #728

Closed
wants to merge 1 commit into from

Conversation

ddaniel27
Copy link
Contributor

Hi team, this is my DSA implementation. This PR needs a little bit of context.

I tried to follow the exact same algorithm steps as Wikipedia says but this has a big problem: efficiency. I'm talking about waiting around 1.5 mins to get the keys generated. Even this is not the exact amount of time because having randomness adds inconsistency (this is the keygen took 10s or 10m but on average 1.5m).

This is why I took a look at the current go dsa implementation. As you might see, we have the same aproach in the generation parameters loop (i.e. GPLoop for me, GeneratePrimes for DSA Go implementation), this is so far the most optimal way I found to get the p and q params, so I tried to replicated it in my own way also with the added value of explaining most decisions because some decisions seems arbitray but it's all for (again) efficiency.

I hope the context helps a little bit to clarify why the core algorithm appears to be a "copy" of the DSA std library. Honestly, after studying many different implementations, this is the only viable one.

@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2024

Codecov Report

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

Project coverage is 87.75%. Comparing base (483431b) to head (a5be634).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
cipher/dsa/dsa.go 89.74% 4 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #728      +/-   ##
==========================================
+ Coverage   87.49%   87.75%   +0.25%     
==========================================
  Files         205      210       +5     
  Lines        5439     5659     +220     
==========================================
+ Hits         4759     4966     +207     
- Misses        539      547       +8     
- Partials      141      146       +5     

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

Copy link

github-actions bot commented Aug 7, 2024

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Aug 7, 2024
Copy link

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants