stillbornwolf / android-privacy-guard

Automatically exported from code.google.com/p/android-privacy-guard
0 stars 0 forks source link

Incompatible format of encrypted data (no lienfeeds in encrypted data, especially in header) #127

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. write an email in k9
2. encrypt using APG
3. try to decrypt at the recipient's side (outlook/PGP Desktop)->email seems to 
be broken

What is the expected output? 
decrypted email.

What do you see instead?
email cannot be decrypted by the recipient. Recipient sees an un-decrypted 
email. The format of the encrypted data seems to be unusual. Line feeds between 
the data blocks aren't there as they would be with other PGP software, also no 
line feed in header behind the "begin PGP message"-string and the version info 
string, as well as at the end before the "end PGP message" string. GnuPG and 
PGP Desktop don't recognize any encrypted message, unless it's been sent in the 
correct format. Here is an example:

With APG (current incompatible behaviour):
-----BEGIN PGP MESSAGE----- Version: APG v1.0.8 <encrypted data, no linefeeds> 
-----END PGP MESSAGE-----

result at the recipient's side for this format: 
GnuPG says "maybe 'quoted printable' in armor part"
PGP Desktop says message is broken.

Encrypted message should look like:
-----BEGIN PGP MESSAGE----- <cr+linefeed>
Version: APG v1.0.8 <cr+linefeed>
<encrypted data, cr+linefeeds between the blocks>
-----END PGP MESSAGE-----

result at the recipient's side for this format:
message can be decrypted with PGP Desktop and GnuPG.

What version of the product are you using? APG v1.0.8, K9-mail 4.001

On what operating system?
Android 2.3.4 on Motorola Milestone 2

Please provide any additional information below.
see above

Original issue reported on code.google.com by Zoli197...@googlemail.com on 1 Feb 2012 at 7:21

GoogleCodeExporter commented 8 years ago
Probably a duplicate of issue 116 but with more information,

Original comment by johannes...@googlemail.com on 10 Feb 2012 at 9:13

GoogleCodeExporter commented 8 years ago
Sorry, but still nowhere to find an announcement, when an update will come out 
to patch this issue. Are you still working on it? Please note, that PGP Desktop 
as THE standard software, which is mostly used in companies, I strongly 
recommend you to take it as a reference for compatibility. So, as long as APG 
is unable to handle encryption exactly like PGP Desktop does, it is simply not 
a working PGP solution for adroid.

Zoli

Original comment by Zoli197...@googlemail.com on 10 Feb 2012 at 10:37

GoogleCodeExporter commented 8 years ago
Even if sending encrypted email from K9 to K9 (sender equals receiver) AGP 
can't decrypt own encrypted message stating error about broken message. In 
second screen where error and message are presented manual insertation of 2 
cr+lf after (...)Version: APG v1.0.8 makes decryption possible afterwards.

Original comment by harald.k...@gmail.com on 27 Feb 2012 at 11:29

GoogleCodeExporter commented 8 years ago
For me, only one cr+lf after version info was enough to get the message 
decryptable.

Zoli

Original comment by Zoli197...@googlemail.com on 27 Feb 2012 at 11:33

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Still present in APG 1.0.8, K-9 4.009. However, everything works if K-9 is set 
for sending text messages rather than HTML (in Account settings -> Sending 
mail).

Basically the problem is that the ASCII-armoured PGP message is simply embedded 
in the HTML MIME message part without proper conversion to HTML (particularly, 
without adding at the end of each line the tag "<br />" (or at least placing it 
within <pre> ... </pre> tags):

------JVRUJL5CVDEMNAZ651V0FLU0FY2YBO
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: 8bit

-----BEGIN PGP MESSAGE-----
Version: APG v1.0.8

hQIMA+EiaPJRIvEFAQ//eCy07R+ZXqV93NIu++MrQg4tz7tSEncc5U2GFGmo6CeT
D9niZ5+UXQfPrsZyWc1HTqTV9dgG4JFmW65qyDP1WZCdTpQPbljpDgx7DnxmW5Tz
wh4+HLs6tECpquYxzUjLVtUtGHKIj37oUIHPHyXYZe1C5LSHd5+5A145EDD+Opg6
kwpYfY7cpmGWa2VIVymQeBZGIscCoP8Z/IFx+VHOPhJI68xaW7q9gWzH7s2LEzhg
HodZidF9SUneTjsOeYgq4BVFoQ7sHFndG5kwI/k3A7rZzNM63ZPeOXUi3RrhKjad
scpkmbAz3vqzhEMdUlFK6YmnB74y+ycsjBGQqRDjXcQRjEM5uqLD6ySvDNaH8eI0
m7pkU5BwRR7EJFFs62mwpCj8sZvoeVv3nZAGMsF9YevHNkpr/LaF92nQPTL2Bem/
5vHTS1k8abz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