Quantcast

Display a gpg signature as a string of zeros and ones?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Display a gpg signature as a string of zeros and ones?

GnuPG - User mailing list
Hi there,
is there any way to display a gpg signature as a string of zeros and ones?
Thanking in advance,
jbs

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display a gpg signature as a string of zeros and ones?

Daniel Kahn Gillmor-7
On Thu 2017-04-06 13:39:23 -0400, joao baleza via Gnupg-users wrote:
> Hi there,is there any way to display a gpg signature as a string of
> zeros and ones?Thanking in advance,jbs

any data can be represented as a string of ones and zeros, but there are
many different convention for how to order and group such a thing.

the xxd tool will take any input and convert it to arbitrary forms.  for
ones and zeros, you can use -bits.  for example:

0 dkg@alice:~$ echo this is a test | xxd -bits
00000000: 01110100 01101000 01101001 01110011 00100000 01101001  this i
00000006: 01110011 00100000 01100001 00100000 01110100 01100101  s a te
0000000c: 01110011 01110100 00001010                             st.
0 dkg@alice:~$

you can use this technique on anything, including an OpenPGP signature.

hth,

    --dkg

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display a gpg signature as a string of zeros and ones?

GnuPG - User mailing list
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?

jbs


Em Sexta-feira, 7 de Abril de 2017 17:09, Daniel Kahn Gillmor <[hidden email]> escreveu:


On Thu 2017-04-06 13:39:23 -0400, joao baleza via Gnupg-users wrote:

> Hi there,is there any way to display a gpg signature as a string of
> zeros and ones?Thanking in advance,jbs


any data can be represented as a string of ones and zeros, but there are
many different convention for how to order and group such a thing.

the xxd tool will take any input and convert it to arbitrary forms.  for
ones and zeros, you can use -bits.  for example:

0 [hidden email]:~$ echo this is a test | xxd -bits
00000000: 01110100 01101000 01101001 01110011 00100000 01101001  this i
00000006: 01110011 00100000 01100001 00100000 01110100 01100101  s a te
0000000c: 01110011 01110100 00001010                            st.
0 [hidden email]:~$

you can use this technique on anything, including an OpenPGP signature.

hth,

    --dkg




_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display a gpg signature as a string of zeros and ones?

Daniel Kahn Gillmor-7
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

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display a gpg signature as a string of zeros and ones?

GnuPG - User mailing list
This makes totally sense.
I will proceed with the complete gpg signature.
Thanks for your help.
jbs


Em Segunda-feira, 10 de Abril de 2017 7:38, Daniel Kahn Gillmor <[hidden email]> escreveu:


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



_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Loading...