Skip to content

Add support of curves with larger scalar sizes #58

@survived

Description

@survived

Currently, the crate only supports curves with scalars of 32 bytes. We want to expand it to work with curves that have scalar size $\ge 32$ bytes, e.g. curve448, P-384, P-521, and so on.

The size of the scalar has been hardcoded into library in several places, therefore if we simply add a curve with larger scalar size, library will break in some places causing runtime panics.

Expected development path:

  1. Add curves with different scalar sizes to the library, update all tests to use these curves, and observe what tests get broken
  2. Fix the issues until tests pass
  3. Update cggmp24 and givre crates to support these curves, update all tests to use these curves and make sure all tests pass
  4. Carefully review the library to identify any other places where we could make assumptions on the scalar size

Once all of this is done, we can release a new version of generic-ec[-curves] with the added curves. Preferably, that would be a release without any breaking changes in API unless we absolutely have to break the API.

Related work:

If you're willing to take part in development, reach out to us in discord #lockness-contribute channel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions