> From: owner-openssl-us...@openssl.org On Behalf Of dave paxton
> Sent: Thursday, July 31, 2014 20:12

>   In looking at this today I found what the new ec key is doing.  It
> does a BN_rand_range operation.  That does have the rand.h include.  It
> looks like it is using from the random area pseudorand, pseudo,
> RAND_pseudo_bytes and RAND_bytes.  So I guess it is a matter of putting
> this together with the various rand subroutines to get a handle on a
> logical flow chart.
> 
I don't understand what your question is, but generating an EC keypair
consists of
- choosing a random number from 1 to the order of the "curve" (actually
subgroup) = private
- computing the point which is the "multiplication" of the generator and
private = public
(Note elliptic curve "multiplication" is very different from ordinary
multiplication.)

This is exactly what the EC_KEY_generate_key routine does.
It uses the random number module to generate the random number,
and the EC point computation routines to do the point computation.
The numbers for EC cryptography are bigger than fit in a computer "word"
so the BN (bignum) routines are used for computations on those numbers.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to