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

docs: Enhance Edwards Curve Documentation and Test Readability #1903

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

DeVikingMark
Copy link

Motivation

The Edwards curve implementation in the codebase, while functionally sound, had areas where documentation could be enhanced to improve developer experience. Clear and comprehensive documentation is crucial for maintaining code quality and helping new contributors understand the codebase better.

Specifically, the EdwardsParameters trait and its associated methods lacked detailed documentation, making it potentially challenging for new developers to understand the purpose and usage of these important components.

Additionally, the test module used single-letter type aliases, which, while functional, didn't follow Rust's best practices for code readability.

Solution

This PR implements two main improvements:

  1. Added comprehensive documentation to the EdwardsParameters trait and its methods:

    • Added trait-level documentation explaining its purpose
    • Documented the crucial D constant
    • Added clear descriptions for generator() and prime_group_order() methods
  2. Enhanced test code readability:

    • Replaced the single-letter type alias E with more descriptive EdwardsCurve
    • Maintained all existing test functionality while improving code clarity

These changes make the codebase more maintainable and accessible while adhering to Rust documentation best practices.

PR Checklist

  • Added Documentation
  • Added Tests (not applicable - documentation changes only)
  • Breaking changes (no breaking changes introduced)

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