[RCD] pgp encryption

devotedmystic . devotedmystic at gmail.com
Mon Jan 18 11:04:22 CET 2016


Ok. Here are some examples.

1. Html message without attachments, with signature

[image: Inline image 1]

After my signature fix (removing the signature from the body):

[image: Inline image 2]
Decrypted message:

Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=_0c385807db1dba6581d6bbd4722d8e94"--=_0c385807db1dba6581d6bbd4722d8e94Content-Type:
multipart/alternative;
boundary="=_0c385807db1dba6581d6bbd4722d8e94"--=_0c385807db1dba6581d6bbd4722d8e94Content-Transfer-Encoding:
7bitContent-Type: text/plain; charset=US-ASCIIasd asd asd
asasd--=_0c385807db1dba6581d6bbd4722d8e94Content-Transfer-Encoding:
quoted-printableContent-Type: text/html;
charset=UTF-8<html><head><meta http-equiv=3D"Content-Type"
content=3D"text/html; charset==3DUTF-8" /></head><body
style=3D'font-size: 10pt; font-family:
Verdana,Gen=eva,sans-serif'><p>asd</p><p>asd</p><p>asd</p><p>asasd</p></body></html>--=_0c385807db1dba6581d6bbd4722d8e94----=_0c385807db1dba6581d6bbd4722d8e94Content-Type:
application/pgp-signature; name=signature.ascContent-Disposition:
attachment; filename=signature.asc; size=819Content-Description:
OpenPGP digital signature-----BEGIN PGP SIGNATURE-----Version: GnuPG
v1iQIcBAEBAgAGBQJWl6xjAAoJEKs78blfWHHjIPYP/2eR0BKXEQzAFrQy8mdutIYS/Pa5NqUDFgGaUFfGiBSBCAAfNSbaLnTtdIzSRHttuu8X8vF+J/b5CdAJsvMAuZg4sXHgqCX4oRhDoVCxEV3PMCfWyEjD6+Yr6T8mKjkwI7CRE2osMrfWlnROH4rWsk2akOQyCh3olqw++f5DfJSh9o86bzqD/OmY6Hb0g4NNxybFXZYSDWJIYLoD4v1PIyxrjmnGCzYK1C2gKZVGgLN+W4vBdAARJR1iEHY6+oIZK8kUgeML+IUk5tL/Axc80av3RswHAOwaFQmpORBJMe592w9wX4d/6mbDfLYmfm9MSih2V9VscxYuPwiINtsUJTt/v07jqAszq4gAs9NZrJWTWxUaiXGxATWCOEl0TJyOO1mxj5H05rvLxsDBCpNc2d13BQu1YRlZP4HyliKD3AtFI8zFW5cyeOUoUp3YXQbFl2N8tEDsxAy58HOCQY3IFpOVMpHAPNrvgxdkdyW3nqWT3wW4MtGYL83HUtkjmM/3g1zIzqKPlhXSugoZLzNEMGHmqZoSqZz83dBm01KyDWEk55uhIkU6T9l7LEv8eAZEuTwEo+oIfY3cFPGW+2T6AWE1t9CPaeHAu8Ov8yvwOKqcwpx6xz9L6zjw7uX9i07kgpFQd57iclxqEMqQnMWyp/K7diMfjvwVRtgaFqafs4WZ=+wIM-----END
PGP SIGNATURE-------=_0c385807db1dba6581d6bbd4722d8e94--



2. HTML message + attachment + signature

[image: Inline image 5]

After my signature fix, still the green box with "Message decrypted" is not
displayed, because of the incorrect mime_id.

[image: Inline image 3]
After fixing the mime_id:

[image: Inline image 4]


Decrypted message:

Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=_bfe7c275050be5c5d1053ae2d62df650"--=_bfe7c275050be5c5d1053ae2d62df650Content-Type:
multipart/mixed;
boundary="=_bfe7c275050be5c5d1053ae2d62df650"--=_bfe7c275050be5c5d1053ae2d62df650Content-Type:
multipart/alternative;
boundary="=_dd34536bafebf8a1aa2873136c89542f"--=_dd34536bafebf8a1aa2873136c89542fContent-Transfer-Encoding:
7bitContent-Type: text/plain; charset=US-ASCIIasda asd
asdasd--=_dd34536bafebf8a1aa2873136c89542fContent-Transfer-Encoding:
quoted-printableContent-Type: text/html;
charset=UTF-8<html><head><meta http-equiv=3D"Content-Type"
content=3D"text/html; charset==3DUTF-8" /></head><body
style=3D'font-size: 10pt; font-family:
Verdana,Gen=eva,sans-serif'><p>asda</p><p>asd</p><p>asdasd</p></body></html>--=_dd34536bafebf8a1aa2873136c89542f----=_bfe7c275050be5c5d1053ae2d62df650Content-Transfer-Encoding:
base64Content-Type: text/plain; name=globdata.iniContent-Disposition:
attachment; filename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vAGYAdAAgAFYAaQBzAHUAYQBsACAAQwArACsAIAAyADAAMAA4ACAAUgBlAGQAaQBzAHQAcgBpAGIAdQB0AGEAYgBsAGUADQAKAFAAcgBvAGQAdQBjAHQATgBhAG0AZQAuADEAMAAzADEAPQBNAGkAYwByAG8AcwBvAGYAdAAgAFYAaQBzAHUAYQBsACAAQwArACsAIAAyADAAMAA4ACAAUgBlAGQAaQBzAHQAcgBpAGIAdQB0AGEAYgBsAGUADQAKAFAAcgBvAGQAdQBjAHQATgBhAG0AZQAuADMAMAA4ADIAPQBNAGkAYwByAG8AcwBvAGYAdAAgAFYAaQBzAHUAYQBsACAAQwArACsAIAAyADAAMAA4ACAAUgBlAGQAaQBzAHQAcgBpAGIAdQB0AGEAYgBsAGUA--=_bfe7c275050be5c5d1053ae2d62df650----=_bfe7c275050be5c5d1053ae2d62df650Content-Type:
application/pgp-signature; name=signature.ascContent-Disposition:
attachment; filename=signature.asc; size=819Content-Description:
OpenPGP digital signature-----BEGIN PGP SIGNATURE-----Version: GnuPG
v1iQIcBAEBAgAGBQJWl6y5AAoJEKs78blfWHHjebsP/iMnmeb2qkvwLRh98WB4LRflZSaYKiW6EP+JHHX0gNcqp/ofU9HwGWDHMuR7k5nhmVk9b/eD/MGFAlvjHQa47b44qUzUvjz46aajTyAgUkUmV44IFEHAasX09DkhL+MO8dYf0pDWbAru0RjVV89QOEUCsrLMQR3kNDHnf1A0KX9k2KDsF1x+kUo62ZEpCdVLKLErcDPuXb7mapx8eKjihXKoLG3beSIKVHKFz07ZZehtPG+Ed/9BnbgOAEqjDOe6w4L8isoR+KUXHJOtp5tCDUQK1eRIxAsLjsQsvOGxBiMsyo1opiok4JWj4Zqu8VPJZENCDbJ7jXQfPHtM57GZ0jXb219N80xT9jBOqtQWVKKM0BeqGf/kn8vRpUSJr5qervsO8JvRPkzduqZ9JXewQPhPFrSadPiyqd8kF4VGpULpvB7ckxETUJjadoKVheF44r+0oVoEqHCnkIQpFZuKkjpHJbvMrAqHJXMNmEd1W0e2B1b2FBe02iMJ1DzvP0Kj5PVgrjiqXF6mhwkCpO5xxiwfH8dE6cCW2ReGbF5NdrbmySPsEmKXnW4o4GGU8pSrs0W1xHyTk+JRjRlAhS7vK9+W5wjukEDE42tbBtycFn1AKZSKBsL9UVTXcXAqLkDANefQOkL5q9wGOxW77EGoZySEfsORbWccIz9TDbwxwFRH=Oa6W-----END
PGP SIGNATURE-------=_bfe7c275050be5c5d1053ae2d62df650--




On Mon, Jan 18, 2016 at 10:36 AM, A.L.E.C <alec at alec.pl> wrote:

> On 01/18/2016 10:18 AM, devotedmystic . wrote:
> > Anyway, if you send an encrypted message to yourself, you will see that
> > only a plain text message without attachments works (do the test with
> > signature included). You see the green squared message that it was
> > decrypted, and the decrypted text.
> >
> > Any other combination (html, attachments) fails to decrypt and you get a
> > blank page.
> >
> > The main issue with parsing the correct content type is the "^"
> > character, which failed on my system. Maybe, Debian systems expect just
> > a "\n" and instead the files also contain "\r". There is no issue
> > removing the "^" and all works.
> >
> > The issue with attachments is that the wrong (incomplete) mime_id was
> > passed. Thus, decryption hung and you saw again the blank page. That's
> > why I updated with the "1.2" value, which is the usual position of the
> > text when there are attachments, and all worked. I saw this printing the
> > structure of the message and comparing it to a text plain email without
> > attachment.
> >
> > Last, if the message contained a signature, it displayed the usual blank
> > page again, because Roundcube parser does not take into account
> > signatures. So you need to remove it from the body before passing it to
> > Roundcube functions.
>
> As I've said before, all of this works for me. That why I need message
> samples.
>
> --
> Aleksander 'A.L.E.C' Machniak
> Kolab Groupware Developer        [http://kolab.org]
> Roundcube Webmail Developer  [http://roundcube.net]
> ---------------------------------------------------
> PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
> _______________________________________________
> Roundcube Development discussion mailing list
> dev at lists.roundcube.net
> http://lists.roundcube.net/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20160118/8abaf2fa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12569 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20160118/8abaf2fa/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 10234 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20160118/8abaf2fa/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 11335 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20160118/8abaf2fa/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 19403 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20160118/8abaf2fa/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 13437 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20160118/8abaf2fa/attachment-0009.png>


More information about the dev mailing list