XMPP - Extensible Messaging and Presence Protocol


XMPP is a decentralised messaging protocol.
Different servers can communicate with each other.
Wide range of (mostly useless) XMPP clients exists.
(defragmentation like in the Linux world)

JID - Jabber Identifier

JID is your address (takes the form of an email address)

What is Jabber: Jabber.org is the original IM service based on XMPP and one of the key nodes on the XMPP network.

Because of the "history", everyone calls XMPP address a JID.

therealtrump@mylittlebrony.fbi

Because XMPP (kind of) works like email (but not exactly), different servers can communicate with each other.

If alice@fbi.gov wants to send a message to bob@cia.gov, it goes like this:
  1. Alice sends a message (internally to her server)
  2. her server (fbi.gov) tries to reach cia.gov
  3. When reached successfully, fbi.gov sends a message (XML file) to cia.gov
  4. cia.gov accepts the file and assigns it to bob
  5. cia.gov sends an update to bob's client - showing the message
(I think that's how it works - not sure though!!)

MUC - Multi-User Chat

Link to a XEP-0045: https://xmpp.org/extensions/xep-0045.html
Basically allows to have a group chat.
Group chats are called MUCs
There are 2 types of MUCs

OMEMO - OMEMO Multi-End Message and Object Encryption

It is an open encryption standard based on the Double Ratchet Algorithm and the Personal Eventing Protocol (PEP, XEP-0163).
OMEMO offers future and forward secrecy and deniability with message synchronization and offline delivery.

The OMEMO protocol offers many-to-many encrypted chat, offline messages queuing, forward secrecy, file transfer, verifiability and deniability at the cost of slightly larger message size overhead. In short: It's an encryption thing that encrypts your message for each chat participant
(be it 1-on-1 or in a MUC)
Each device/client has a key that is shared to other chat members.
When you send a message, the message is encrypted FOR EACH MEMBER

Fake example:

Unencrypted


<xml>
	<message>
		<from>alice@fbi.gov</from>
		<to>agents@muc.fbi.gov</to>
		<message>
			They know
		</message>
	</message>
</xml>

Encrypted


<xml>
	<message>
		<from>alice@fbi.gov</from>
		<to>agents@muc.fbi.gov</to>
		<message>
			<omemo key="abc...">
				yujetyjtjeuw3efblhabrf
			</omemo>
			<omemo key="zxc...">
				asdjkhasdlkjhiexnbadfo
			</omemo>
			<omemo key="qwe...">
				ijqwekafihqwdeohasoihs
			</omemo>
			
		</message>
	</message>
</xml>

THIS IS NOT EXACTLY HOW IT WORKS BUT IT WORKS SOMETHING LIKE THAT!!!!

Sending photos

In order to send a photo, your server has to have "Sending photos enabled".
When you send a photo, the photo is saved on your server and then the server sends the link to fetch it.

If servers have no storage assigned, or have sending photos disabled, you won't be able to send a photo.

Receiving photos

Even if Sending photos is disabled, if you get a photo from an user, whose server allows to send photos,
you can, of course, download and view that photo, because it's handled by your client.
You are just fetching the photo from sender's server.

Voice & Video calling

1-on-1: Available depending on client capabilities.
MUC: I think it's not available (yet).