Subject: Converting mailbody to UTF-8 before encryption?

From: Holger Sesterhenn <[email-masked]>
Date: Wed, 26 May 2004 18:30:43 +0200

Hi,

regarding to chapter 3.4 of the rfc2440bis-10 "the character set for
text is the UTF-8 encoding of Unicode".

Does this mean I have to convert e.g. the text body (text/plain) of a
mail to UTF-8 before encryption? Until today I thought this concerns
only user ids, URIs, notations etc and data to be encrypted is handled
as a binary stream.

This question sounds silly but I have some problems to handle the
decrypted data of "OpenPGP compliant" programs sent by famous mail
clients...

One mail client plugin does convert every mail to UTF-8 (e.g. german
"umlauts" or the euro currency symbol) before encryption. There is no
special "charset" line in the ASCII armored body because UTF-8 is the
default. You can configure the mail client to use "iso-8859-1",
"iso-8859-15", "utf-8" or whatever. Nothing changes. The encrypted data
is still UTF-8.

What should another client do on decryption? Convert back from UTF-8?
Handle the byte stream as is?

Here some examples:

CryptoEx does convert on encryption not on clear signing
PGP does not convert at all
GnuPG does not convert at all

I am a little bit confused.

-- 
Best Regards,

Holger Sesterhenn

---

From: "Adrian 'Dagurashibanipal' von Bidder" <[email-masked]>
Date: Thu, 27 May 2004 08:31:16 +0200

On Wednesday 26 May 2004 18.30, Holger Sesterhenn wrote:
> mail to UTF-8 before encryption?

Hmmm. I was going to say that PGP/MIME avoids this problem entirely by 
requiring all data to be ascii-only (using base64 or qp to achieve 
this). But looking through 3156, I see that
 - 8bit data for encryption-only messages is allowed and
 - it seems not to specify if text or binary mode should be used in 
encryption. (I did only quickly scroll through, so maybe I just missed 
that bit)

The kmail OpenPGP plugin seems to use binary mode (and even so, uses a 
7bit-clean encoding inside the encryption), so this would indeed not be 
an issue. Dunno about other implementations.

greetings
-- vbi

-- 
COFFEE.EXE Missing---Insert Cup and Press Any Key.