- Python 57.1%
- C++ 21.3%
- Perl 20.6%
- Shell 1%
| clients | ||
| specs | ||
| tests | ||
| znc | ||
| CHANGELOG.md | ||
| CREDITS.md | ||
| DISCLAIMER.md | ||
| install-irssi.sh | ||
| install-weechat.sh | ||
| LICENSE.md | ||
| README.md | ||
| RUNBOOK.md | ||
AISM Alpha
AISM is an experimental end-to-end encrypted messaging layer for IRC. The current active prototype branch is aism-alpha. It keeps the project focused on ordinary IRC transport while bringing the broader AISM model back in: Ariadne-style identity, signed invites, device keys, contact trust, encrypted DMs, encrypted channel payloads, WeeChat and irssi client plugins, and a ZNC compatibility module.
Tor, onion services, anonymous relays, mixnets, and SimpleX-style inbox routing are intentionally excluded from aism-alpha for now. The Tor-capable branch is reserved as asim-tor-alpha. The goal of aism-alpha is to get a clean, testable, non-Tor prototype working first.
This is prototype software. Do not treat it as audited cryptography, production E2EE, or a replacement for mature secure messengers yet.
Branch names
- Current branch:
aism-alpha - Future Tor branch:
asim-tor-alpha
aism-alpha means the active alpha branch with Ariadne identity, encrypted IRC transport, client plugins, and ZNC compatibility. It does not include Tor yet. asim-tor-alpha is reserved for the later Tor/onion/relay transport work.
What this branch provides
- Ariadne-style signed identity documents
- Ed25519 identity signatures
- X25519 device keys
- Signed
aism://invite/v1/...invite URIs - Per-contact shared key derivation from exchanged invites
- Manual fingerprint verification
- Contact trust records
- Encrypted IRC
PRIVMSGandNOTICEpayloads - WeeChat Python plugin
- irssi Perl script using the shared Python crypto helper
- ZNC trusted-bouncer compatibility module
- Shared
AISM1.wire format across clients and ZNC - Specification documents for the aism-alpha branch
What this branch does not provide
- Tor support
.onionservices- Tor control port integration
- Onion inboxes
- SimpleX-style disposable receive addresses
- Anonymous relay routing
- Mixnet transport
- IP privacy from the IRC server
- Metadata privacy from the IRC network
- Audited MLS channel encryption
- Audited production security
The aism-alpha branch protects message contents from the IRC network. It does not hide who is connected, who is talking, what channel is used, timing, message size, nicknames, channel membership, or IRC account metadata.
Project layout
aism-alpha/
├── README.md
├── CHANGELOG.md
├── RUNBOOK.md
├── DISCLAIMER.md
├── LICENSE.md
├── CREDITS.md
├── clients/
│ ├── common/
│ │ └── aism_crypto.py
│ ├── weechat/
│ │ └── aism.py
│ └── irssi/
│ └── aism.pl
├── znc/
│ └── aism.cpp
├── specs/
│ ├── AISM-ALPHA-BRANCH.md
│ ├── AISM-IDENTITY.md
│ ├── AISM-INVITES.md
│ ├── AISM-IRC-TRANSPORT.md
│ ├── AISM-CHANNELS-MLS-TODO.md
│ ├── AISM-STORAGE.md
│ └── AISM-ZNC-COMPAT.md
├── tests/
│ └── test_aism_alpha.py
├── install-weechat.sh
└── install-irssi.sh
Project documents
README.md— overview, installation, usage, architecture, and security model.RUNBOOK.md— operational procedures, testing, backup, restore, and troubleshooting.CHANGELOG.md— prototype release history and planned changes.DISCLAIMER.md— security, legal, operational, and responsible-use warnings.LICENSE.md— Apache License 2.0 license text.CREDITS.md— project credits, acknowledgments, and contributor recognition.
Architecture
IRC client
│
├── WeeChat plugin
│ └── Python helper: identity, invites, keys, encryption
│
├── irssi script
│ └── Python helper: identity, invites, keys, encryption
│
└── ZNC module
└── trusted-bouncer compatibility encryption
Ariadne-style identity
↓
AISM contact trust
↓
X25519-derived per-contact shared key
↓
XChaCha20-Poly1305 encrypted AISM1 payload
↓
ordinary IRC PRIVMSG / NOTICE
The client plugins are the preferred path because encryption and decryption happen at the IRC client. The ZNC module is useful for compatibility testing and bouncer-side encryption, but it is a trusted-bouncer model rather than strict client-to-client E2EE.
Security model
AISM Alpha currently protects message content from the IRC server and network operators when both endpoints use the client-side plugins and keep their keys private.
It does not protect metadata. IRC servers can still see:
- source connection
- destination nick or channel
- message timing
- message size
- channel membership
- account and nickname state
- network-level IP information
The ZNC module changes the security model. If ZNC performs encryption and decryption, then ZNC can see plaintext. Use the ZNC module only when that is acceptable.
Cryptography used in this prototype
Current symmetric message format:
AISM1.<base64url(nonce || ciphertext || tag)>
Current primitives:
- Ed25519 for identity document signatures
- X25519 for device keys and invite-based shared-key derivation
- XChaCha20-Poly1305 for authenticated message encryption
- SHA-256 and HKDF-style derivation in the helper where needed
- Base64url encoding for IRC-safe payloads
Current compatibility note:
- AEAD associated data is empty so the Python client plugins and ZNC module can interoperate with the same
AISM1.payload format.
Future versions should add formal test vectors, replay protection, counters, channel epochs, and audited MLS channel groups.
Requirements
Common client dependency
python3 -m pip install --user pynacl
WeeChat
sudo apt install weechat python3 python3-pip
Package names vary by distribution. On Arch/CachyOS, use pacman; on FreeBSD, use pkg.
irssi
sudo apt install irssi perl python3 python3-pip
The irssi script shells out to the shared Python helper for crypto and identity operations.
ZNC compatibility module
sudo apt install znc znc-dev libsodium-dev pkg-config build-essential
On non-Debian systems, install the equivalent ZNC development headers, libsodium, a C++ compiler, and pkg-config.
WeeChat installation
From the extracted bundle:
tar -xzf aism-alpha.tar.gz
cd aism-alpha
./install-weechat.sh
Then inside WeeChat:
/python load aism.py
/aism status
If the script is copied into WeeChat autoload, it should load automatically on future starts.
irssi installation
From the extracted bundle:
tar -xzf aism-alpha.tar.gz
cd aism-alpha
./install-irssi.sh
Then inside irssi:
/script load aism.pl
/aism status
ZNC module installation
Build the compatibility module:
cd aism-alpha/znc
znc-buildmod aism.cpp -lsodium
mkdir -p ~/.znc/modules
cp aism.so ~/.znc/modules/
Load it as a network module from an IRC client connected through ZNC:
/msg *status LoadMod --type=network aism
/msg *aism Help
Remember: this module is a trusted-bouncer compatibility target. If the ZNC module decrypts, ZNC sees plaintext.
First-time identity setup
Run this on each client:
/aism init infrared
/aism id
/aism invite
/aism init creates:
- an Ed25519 identity key
- an X25519 device key
- a signed public identity document
- a local secret identity file
/aism invite prints an aism://invite/v1/... URI. Exchange invites with your contact using a channel you are willing to use for bootstrapping. For better security, verify the fingerprint out-of-band before marking the contact verified.
Adding a contact
Both users need to exchange invites. Alice gives Bob her invite, and Bob gives Alice his invite.
Alice runs:
/aism accept bob aism://invite/v1/<bob-invite>
/aism verify bob
Bob runs:
/aism accept alice aism://invite/v1/<alice-invite>
/aism verify alice
After /aism accept, both sides derive a per-contact message key from their own secret device key and the remote public device key. /aism verify records that the user has manually verified the contact fingerprint.
Sending encrypted DMs
Manual encrypted send:
/aism msg bob hello encrypted
Automatic encryption is enabled by default. If you have a key for the active query or channel, normal typed messages are encrypted before sending.
Control automatic encryption:
/aism auto on
/aism auto off
Control display prefix:
/aism prefix on
/aism prefix off
Temporarily disable the plugin:
/aism disable
/aism enable
Encrypted channel payloads
This prototype supports channel targets using the same shared-key model:
/aism setkey #secret <base64url-key>
/aism msg #secret encrypted channel test
This is useful for testing, but it is not the final AISM channel security model. Production-grade channel encryption should use MLS groups, membership epochs, and key rotation on joins, parts, kicks, bans, and device changes.
The current channel mode is closer to a shared-key compatibility mode. Do not confuse it with real MLS channel encryption.
Compatibility key mode
The old shared-key commands remain for testing and ZNC compatibility:
/aism genkey
/aism setkey bob <base64url-key>
/aism delkey bob
/aism listkeys
Prefer the identity flow for new contacts:
init -> invite exchange -> accept -> verify -> msg
Use genkey and setkey only for compatibility, quick channel tests, or ZNC interop.
Command reference
Common commands supported by WeeChat and irssi:
/aism help
/aism init [display]
/aism id
/aism invite
/aism accept <nick|#channel-alias> <aism://invite/v1/...>
/aism verify <target>
/aism contacts
/aism genkey
/aism setkey <target> <base64url-key>
/aism delkey <target>
/aism listkeys
/aism msg <target> <message>
/aism enable
/aism disable
/aism auto <on|off>
/aism prefix <on|off>
/aism status
Files written by clients
WeeChat:
~/.weechat/aism/
├── identity.secret.json
├── identity.public.json
├── contacts.json
├── keys.json
└── trust.json
irssi:
~/.irssi/aism/
├── identity.secret.json
├── identity.public.json
├── contacts.json
├── keys.json
└── trust.json
Prototype warning: these are JSON files. File permissions are set restrictively where the helper writes files, but this is not yet a hardened encrypted local database.
Running tests
Install the Python dependency first:
python3 -m pip install --user pynacl
Run:
python3 tests/test_aism_alpha.py
The test exercises the AISM Alpha helper, invite exchange, shared-key derivation, encryption, and decryption.
Interoperability notes
WeeChat to irssi
Use invite exchange where possible:
/aism invite
/aism accept <nick> <invite>
/aism verify <nick>
Both clients use the same Python crypto helper and AISM1. payload format.
Client plugin to ZNC module
The ZNC module does not currently implement the Ariadne invite flow. To interoperate with ZNC, use compatibility keys:
/aism genkey
/aism setkey bob <generated-key>
Then import the same key into ZNC:
/msg *aism SetKey bob <generated-key>
Operational cautions
- Do not paste private key files into IRC.
- Do not publish
identity.secret.json. - Do not assume a verified IRC nick is the same as a verified AISM identity.
- Do not rely on shared channel keys for high-trust group encryption.
- Do not use the ZNC module when you need strict client-side E2EE.
- Do not claim this is audited or production secure.
Roadmap
Near-term:
- Better install scripts
- Formal wire test vectors
- Replay protection
- Message counters
- Key rotation commands
- Safer local storage
- Better error display in WeeChat and irssi
- ZNC identity-flow support or explicit separation from identity mode
Mid-term:
- MLS channel groups
- Membership epochs
- Multi-device support
- Signed channel identity documents
- DNS / HTTPS / Codeberg / GitHub / OpenPGP proof providers
- Key transparency experiments
Deferred branch:
- Tor
- Onion services
- Onion inboxes
- Anonymous relays
- SimpleX-style receive addresses
- Mixnet transport
Disclaimer
AISM Alpha is experimental cryptographic software. It is not audited, not production-hardened, and not suitable for high-risk communications. Read DISCLAIMER.md before using or publishing this project.
License
AISM Alpha is licensed under the Apache License, Version 2.0. See LICENSE.md.
The Apache-2.0 license was chosen because it is permissive and includes an explicit contributor patent grant, which is useful for a protocol/library project.