Topic: [SOLVED] wc_ecc_verify_hash_ex() can't verify BrainpoolP256R1 sig
Hi,
When I try to verify one signature which generated by ECC BrainpoolP256R1 curve, I meet trouble.
Problem is : wc_ecc_verify_hash_ex() function always return fail. Because &v and r not matched.
Any idea?
Below code show details:
/* does v == r */
if (err == MP_OKAY) {
if (mp_cmp(&v, r) == MP_EQ)/*here failed*/
*stat = 1;
I remember, V3.9.8 release note said wolfSSL already support BrainpoolP256R1 curve. Now, I am using V3.9.10 .
on the other hand, I can't find the macro "HAVE_ECC_BRAINPOOL" definition in setting.h, I just add this definition in ecc.h, is it OK?
Below is the private key, you can try to use it generate one signature and verify it. I think you will meet same problem with me. (Note, private key is generated by openSSL, but signature is generated by wolfSSL function wc_SignatureGenerate())
related private key
-----BEGIN EC PARAMETERS-----
BgkrJAMDAggBAQc=
-----END EC PARAMETERS-----
-----BEGIN EC PRIVATE KEY-----
MHgCAQEEIJyDj/+OyFULqczpz/ZNI3m5gxFl+Dw2o6/B0ljwYQC3oAsGCSskAwMC
CAEBB6FEA0IABCjxYfsLLiHZyIiwD3VaPg2qdpR5PLJJbVol6SBZnp++D60GBEOM
1pGaG/IcGY+rDSnNP9Y8RIimrIggqaMb9iU=
-----END EC PRIVATE KEY-----