- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| imbec.py | ||
| README.md | ||
IMBEC1
Imperial Metric Boring Ethernet Chat (not related to imperial/metric units, boredom, or ethernet)
✉️ Introduction
IMBEC1 is a local, secure email-like messenging app that runs completely offline, supports multiple users with passwords protected by bcrypt, sends messages encrypted with AES-GCM, and utilizes the filesystem itself to relay messages.
This is a proof-of-concept that there can exist a messenging utility that is completely offline and private while remaining capable of sending secure messages across several users in a local device.
🚀 Quick Start
Download imbec.py and place it in a folder in your shared device that all users have read/write access to.
Run it and create users to begin.
Tip
Stuck? Look at the options above every prompt! There is a list of possible options above every prompt.
🏗️ Structure and Principles
This program utilizes email-like workings where a user owns two folders (Inbox and Archive). From the main menu or a folder display, the user can delete messages, move them to the other folder, select messages to read, or write a new message.
Unlike conventional email clients, however, this program supports the setting of a Universal Passphrase. This is a string that is used to encrypt outgoing messages and decrypt incoming messages. A message requires that the recipent user have the same Universal Passphrase as the user who sent it. The default is "wwc26!" and users need no extra work to properly read messages sent by users on the default settings. On special occasions, a user can edit their Universal Passphrase to be something else. The recipient must have the same Universal Passphrase setting to read it. Otherwise, the message will fail to decrypt. This ensures security in confidential conversations.
Warning
Do not leak any confidential information in the title or your username! Those parts aren't protected by the message encryption.
When writing a new message, an editor appears where you can select a recipient, write a title, and draft a multi-line message. During this process, the user is able to press Control+C to enter a menu where they can see their message and is able to do several actions to it: Send it, change the title, re-edit, or delete it.
If a message is sent, it is encrypted with the Universal Passphrase and formatted into a standard IMBEC1 format (IMBEC1;FROM:{sender};MESSAGE:\n{encrypted_body}). All messages are securely encrypted, and no hint of the contents of a message can be inferred when inspecting raw message files. This encrypted package is written to a TXT file to the recipient inbox folder.
🤷 Why?
My friends recently decided to utilize a desktop PC as a server. I forgot who thought of this, but someone had the idea of a local chat (probably me, but no bets). This was developed into the idea of IMBEC.
⁉️ FAQ
Q: It doesn't work on Windows!
This program was only tested on Debian Trixie. It utilizes POSIX terminal controls. Use Linux if possible, but if Windows is required, try WSL.
Q: I get permission errors on <INSERT PLACE>, why?
You must properly set up user permissions in the folder IMBEC lives in. All users must be able to read and write in able to use this app properly.
Q: I'm concerned that users are able to do <INSERT MALICIOUS ACTIVITY> due to the broad file permission requirements...
Unfortunately, yes, that is a result of the design of this app. It is designed with the assumption that all members with access are 100% trustable. If possible, set an read/execute-only permission for the main IMBEC file to prevent tampering with the code.
There is no way to prevent tampering with of the emails, usernames, and titles. However, there is no possible way that a malicious actor can, in any way, read the contents of a message encrypted with a unique Universal Passphrase, or find out your password.
🏅 Credits
P7MJ original.