Have you tried looking at any of the engine implementations? Look in
./engines/ for modules that implement their own RSA_METHOD. e_gmp.c might
be useful reference, in that it implements a software RSA implementation
(linked against, and using, GMP). However I don't think any of those
implementations perform key-generation, because none of them implement the
"rsa_keygen" member of RSA_METHOD. If your RSA_METHOD implements
rsa_keygen, and your ENGINE has been registered and enabled as the default
for RSA operations, then your hook should get called whenever an RSA key is
generated. Look in crypto/rsa/rsa_gen.c for some info on what is going on,
in particular the functions RSA_generate_key_ex() and rsa_builtin_keygen().

Cheers,
Geoff



On Fri, Jul 18, 2014 at 10:53 AM, Vahid Dianat <vahidn...@gmail.com> wrote:

> hi,
> I have implemented one prime generator and want to use it beside RSA key
> generation inside my engine.
> It means that i am going to implement an RSA Engine which uses my prime
> generator.
> How can i do this?
> I know that there is RSA_method struct but i dont know how can it tell RSA
> method to use my prime generator. I would appreciate u to help me.
> Thanks
> Regards,
> Vahid
>

Reply via email to