Fix/rsa carmichael lambda keygen - #1850
Conversation
…s in Four-Square cipher
… matrix inversion
|
@Chigael is attempting to deploy a commit to the csxark's projects Team on Vercel. A member of the Team first needs to authorize it. |
🎉 Thank You for Your ContributionHello @Chigael, Thank you for submitting a Pull Request to CryptoViz. We appreciate the time and effort you've invested in contributing to the project. Your Pull Request has been received successfully and will be reviewed by the maintainers as soon as possible. 📋 Pull Request Checklist
Ensuring these requirements are met helps streamline the review process and enables maintainers to review your contribution more efficiently. ❤️ Support CryptoVizIf you find CryptoViz helpful, consider supporting the project by:
Your support helps increase the project's visibility and encourages continued development. Thank you for being a part of the CryptoViz community! Thank you once again for contributing to CryptoViz. We appreciate your support and look forward to reviewing your contribution. |
|
Important Review skippedToo many files! This PR contains 504 files, which is 404 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (504)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎉 Pull Request MergedHello @Chigael, Thank you for your contribution to CryptoViz. Your Pull Request has been reviewed and successfully merged into the project. We sincerely appreciate the time and effort you invested in improving the project. Contributions like yours help make CryptoViz better for the entire community. We look forward to your future contributions and hope to collaborate with you again. ❤️ Support CryptoVizIf you find CryptoViz helpful, consider supporting the project by:
Your support helps increase the project's visibility and encourages continued development. Thank you for being a part of the CryptoViz community! |
Pull Request
Description
This PR fixes Issue #1719 where RSA key derivation computed the private exponent$d$ modulo Euler's totient $\phi(n) = (p - 1)(q - 1)$ rather than Carmichael's totient function $\lambda(n) = \text{lcm}(p - 1, q - 1)$ , as mandated by PKCS#1 v2.2 (RFC 8017).While both $\phi(n)$ and $\lambda(n)$ yield mathematically valid private exponents satisfying $e \cdot d \equiv 1 \pmod{\lambda(n)}$ , computing $d \pmod{\lambda(n)}$ yields the minimal valid private exponent and aligns with modern RFC specifications. Educational descriptions in both key parsing step notes and the interactive RSA Key Generation Wizard have been expanded to detail both methods.
Related Issue
Closes #1719
Scope
This PR touches exactly one of the following. If it touches more than
one, split it into separate PRs — multi-scope PRs are the pattern that
introduces inconsistent architecture and will not be reviewed as-is.
lib/cipher/**)app/**,components/**)lib/workers/**,hooks/use*Worker.ts)docs/**,*.md, MDX content)tests/**)Changes Made
Testing
npm testpasses locally.npm run typecheckpasses locally.npm run lintpasses locally.lib/cipher/**file stays at or above 80%.A PR that adds functionality without a corresponding test in the same PR will not be merged. "Will add tests later" is not accepted.
Simulation vs. Live Data
Screenshots
If applicable, attach screenshots or screen recordings.
Checklist
Applicable Checklist
Complete the checklist matching the scope above, then paste the completed
checklist (or a link to it) here:
Architecture Review Checklist
Before adding another domain suite or feature suite, please identify and document the following to prevent code duplication:
Additional Notes
Add any additional information for reviewers here.