curve25519-dalek icon indicating copy to clipboard operation
curve25519-dalek copied to clipboard

implement NEON backend

Open isislovecruft opened this issue 7 years ago • 5 comments

isislovecruft avatar Jun 21 '18 22:06 isislovecruft

As part of this I think it would be good to reorganize the structure of the source tree, if we're going to have multiple vector and serial backends. Right now the tree looks like

backend
├── avx2
│   ├── #edwards.rs#
│   ├── constants.rs
│   ├── edwards.rs
│   ├── field.rs
│   ├── mod.rs
│   └── scalar_mul
│       ├── mod.rs
│       ├── straus.rs
│       ├── variable_base.rs
│       └── vartime_double_base.rs
├── mod.rs
├── u32
│   ├── constants.rs
│   ├── field.rs
│   ├── mod.rs
│   └── scalar.rs
└── u64
    ├── constants.rs
    ├── field.rs
    ├── mod.rs
    └── scalar.rs

and there's a separate hierarchy for the curve_models and the scalar_mul code, which only have the serial algorithms.

I think it might be better to organize the code like

backend
├── mod.rs
├── serial
│   ├── curve_models
│   │   └── mod.rs
│   ├── scalar_mul
│   │   ├── mod.rs
│   │   ├── straus.rs
│   │   ├── variable_base.rs
│   │   ├── vartime_double_base.rs
│   │   └── window.rs
│   ├── u32
│   │   ├── constants.rs
│   │   ├── field.rs
│   │   ├── mod.rs
│   │   └── scalar.rs
│   └── u64
│       ├── constants.rs
│       ├── field.rs
│       ├── mod.rs
│       └── scalar.rs
└── vector
    ├── avx2
    │   ├── constants.rs
    │   ├── field.rs
    │   └── mod.rs
    ├── edwards.rs
    ├── neon
    │   ├── constants.rs
    │   ├── field.rs
    │   └── mod.rs
    └── scalar_mul
        ├── mod.rs
        ├── straus.rs
        ├── variable_base.rs
        └── vartime_double_base.rs

so that the module tree looks more like the actual structure of what parts are common and which aren't.

hdevalence avatar Jul 06 '18 18:07 hdevalence

I typed the wrong issue number in a commit, this was closed spuriously.

hdevalence avatar Jul 27 '18 03:07 hdevalence

Has there been any work on this back end yet? If not, I'm interested in taking a look.

rubdos avatar Dec 14 '18 10:12 rubdos

I think that @isislovecruft started working on it in the summer. Right now any work on it is blocked on merging #215, which restructures all of the backend code (e.g., making the changes above).

hdevalence avatar Dec 14 '18 18:12 hdevalence

Agreed. Give me a ping if you want some man-hours spend on this. It would be very cool to have curve25519-dalek as the fastest library on all platforms :-)

rubdos avatar Dec 15 '18 17:12 rubdos