I've pushed some work-in-progress to a git repository here:
  https://git.lysator.liu.se/wiml/nettle

There's more to be done, but I would appreciate any comments or feedback people might have. This is all the time I have available to put into it right now, but I hope to return to it before too long.

The changes add two new public functions:
- ecc_point_set_compact() which is like ecc_point_set but accepts a point in compact form (X and Y's parity/sign rather than X and Y) - ecc_point_set_from_octets() which interprets a point converted to an octet string by the rules set out in X9.62 and SEC.1, including compressed, uncompressed, and hybrid points

I'm not terribly happy with the name ecc_point_set_compact(); does anyone have a suggestion for a better name?

Internals:

Decompression works for P-256, P-384, and P-521, but it still needs sqrt implementations for P-192 and P-224. P-224 will be much more complex than the others (the c^((p-3)/4) shortcut doesn't apply), but there's a paper by djb on computing square roots in it.

I added a second slot to the `ecc_modulo` struct to contain a sqrt(u) implementation (as opposed to the existing sqrt(u/v) implementation). The slot, and the typedef that describes functions in that slot, need better names.

--
Wim Lewis / [email protected]
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to