Encryption
IRC servers can read everything you send. Heydrun can encrypt a channel or query end to end, so only the people taking part can read it. The server still sees who is talking, when, and in which channel.
Encryption is set up for each channel or query separately. Open it, then choose Secure Chat from the More actions menu. Once it's encrypted, a lock button appears at the start of the message field, which opens the same screen. Each encrypted message starts with [encrypted], [encrypted, forward secret], [Off-the-Record] or [weak encryption], so you can hear how it was sent. Messages read aloud start with the same words.
Heydrun supports four kinds of encryption. +AGE, +AGM and FiSH are the same as HexDroid's, so they work between Heydrun and HexDroid users; Off-the-Record works with irssi-otr, Pidgin and other OTR clients.
Only one encrypts a channel or query at a time. +AGE comes first when it's on, then Off-the-Record while one is running, then a saved +AGM or FiSH key. A saved key is kept while +AGE or Off-the-Record is in use, and used again once they're off.
+AGE: automatic, for queries
+AGE needs no shared key. Each person has an identity, and keys are exchanged automatically once both sides have +AGE turned on. Keys keep changing as you talk, so a key stolen later can't decrypt earlier messages (forward secrecy).
To use it:
- Open Secure Chat in the query and choose Turn on +AGE. The other person does the same.
- The first time Heydrun sees the other person's identity, it remembers it (trust on first use).
- To be sure you're talking to the right person, compare safety numbers. Secure Chat shows yours under Your +AGE safety number, with Copy safety number, and theirs under This contact. Compare them by another route, such as a phone call, then choose Mark verified.
If someone's identity changes later, Heydrun doesn't accept it silently. It tells you, and waits for you to decide:
/age pendinglists the identities waiting for a decision./age trust nickaccepts the new identity. Do this only if you know why it changed, for example they reinstalled their app./age reject nickrefuses it and keeps the old one.
+AGE works only with Heydrun and HexDroid.
+AGM: a shared key, for channels
+AGM uses one random key that everyone in the channel or query shares. Anyone with the key can read and send messages.
- Open Secure Chat and choose Generate key.
- Choose Reveal key to share, and give the key to the others privately, not in the channel.
- Each of them adds the key in their own client. In Heydrun or HexDroid, that's Paste a key from another user, in Secure Chat.
New key makes a new key. The old key stops working at once, so everyone has to add the new one.
The same can be done with commands: /agm-key gen, /agm-key set, /agm-key clear and /agm-key info. See Commands.
+AGM also works with desktop clients. HexDroid's plugins for HexChat, irssi and WeeChat are in the aes-client-plugins folder, each with instructions.
Off-the-Record (OTR), for queries with other clients
Off-the-Record (OTR versions 2 and 3) is the encryption irssi-otr, Pidgin, WeeChat's OTR script and many other clients use for queries. There's nothing to set up beforehand. In Secure Chat choose OTR, then Start Off-the-Record, or type /otr init; the other person's client answers by itself. If they start one, Heydrun answers too. Each conversation gets fresh keys, so it stays private even if your key is taken later.
To be sure you're talking to the right person, either compare fingerprints, shown in Secure Chat or with /otr info, over some other channel and then switch on "I've checked their fingerprint" (/otr trust); or ask a question only they can answer (/otr authq Where did we meet? at the station). They're asked to answer in their client, and if the answers match, each of you is marked as verified. When someone asks you, the question appears in the query and in Secure Chat, where you can answer, or answer with /otr auth and the answer.
End it with End Off-the-Record or /otr finish. If the other person ends it, nothing you type is sent until you end it too, or start again, so a message meant to be private never goes out unencrypted. Off-the-Record lasts while Heydrun is running; reconnecting keeps it, and an Off-the-Record conversation restarts by itself if one side lost it. Messages a bouncer plays back from an earlier OTR conversation can't be read, and are skipped.
Heydrun uses otr4j for OTR, under the Apache License 2.0.
+OK: FiSH, for older clients
+OK is the Blowfish encryption known as FiSH, which many older IRC clients support. It's much weaker than +AGM and +AGE. Use it only when the other side can't use +AGM or +AGE.
For FiSH, you and the other person type the same Passphrase. Use at least 12 characters, since short passphrases are easy to guess.
Messages that weren't encrypted
In a channel or query with encryption on, a message someone sent without it is marked with an open padlock and [not encrypted], which screen readers say first. It may be from someone without the key, or a client that isn't set up for it. Anyone on the network could read it, and could have written it.
Turning encryption off
In Secure Chat, choose Clear to remove the key, Turn off +AGE, or End Off-the-Record. Messages there are then sent unencrypted, unless another kind is still set up.
Scripts and encrypted buffers
Scripts see encrypted channels and queries as you do, so a script such as translate works there too. To keep them out, turn off Scripts can read encrypted messages in Settings, Privacy. Scripts then see none of the messages you send or receive in a channel or query with a key, +AGE or Off-the-Record, so none can copy them anywhere. Commands you type there still reach scripts.
Chat logs and encrypted buffers
When logging is on, messages in encrypted channels and queries are written to the chat logs as readable text, like any other. Anyone who gets hold of your logs can read them. To keep them out, turn off Log encrypted messages in Settings, Logging. They then won't be in the scrollback when you reopen Heydrun, though a server or bouncer that keeps history can still send them again.
How it works
The protocols are documented for anyone who wants to check them or support them in another client:
- +AGE handshake
- +AGE wire format
- +AGM wire format
- Off-the-Record: the OTR version 3 protocol