Re: PGP signature of empty string

Peter Gutmann <[email protected]> Wed, 13 Mar 2013 14:46:03 +1300
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Florian Mutter <[email protected]> writes:

>I did read your response but I did not get that signing the empty string is
>not allowed in general. Is gpg wrong when signing the empty string? There is
>a SHA1 hash for the empty string and from my limited knowledge of PGP I
>thought that was all that is needed to sign something. 

It doesn't get it wrong, it just allows an operation that doesn't make any
sense.

>What if I want to sign an empty email (can this happen anyway?)?

Since you'll always get the same results, just use GPG to sign an empty string
and keep a copy of the resulting block of bytes.  Then whenever you need a
signed empty string, memcpy() it to the output.

Peter.

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.