|
From: Douglas E E. <dee...@gm...> - 2015-10-07 01:07:38
|
I see you sent the same message to the openssl-dev list yesterday, but no one has responded yet. OpenSC has a engine_pkcs11 that can do ECDSA, but no one has added ECDH yet. The main reason was that until OpenSSL-1.0.2 the routines in ECDSA_METHOD that needed to be replaced were not exposed, and it took years for the OpenSSL people to finally do something about this. They added ECDSA_METHOD_set_sign and ECDSA_METHOD_set_sign. I am afraid it might be years until the ECDH has the extra routines need to work with an engine. To get the ECDSA_METHOD changes into OpenSSL I had to get the engine working using the ecdsa/ec_locl.h header file to show what was actually needed. On 10/6/2015 12:37 PM, Alexander Gostrer wrote: > Hi Doug, > > David suggested to contact you. > We are writing an openssl ECDH engine. All private keys are in the hardware (including ephemeral keys). I found that the DH_METHOD has both (*generate_key) and (*compute_key) methods while the > ECDH_METHOD has just the (*compute_key) method. Your have the ephemeral keys in hardware? Won't that require a different ephemeral key for every active connection? A key is a key, and there is a EC_KEY_generate_key defined in ec.h, that will work for ECDSA or ECDH. But the ability to generate_key may also need to be exposed if you need to have the ephemeral keys created on the card. I have not looked at what this would take. > > We would like (once the engine is completed) to use standard SSL_accept() etc calls. But the compute_key() returns shared secret based on previously generated public/private key pair and the public > key is already sent to a peer). Is there a hook to replace the public key before it is sent out? Any ideas/plans about adding this hook into the code? Not sure how to answer this. > > Thank you, > Alex Gostrer. > > > On Tue, Oct 6, 2015 at 7:54 AM, David Woodhouse <dw...@in... <mailto:dw...@in...>> wrote: > > On Tue, 2015-10-06 at 07:52 -0700, Alexander Gostrer wrote: > > Yeah, with ECDSA we have no problems. We thought about submitting a > > patch but the code is pretty complicated and we weren't sure that we > > completely understand it. Also we wanted to stick with the stable > > version. > > You need to fix it in HEAD first. Then we can talk about backporting to > older versions. > > > Do you have Doug's email? Don't want to spam other people. > > Probably best to use the opensc mailing list. > ope...@li... <mailto:ope...@li...> > > -- > dwmw2 > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Opensc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensc-devel > -- Douglas E. Engert <DEE...@gm...> |