[openpgp] Re: Analysis document

Daniel Huigens <[email protected]>
Newsgroups gmane.ietf.openpgp
Message-ID <G_70pcY_bf7DN2g-qMVMPk18RAVAk_s5fsUyafQyEJKmwxk3CDhAHeKCzss_Bl0GELhS53JGA7tydnM4gh_4XlqTmHAhp3n9VvLMJ7GYulQ=@protonmail.com>
On Thursday, July 10th, 2025 at 17:25, Andrew Gallagher wrote:

> If this were forbidden, it would add some novel failure modes. For example, if I sign over a UTF-8 document with a text signature, and it turns out that there is an invalid UTF-8 character in it (say, a mishandled surrogate), is the signature invalid? Even if there’s no malleability risk?

That's not a new question, due to the text in section 4.6 Falko quoted as saying:

> For text document signatures (type ID 0x01), the implementation MUST first canonicalize the document by converting line endings to <CR><LF> and encoding it in UTF-8 (see [RFC 3629]). The resulting UTF-8 byte stream is hashed.

So basically it's already forbidden, the main thing we're discussing is just to make it more explicit.

But also, forbidding signing over non-UTF-8 data doesn't automatically require failing to verify in that case, instead the verifier could just assume that the data that was signed over is UTF-8, and I think that'd probably be simplest & safest as well.

Best,
Daniel

_______________________________________________
openpgp mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.