q not derived from d in gcry_pk_sign

Werner Koch wk at gnupg.org
Fri Apr 5 18:32:55 CEST 2013


On Fri, 22 Mar 2013 10:19, grothoff at in.tum.de said:

> gcry_sexp_build (&spriv, &erroff,
> 	  "(private-key(ecc(curve \"NIST P-256\")(d %m)))",
> 		  d);
> gcry_pk_sign (&result, data, spriv);
>
> to create a signature; this fails, as in 'sexp_elements_extract_ecc' the
> 'q' value is not found (as it is neither in the curve nor explicitly in
> the S-expression); however, q can of course be calculated as q = dg

Actually for signing Q is not required at all.  Thus we can do without
it.  I just pushed a change to master.  There is new test case in
tests/pubkey.c:check_ecc_sample_key .


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gcrypt-devel mailing list