Skip to content

bounty: Algorithm to find generator points #11

Open

Description

@0xJepsen

Bounty Description

Implement a compile-time (const fn) algorithm to find generator points on elliptic curves so that we may have arbitrary generators used as compile-time constants in traits. Generator points are used to generate the cyclic subgroup used in various cryptographic protocols.

Implementation requirements

A clear and comprehensive list of the requirements for the bounty to be considered complete.

  • Implement a const function to find generator points on a given elliptic curve
    • Should accept curve parameters as input and utilize ronkathon's existing random point generation function / sqrt algorithm
  • Update traits that utilize generators to use this compile-time function
  • Implement proper error handling and input validation
  • Documentation and tests
    • Implement tests to verify the algorithm yields generators for small groups
    • Test for groups over extension fields as well as prime fields
    • Should verify that the point generates the entire group or a subgroup of desired order
    • Create comprehensive unit tests, e.g. with well-known curves (secp256k1, Curve25519)
    • Test edge cases and invalid inputs
    • Provide clear documentation and code commenting on the algorithm's operation and usage

Bonus Features

Any additional features that will enhance the value of the bounty.

  • Optimize the algorithm for efficiency:
    • Implement early termination conditions
    • Use efficient methods for scalar multiplication
    • Optimizations that may obfuscate understanding must be given as an optional feature

Resources

Elliptic Curve Cryptography: A Gentle Introduction
Standards for Efficient Cryptography (SEC) 2: Recommended Elliptic Curve Domain Parameters
Elliptic Curves for Security (RFC 7748)
Handbook of Elliptic and Hyperelliptic Curve Cryptography, Chapter 9: Generating Elliptic Curves

Criteria

Bounties will be rewarded based on the following criteria:

  1. Correctness and security: A thorough review of the implementation should convince our team that they are correct and secure, with all requirements met.
  2. Code clarity and quality: Succinct, easy-to-follow code with appropriate naming conventions. Utilize Rust’s type system for flexibility and security (e.g., compile-time checks where possible), and avoid external crates. Optimizations should be a lower priority than clarity, but can be included behind a feature flag as a bonus.
  3. Documentation quality: Provide comprehensive README’s, Cargo docs, and inline comments where code itself is not self-explanatory. Prioritize clarity and readability.

Activity

  1. Autoparallel commented on May 17, 2024

    @Autoparallel
    Contributor

    I think this could now be implemented since we can draw random points on the curve / have access to sqrt algorithm.

  2. deleted a comment from brunny-eth on Sep 9, 2024
  3. deleted a comment from Autoparallel on Sep 11, 2024
  4. changed the title [-]feat: Algorithm to find generator points[/-] [+]Bounty: Algorithm to find generator points[/+] on Sep 11, 2024
  5. pinned this issue on Sep 11, 2024
  6. changed the title [-]Bounty: Algorithm to find generator points[/-] [+]bounty: Algorithm to find generator points[/+] on Sep 11, 2024
  7. Autoparallel commented on Dec 19, 2024

    @Autoparallel
    Contributor

    Just to be clear, if a test of the const fn is made, the prime should be small, otherwise compilation time will explode.

  8. mahmudsudo commented on Feb 22, 2025

    @mahmudsudo
    Contributor

    i would like to take on this

  9. Autoparallel commented on Mar 12, 2025

    @Autoparallel
    Contributor

    @mahmudsudo you are already in the midst of many issues. Let's get those closed prior to assigning!

  10. mahmudsudo commented on Apr 13, 2025

    @mahmudsudo
    Contributor

    can this be assigned to me now ?

  11. Autoparallel commented on Apr 14, 2025

    @Autoparallel
    Contributor

    @mahmudsudo You have already put your name into many bounties, so for now I'm going to keep this open for the community. Let's focus on the others

  12. OpensourceMaverick commented on May 13, 2025

    @OpensourceMaverick

    Hey @Autoparallel I want to do this. Can you please clearify the bounty on this, I means what kind of bounty and how much?

  13. Autoparallel commented on May 14, 2025

    @Autoparallel
    Contributor

    Hey @OpensourceMaverick! I'm no longer working with Pluto so I can't comment on this. I'd suggest contacting @devloper or @mattes to see what they think.

    Nonetheless, thanks for taking interest in the project!

  14. OpensourceMaverick commented on May 15, 2025

    @OpensourceMaverick
  15. mahmudsudo commented on Nov 16, 2025

    @mahmudsudo
    Contributor

    i would really love to continue contributing to ronkathon , i could help in managing the repo and i would love to pick up this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions