QuickMSG details

QuickMSG format

QuickMSG uses multiplart/encrypted MIME messages. They can be recognized by the presence of a 'X-QuickMSG: v1.0' header. The contents are encoded as a PGP/MIME message.

The encrypted part contains a multipart/mixed MIME message. The encrypted part is encrypted with the public key of the receipient and signed with the sender's private key. There is atleast one bodypart, it has the type 'application/quickmsg'. This is the actuall quickmsg.

X-QuickMSG: v1.0
Content-Type: multipart/encrypted
         |
         |
         +-- application/pgp-encrypted
         |
         +-- application/octet-stream
                |
                |
                +-- multipart/mixed
                          |
			  |
			  +-- application/quickmsg
			  |           |
			  |           +-- Action: post
			  |           +-- Name: Foo
			  |           +-- Group: 3
			  |           +-- Owner: foo.bar@example.com
			  |           +-- Time: 123456789
			  |           |
			  |           +-- Post data
			  |
			  +-- */* any attachment

application/quickmsg

This attachment is in a plain text format. It contains a number of headers:

After the headers a blank line with only a newline character is sent. If 'Action' was 'post' the actuall message will follow after this.

Any other media besides text (such as images or videos) are sent as an attachment. (but still encrypted!)

Key exchange

In order to send messages we need the receipients public key, and the recepient needs ours. There are two ways to add new contacts and their keys:

Example message with attachment

This is an example of an attachment being sent to a group. A 1Mb photo was selected in a gallery and shared using the QuickMSG app. (Not all headers have been copied, and the 1mb attachment is only partially shown)
Date: Sat, 8 Mar 2014 02:54:11 +0100 (CET)
From: foo.bar@example.com
To: foo.bar@example.com
Message-ID: <1083979904.3.1394243609991.JavaMail.javamailuser@localhost>
Subject: [quickmsg]
MIME-Version: 1.0
Content-Type: multipart/encrypted; 
	boundary="----=_Part_2_1085996472.1394243609333"
X-QuickMSG: v1.0
X-UIDL: 'c5"!%g:!!'SZ!!*]I"!

------=_Part_2_1085996472.1394243609333
Content-Type: application/pgp-encrypted; name=pgp_mime_id
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename=pgp_mime_id

Version: 1

------=_Part_2_1085996472.1394243609333
Content-Type: application/octet-stream; name=encrypted.asc
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename=encrypted.asc

-----BEGIN PGP MESSAGE-----
Version: BCPG v@RELEASE_NAME@

hQEMA9fsnTENhgApAgf+JDKj7o4ObJx6PMyzW6AXz4Fsc2HY/0nTMkgSRPD+gjQ7
bH8aD547SdG3mo8SLQ7PgxjsQ/hrc0covPJxfAqqDRGvwoNAsGuMG5QQRLGUOsvS
ej+K+oNXqMn3VYiX5s1FF7BZwyYIr/47jQMl0EEflh5uw9gpbbWw8iQmqOQ3X/QY
mKZaKeYet+OOcp3L/zsXpT2aHFckyFnVn4yh7ZIYMEaqWKQR1kxg1J4wy4qaoOtx
4HgbhNvKSD3Gp3L7Gdk6kHFoLOT3z8CFPKLRkC1pHr7Arkm3Rlvmk/9Lpm8Qp60G
kRvtz9+U3LrpmQY5dT1VeckhmU6kJ1KL04B9jo3GN8n/ABI9OrTYtuFNkNqX7XPR
                          ........
2LjxoMJFR47tti8waN7Zo4rm6iU2zAbfJtHu+H94D75A8EDk/r/q6su4BGnJ1qro
krZl3PMSiIq3aUuaeAGeNywBdgay8BotakV0O85iznNmzs1I+1o6rRBU2LfNdfpe
jKzDWBEtCcZOgS23LWDKW7dCcu3Ycg3pSzvDMsHLxb2ACzNuVJbaUBqHXs+Vmf6a
qh/WaKMi+lVJk04JPUdv41i8XMfsZP/HaSI22r/zHZvLpG9ZtLQJev4sfdfcge29
KiOb7gKfFgO4Vc2yc6xtYqvmRKld0yKDfEU35v4ON9xxztdIkheRF1gnMAEzxuE1
gcjk+15+4GgkqPCuvR78KyWZ84tIC34aRoMaNU6yTHAa8uqaZ/fUysqi0Y3BOJC9
/u+SQ7pevY3nnZ7zR9Uc
=PMUL
-----END PGP MESSAGE-----

------=_Part_2_1085996472.1394243609333--

Once decoded a new multipart/mixed message appears. (Again not the whole 1Mb attachment is shown) Note that the QuickMSG part has no post data, this post only contains the image and no additional text.
Message-ID: <1079472760.1.1394243583255.JavaMail.javamailuser@localhost>
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_0_1079827328.1394243583223"

------=_Part_0_1079827328.1394243583223
Content-Type: application/quickmsg; name=QuickMSG
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=QuickMSG

Action: post
Name: Foo Test
Group: 0
Owner: foo.bar@example.com
Time: 1394243582


------=_Part_0_1079827328.1394243583223
Content-Type: image/jpeg; name=191
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=191

/9j/4UbkRXhpZgAASUkqAAgAAAANAAABBAABAAAAAAoAAAEBBAABAAAAgAcAAA8BAgAIAAAAqgAA
ABABAgAKAAAAsgAAABIBAwABAAAABgAAABoBBQABAAAAvAAAABsBBQABAAAAxAAAACgBAwABAAAA
AgAAADEBAgAMAAAAzAAAADIBAgAUAAAA2AAAABMCAwABAAAAAQAAAGmHBAABAAAA7AAAACWIBAAB
AAAAVAIAAGYCAABTQU1TVU5HAEdULVM1ODMwaQBIAAAAAQAAAEgAAAABAAAAUzU4MzBpWFhNQTEA
MjAxNDowMjowMSAxNzozMzowNQAVAJqCBQABAAAA7gEAAJ2CBQABAAAA9gEAACKIAwABAAAAAwAA
ACeIAwABAAAAkAEAAACQBwAEAAAAMDIyMAOQAgAUAAAA/gEAAASQAgAUAAAAEgIAAAGRBwAEAAAA
                          ........
k7ew680sawxIC+CAOARUUpJrUunNJMkjgS8tWWJmBJOSDUcaeShSEEkDk5qoR9q9Ck0yaztxdKBI
p3Z7jrU07/2fbEL0JPU9KuUeW5Li2QSTS3FiJHiUqSN2F7VKXsorY5YhgByBnFZwva5jKMnJIhcR
xjepLMSDkrjFOjknkjadgSM8kmt5XlDlYlF8rRpWttDJZsNoJIySBjArOaCeSdkhbIA44p1KfM0j
enBtWLKxi1iYzttK/wB6qN9LA7G6upCqqBgKuc1zS9yo0h1INaDUjtZY/OiBUEHB78VDaSCaUiOX
LKehFatLluZyT5LD9Qe7hhaVZAA2M555qm80lxAG2gYHBA4zSVNNK5eHaULEBmuBMYi3BHKirKWz
TYVeSRzu6CoqQ5noVO6egkuLcmJpM7RyD0FVprKJWMgw5Y5IJ4FbxpJxuTzOOpTutwIMUY4PIHFW
pLZYUVgSpOMjHrURg/aG0KkZIPshQmJsFhyQKrsLp5zBGo2nuauTfMiHywZO6wyRrC6BmBIDAdDV
ZI7iCQwsQSDzgVy1IyTDVxNAW/7tpS2MDgk1F9nuH2yC1jmCtwjsQD+RBrrlQTpJGfK+a5//2QA=

------=_Part_0_1079827328.1394243583223--