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

Add field arithmetic skeleton #7

Merged
merged 3 commits into from
Apr 9, 2019
Merged

Add field arithmetic skeleton #7

merged 3 commits into from
Apr 9, 2019

Commits on Apr 9, 2019

  1. cargo init --lib

    hdevalence committed Apr 9, 2019
    Configuration menu
    Copy the full SHA
    0252f3a View commit details
    Browse the repository at this point in the history
  2. Add a stub of the field element API.

    This defines (but does not implement):
    
    * conversion to and from the curve25519-dalek packed `Scalar` type;
    * addition;
    * subtraction;
    * multiplication;
    * zero & one constructors and Default;
    * inversion;
    
    The implementation in curve25519-dalek allows doing operations either in
    Montgomery form or not in Montgomery form; I think that for this use-case, it
    would be better to require that a `FieldElement` is *always* in Montgomery
    form, so that the multiplication is always Montgomery multiplication.  We can
    also probably save some time by allowing the representatives to lie in the
    range [0, 2*l) instead of [0, l) as in the original implementation (cf. "Montgomery
    Multiplication Needs No Final Subtractions").
    hdevalence committed Apr 9, 2019
    Configuration menu
    Copy the full SHA
    5fcc867 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e1147e3 View commit details
    Browse the repository at this point in the history