I have it that the elliptic multiply is not standard.  So I have been
skip tracing though the code.
It starts with ec_key.c, with   EC_KEY_generate_key.  This grabs the
group or or the particular curves prime field size.  It then uses this
as the range for   bn_rand_range.  This is in bn_rand.c.  In that it
uses the first half which is bnrand.  That grabs the time and shifts it
around to start the process.  Since the order or range is a large number
in hex it looks like the output of the private key is also in hex.  
After that the generate key does the point multiply to make the public.
  Is there some other variable used here that I am missing?

Dave.

On 8/1/2014 9:58 PM, Dave Thompson wrote:
>> 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
>
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to