On Tue, Sep 23, 2014 at 5:02 AM, Antony Dovgal <[email protected]> wrote:
> Hello John, > > just a few remarks: > > https://github.com/trianglman/ellipticCurveSignature/blob/master/src/php_ > ellipticCurveSignature.c#L62 > the "l" argument of zend_parse_parameters() accepts longs, not ints. > > zend_error() and E_ERROR are used for engine things _only_. > There is no reason to stop script execution if a secret key is wrong, a > simple warning is more than enough. > > AFAIK OpenSSL supports EC signatures, so why have add a new implementation > instead of using and existing one? > > > On 09/22/2014 06:55 PM, John Judy wrote: > >> Hi all, >> >> I've been working on my first PHP extension ( >> https://github.com/trianglman/ellipticCurveSignature) and I finally have >> it >> working and tested. I would really appreciate if some more people could >> look at it and let me know what I might have missed or better ways for me >> to do it. I would also appreciate any pointers for what I should do next >> to >> make it easy for others to access. >> >> The goal of the extension is to bring elliptic curve signing and verifying >> into an extension (as doing it in native PHP is incredibly slow). ED25519 >> was the curve I've been working with, but I've made it generic in order to >> make it easy to support other curves as I can add them. >> >> Thank you, >> John Judy >> >> > Thanks for these updates. I've made the change from E_ERROR to E_WARNING and fixed the type on curveType. I also added the arginfo as RemiFedora (Remi Collet?) pointed me at over IRC. I didn't use what OpenSSL had built in because when I was researching implementing the ED25519 curve, I didn't see it listed as one of OpenSSL's defined curves. Digging into it more after you pointed me at it, I do see where it has a large library of possibly supported curves, depending on how it was built (checking CentOS and Ubuntu, the first only supports two predefined curves and the other more than 60). I will do more research into bringing those curves in to this extension. I will also do more research on defining custom curves using OpenSSL in order to move all of the implementation to just use OpenSSL. Are there any resources I can look at for the best way to conditionally bring these in depending on the system my extension is being compiled on? Thanks again, John Judy
