Display a gpg signature as a string of zeros and ones?
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Apr 10 08:37:37 CEST 2017
On Fri 2017-04-07 16:55:05 +0000, joao baleza wrote:
> Sorry. I was not clear enough. I will try to explain better. As
> far has I understand, a 2048 key gpg RSA digital signature has
> 2048 bits. But the binary gpg signature file has more than 2048
> bits because the file has some extra data besides the signature
> itself. My question is: is there any way to display a gpg
> signature with no extra data, just the signature itself, as a
> string of zeros and ones?
My confusion stems from the fact that you seem to be asking both about
"display" and about size compression.
you can't actually display any of the ones or zeros without converting
them to some form that humans can understand, which typically means
expanding them significantly (e.g. looking at the data in hex or base64
encoding).
So if you're talking about minimizing size of an OpenPGP signature, you
want to avoid ASCII-armoring the signature. this will still be more
than 2048 bits because the OpenPGP signature format has some framing
structure around it. If you remove that framing structure, the
bitstring you have left won't be safe to interpret because it will look
like arbitrary noise that happens to be a useful input to some
particular algorithm.
To put it another way: an OpenPGP signature is more than just a
mathematical/cryptographic object. it's also a protocol object, and the
protocol details take up space too.
Does this make more sense?
--dkg
More information about the Gnupg-users
mailing list