
Show HN: Hazmat Math – Elliptic curve arithmetic for Cryptography.io objects - tuxxy
https://github.com/tuxxy/hazmat-math
======
lvh
The cryptography library currently already supports the most basic elliptic
curve operation you need: scalar multiplication. Sometimes you need fancier
operations. For example, this supports direct point addition and point
subtraction, which for example is used in SPAKE2 to achieve blinding.

Right now these are focused on a tight binding between Python and C
(specifically, OpenSSL). The function names are direct equivalents of OpenSSL
function names. Most of the rest of the library provides an abstraction from
OpenSSL -- but it turns out that providing a safe abstraction to cryptographic
primitives can be very tricky :-)

(Disclaimer: I'm one of the founders of cryptography.io; I occasionally show
up for cryptographic background. This project builds on that project, and is
being considered for upstream inclusion.)

~~~
tuxxy
Hey there! Glad to see you give this background on this library.

I built this because I was prototyping a split-key proxy re-encryption scheme
with cryptography.io and I needed to perform some of this arithmetic. I found
that a PR was made to include it but the team seemed hesitant to add it in.

I thought it would be best to build it as a separate module. Everything is
working great so far. I think I'll probably add the rest of the arithmetic to
it eventually.

Anyway, thanks for dropping in! :)

~~~
lvh
Another question: is your PRE scheme published? Which papers should I go read
to know what it does? (Admittedly, I haven't read the Python implementation
yet, maybe I should just go do that... I'm familiar with BBS98 but not much of
the work after that.)

~~~
tuxxy
The Python reference implementation is what we have as far as public
information on the schema. We're working on getting a paper drafted up and
published quickly, though.

