Hello,

I put the two lines but it doesn't work , at all: in fact, it works worth!
:-/ 

Have u tried to do it before suggest it to me? What result did u get?

Thanks




Mounir IDRASSI wrote:
> 
> Hi,
> 
> What you are seeing is the side-effect of OpenSSL initialization 
> internals during the first time you access a cryptographic function that 
> uses random numbers (like ECDSA).
> If, in your code, you do two signature in a raw before doing the 
> verification, you will notice that the first signature is always slower 
> that the second one and the second signature takes almost the same time 
> as the verification.
> 
> If you want to remove this side-effect, add the following two lines at 
> beginning of your program before doing any cryptographic operation :
> 
>     BIGNUM *dummy = BN_new();
>     BN_rand(dummy, 256, 1, 1);
> 
> After adding these lines, you will see the magic! (the timings will 
> become more reasonable)
> 
> FYI, the side-effect has to do with the entropy collection of the 
> OpenSSL random generator. During the first cryptographic operation, most 
> of the time is consumed by the function RAND_poll.
> 
> Cheers,
> --
> Mounir IDRASSI
> IDRIX
> http://www.idrix.fr
> 

-- 
View this message in context: 
http://www.nabble.com/ECDSA_do_verify%28%29-tp26074867p26086514.html
Sent from the OpenSSL - Dev mailing list archive at Nabble.com.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to