# Where can I find the standard definition for GPG ECDSA signature?

I am playing around with GPG which I'd like to use to sign an integer and use the resulting signature binary in another piece of code. So far I have created a simple PGP packet parser with which I think I can successfully extract the elliptic curve point representing the public key.

Comes then signature parsing from the PGP message and which I haven't been able to interpret so far, finding no hints in RFC4880 or 5480 which define all bytes up to the last 68, the signature representation. But how should this 68 bytes be parsed exactly? Which RFC would be the one to look at?

• In my experience, when trying to coerce implementations to interoperate, gpg --list-packets is less than totally useless. YMMV. – fgrieu Feb 24 '19 at 16:21
• Thanks, OpenPGP Alliance point to RFC6637 which defines additional parameters for EC public keys, that's already helping. I'll dig deeper in RFC4880 to see how to format the integer I want to be signed. I still lack reference with regards to EC signature format which should be defined in a separate RFC... – roshii Feb 24 '19 at 16:21
• I've reopened the question since you cannot find the signature definition in the referenced standards, and asking for it seems on topic to me. – Maarten Bodewes Feb 24 '19 at 16:55
• security.stackexchange.com/a/94937/46255 is that link sufficient? – Natanael Feb 24 '19 at 23:53
• It appears to be MPI(r) MPI(s) same as for DSA, in rfc4880 – dave_thompson_085 Feb 25 '19 at 5:51