• chevron_right

      Profanity und OpenPGP for XMPP (OX)

      Stefan · Tuesday, 21 September, 2021 - 18:42 · 2 minutes

    In Debian 11 ("Bullseye") ist Profanity 0.10.0 verfügbar. Installiert werden kann es mit dem Befehl apt install profanity. Profanity ist ein ncurses basierter XMPP Client.

    Lust mal auf ein Experiment? Profanity OX experimental Implementierung! Wir nehmen an, deine XMPP-Adresse ist alice@domain.tld und du willst OpenPGP als Verschlüsselung für deine XMPP Nachrichten verwenden.

    OpenPGP Schlüsselpaar erzeugen

    Im ersten Schritt muss man, wie wir es bei OMEMO auch kennen, ein Schlüssel erzeugen. Der Schlüssel wird in unserem Fall mit dem Programm gpg erstellt und sieht wie folgt aus:

    gpg --quick-generate-key xmpp:alice@domain.tld future-default default 3y
    

    Was passiert hier? Mit diesem Befehl wird ein Schlüsselpaar mit der UID xmpp:alice@domain.tld erzeugt. Die Option future-default wird verwendet, damit ein ed25519/cv25519 Schlüssel erzeugt wird. Der Schlüssel wird nach 3 Jahren ablaufen, wenn dieser nicht verlängert wurde.

    pub   ed25519 2021-09-21 [SC] [verfällt: 2024-09-20]
          583BAE703A801095B6B71A56BD801174B1A0B84A
    uid                      xmpp:alice@domain.tld
    sub   cv25519 2021-09-21 [E]
    

    Öffentlichen Schlüssel exportieren

    Damit andere die Möglichkeiten haben dir verschlüsselte Nachrichten zu schicken, musst du deinen öffentlichen Teil deines Schlüssels mit Freunden austauschen. Der folgende Befehl exportiert einen minimalen Schlüssel und speichert diesen in die Datei tmp/pep-key.gpg. XMPP Adresse und Key-ID müssen natürlich angepasst werden.

    gpg --export \
      --export-options export-minimal \
      --export-filter 'keep-uid=uid =~ xmpp:alice@domain.tld' \
      --export-filter 'drop-subkey=usage =~ a' \
      583BAE703A801095B6B71A56BD801174B1A0B84A \
      > /tmp/pep-key.gpg
    

    Der Key kann vor dem veröffentlichen wie folgt geprüft werden: gpg --show-key --with-sig-list /tmp/pep-key.gpg

    Schlüssel veröffentlichen

    Nachdem man sich mit profanity angemeldet hat, kann man seinen Schlüssel in PEP hochladen. Dies geht mit dem /ox announce Befehl.

    /ox announce /tmp/pep-key.gpg
    Annonuce OpenPGP Key for OX /tmp/pep-key.gpg ... 
    

    Es werden im PEP zwei Einträge vorgenommen.

    Schlüssel von Kontakten abfragen

    Du kannst die Schlüssel deiner Kontaktpersonen abfragen und diese importieren.

    /ox discover buddy@domain.tld
    Discovering Public Key for buddy@domain.tld 
    1234567890ABCDEF1234567890ABCDEF12345678
    

    Die Schlüssel können dann mit dem folgenden Befehl importiert werden.

    /ox request buddy@domain.tld 1234567890ABCDEF1234567890ABCDEF12345678
    Requesting Public Key 1234567890ABCDEF1234567890ABCDEF12345678 for buddy@domain.tld
    Public Key imported 
    

    Schlüssel zertifizieren

    Der Schlüssel lässt sich mit dem gpg Befehl gpg -k buddy@domain.tld anzeigen. Jetzt werden wir den Schlüssel noch unterschreiben.

    gpg --ask-cert-level --default-key 583BAE703A801095B6B71A56BD801174B1A0B84A --sign-key 1234567890ABCDEF1234567890ABCDEF12345678
    

    Der default-key ist unser Schlüssel und sign-key der des Kommunikationspartners.

    Kontakte mit einem OpenPGP-Key für XMPP lassen sich via /ox contacts anzeigen, während /ox keys alle Schlüssel anzeigt.

    Chatten

    In einem Chat Fenster kann OX mit dem Befehl /ox start gestartet werden. Beendet wird es mit dem Befehl /ox end.

    Die Nachrichten werden verschlüsselt und signiert übertragen.

    #Debian #XMPP #Profanity #OX

    • chevron_right

      Year of the OX: OpenPGP for XMPP

      debacle · pubsub.movim.eu / berlin-xmpp-meetup · Monday, 1 February, 2021 - 02:02 edit

    In February 2021, this month, starts the year of the ox. At Berlin XMPP meetup, we will celebrate the new year with an introductionary talk about "XEP-0373: OpenPGP for XMPP" and "XEP-0374: OpenPGP for XMPP Instant Messaging" and the panel of experts:

    • DebXWoody (implementor of OX in Profanity)
    • defanor (implementor of OX in rexmpp)
    • Florian (co-author of the OX standards)
    • lovetox (implementor of OX for Gajim)
    • Paul (implementor of OX in Smack)

    When? Wednesday, 2021-02-10 18:00 CET (always 2ⁿᵈ Wednesday of every month)

    Where? Online, via our MUC (xmpp:berlin-meetup@conference.conversations.im?join). A Jitsi video conference will be announced there.

    See you then!

    #yearoftheox #openpgp #xmpp #ox #jabber #encryption #e2ee #privacy #omemo #🐂️ #berlin #meetup #community #profanity #rexmpp #gajim #smack

    • chevron_right

      OpenPGP mit XMPP - Wie funktioniert dies eigentlich?

      Stefan · Sunday, 2 August, 2020 - 08:42 · 1 minute

    Um Nachrichten zu signierten und / oder zu verschlüssel kann bei XMPP OpenPGP verwendet werden. Die Erweiterung wird in XEP-0373: OpenPGP for XMPP (OX) beschrieben.

    Wie funktioniert dies?

    Alle Teilnehmer besitzt je ein Schlüsselpaar. Also einen private und einen öffentlich Schlüssel. Wem dies noch nicht bekannt ist, es gib ein sehr gut gemachtes Video. XEP-0373 beschreibt wie ein XMPP Client einen öffentlichen Schlüssel im "Personal Eventing Protocol" (PEP) abspeichern kann. XMPP Nutzer können so auf das PEP des Kommunikationspartner zugreifen und dessen öffentlichen Schlüssel beziehen.

    Im ersten Schritt werden die im PEP gespeicherten öffentlichen Schlüsse abgefragt. Die Rückgabe ist eine Liste der Fingerprints. Danach kann der Client die öffentlichen Schlüssel pro Fingerprint abfragen und importieren.

    Wenn der öffentliche Schlüssel des Kommunikationspartner bekannt ist, kann die Kommunikation via OpenPGP erfolgen. I.d.R. sollte man drauf achten, dass man den öffentlichen Schlüssel des Kommunikationspartner signiert hat. Denn nur durch den Abgleich des Fingerprints und des unterschreiben des öffentlichen Schlüssel, kann sichergestellt werden, dass der Schlüssel wirklich der richtige ist.

    Profanity

    Ich habe angefangen OX in profanty zu implementieren. Hierzu werden ich demnächst ein kleinen Eintrag im Blog von profanity vornehmen.

    #XMPP #OX #Profanity

    • chevron_right

      Things I don't like with OMEMO as it is today

      debacle · Tuesday, 13 November, 2018 - 19:21 edit · 2 minutes

    I use OMEMO every day, because I prefer end-to-end encrypted messaging for many purposes. OMEMO is much better than OTR, and it works well enough to be useful. But OMEMO has a number of usability issues, that should be addressed by the IM and XMPP community at some point.

    1. It relates to devices instead of users. I don't want to know, whether my contacts own a new device, nor should they care when I do.
    2. Forward secrecy is a good thing for TLS. But when used for messaging, I cannot decrypt my old messages stored on the server in all cases. Also, it makes key escrow impossible, which is a killer for using it in business.
    3. Deniability. I want verifiable signatures instead. Maybe I want to conclude a contract via XMPP? For deniability I would use an anonymous account in the first place.
    4. OMEMO does not encrypt the complete stanza, but only the textual part of a message.
    5. It does not work with local, serverless messaging. I don't use this feature a lot, but still, encryption should work with it, too.
    6. OMEMO seems to be pretty complex, which makes implementation relatively hard. In fact, bugs related to OMEMO are still frequent in some clients.
    7. I already have an OpenPGP key, that is trusted (and occasionally signed) by many. Why not re-use it for IM purposes?
    8. (added 2019-02-15) This is an amendment to the first point: If we accept the concept of keys per device, at least improve the management. The keys should have a label, e.g. "mobile" or "PC at work", to be less confusing. Or why not automatically cross-sign keys from all devices?

    Some of the points can be addressed in later OMEMO versions, but some points seem to be woven into the fabric. Fortunately, I see the light at the end of the tunnel (and I hope it is not the oncoming train): OX or "OpenPGP for XMPP". I hope, that it will heal all my OMEMO aches:

    https://xmpp.org/extensions/xep-0373.html

    https://xmpp.org/extensions/xep-0374.html

    The only thing, I do not like is synchronising of encrypted private keys using PEP, which involves storing it on the server, only secured by the PGP passphrase and the "backup code", generated by the device. But nobody forces me to use the backup feature and I assume, that it can be blocked by admins who feel uneasy about it. Also, OpenPGP seems to have a higher per message overhead than OMEMO. This is probably unavoidable.

    Edit: Correction about OX private key encryption, thanks to lovetox!

    Edit: Add point about OMEMO complexity and errors, thanks to Holger!

    #omemo #xmpp #im #ox #openpgp #e2ee