<div dir="ltr"><div><div><div>Hi Piotr,<br></div><div><br>As you have found out, choosing the per message random number in ECDSA signature is crucial for the security of private key.<br><br>Leaving this responsibility on users is dangerous. This is the reason you won't find any crypto API to feed the random number for ECDSA signature.<br><br></div>If you want to see how ECDSA is implemented, refer crypto/ecdsa/ecs_ossl.c.<br></div><div><br>Signature is generated in the following two steps.<br></div><div><br></div>ecdsa_sign_setup: <br>-- chooses the random number (k) and generates the first part of the ECDSA signature (r).<br>-- returns inverse of k(required to generate second part of signature) and r<br><br>ecdsa_do_sign:<br></div>-- uses k inverse and r (received from ecdsa_sign_setup) to generate the second part of the signature(s).<br><div><div><div><div><br><br></div><div>Thanks,<br></div><div>Thulasi.<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 7 May 2015 at 13:58, Piotr Łobacz <span dir="ltr"><<a href="mailto:piotr.lobacz@radmor.com.pl" target="_blank">piotr.lobacz@radmor.com.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As in the subject is it possible to generate signature with given random<br>
number? According to the documentation of ECDSA uses RNG so it would be<br>
difficult to find out private key from signature but i want just to test<br>
my data to check if signature is being generated properly and i have'nt<br>
found any possible place where i would be able to pass random value. Any<br>
ideas?<br>
--<br>
<br>
________________________________________________________________________<br>
Piotr Łobacz<br>
<br>
Biuro Systemów i Oprogramowania<br>
<br>
RADMOR S.A.<br>
<br>
tel. (58) 6996 929<br>
<br>
e-mail: <a href="mailto:piotr.lobacz@radmor.com.pl" target="_blank">piotr.lobacz@radmor.com.pl</a><br>
<br>
<a href="http://www.radmor.com.pl" target="_blank">www.radmor.com.pl</a><br>
<br>
<br>
<br>
<br>
RADMOR S.A., ul. Hutnicza 3, 81-212 Gdynia<br>
<br>
NIP: 586-010-21-39<br>
<br>
REGON: 190432077<br>
<br>
KRS: 0000074029 (Sąd Rejonowy Gdańsk-Północ w Gdańsku)<br>
<br>
Kapitał zakładowy wpłacony: 9 282 830 PLN<br>
<br>
_______________________________________________<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br>
</blockquote></div><br></div></div></div></div></div></div></div>