how to define total length of ECC F2M 571bits signture
Moderator: UNKNwYSHSA
how to define total length of ECC F2M 571bits signture
Hello,
when I compute a signature of ecc f2m 571bits, I get a result. But the result's length greater than 0x80. how to define total length of ECC F2M 571bits signture?
when I compute a signature of ecc f2m 571bits, I get a result. But the result's length greater than 0x80. how to define total length of ECC F2M 571bits signture?
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3053
- Contact:
Re: how to define total length of ECC F2M 571bits signture
Have you tried to calculate the signature of this bits length using openssl?
sense and simplicity
Re: how to define total length of ECC F2M 571bits signture
UNKNwYSHSA wrote:Have you tried to calculate the signature of this bits length using openssl?
yes. I got a signature such as "30 81 94 02 ...".
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3053
- Contact:
Re: how to define total length of ECC F2M 571bits signture
BirdKing wrote:UNKNwYSHSA wrote:Have you tried to calculate the signature of this bits length using openssl?
yes. I got a signature such as "30 81 94 02 ...".
Please show me all signature data bytes!
sense and simplicity
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3053
- Contact:
Re: how to define total length of ECC F2M 571bits signture
Here is the implement of function ECDSA_sign in openssl:
The signature data is encoded with DER format.
You can use the decode function to decode signature data.
Wait your message.
Code: Select all
int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen, unsigned char
*sig, unsigned int *siglen, const BIGNUM *kinv, const BIGNUM *r,
EC_KEY *eckey)
{
ECDSA_SIG *s;
RAND_seed(dgst, dlen);
s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
if (s == NULL)
{
*siglen=0;
return 0;
}
*siglen = i2d_ECDSA_SIG(s, &sig);
ECDSA_SIG_free(s);
return 1;
}
The signature data is encoded with DER format.
You can use the decode function
Code: Select all
d2i_ECDSA_SIG
Wait your message.
sense and simplicity
Re: how to define total length of ECC F2M 571bits signture
Thank you for your help.
I finally understood how to struct the R and S. Following the TLV, I can get the right signature.
Thank everybody.
I finally understood how to struct the R and S. Following the TLV, I can get the right signature.
Thank everybody.
Who is online
Users browsing this forum: No registered users and 5 guests