Milestones are fun, and we hit another one in the last month: the ability to use multiple devices, and I’ve also got a few other things well on their way, as well. Yes, this sounds like super basic stuff on the surface, but the End-to-End Encryption which makes Mensago safe and secure brings in a gaggle of “interesting” challenges that make such a “simple” feature much, much more involved than it would be without encryption. Normally, I’d spare you with most of the details, but I’d like you to understand how hard this stuff is to see better how this is quite an accomplishment.
Keys are the Key
When you first run Connect, you’re asked to choose from a set of ways to move forward, from signing up to a brand-new account to signing in to an existing one to just using Connect on your computer and nowhere else. When you choose to set up a brand new account this is all that you see:

Your name, which is optional, the address you want, and your desired password are literally all that you need to supply; Connect does the rest for you. The most important part of the tasks it performs in the background are creating all the different encryption and digital signing keys that it needs for various tasks, creating your keycard, and uploading it to the server – a process which is perhaps the most complicated and dangerous code on the entire platform. Once completed, all is well and good, but how do you get all of these keys onto another device if you trust the server only enough to reliably sync your files and all you can ask the user for is to supply an address and a password?
Think about that one for a moment. Go on, I’ll wait. 😏
Although there are probably a collection of ways that al the people out there that are smarter than I am would suggest, but the one I could come up with was to leverage something already in place: a device keypair. For context, every instance of a program which can connect to a Mensago server is a ‘device’ — even if you just have 2 different logins on the same computer and each one runs Mensago Connect. In such situations, both of them are a separate device as far as the server is concerned. Every Mensago device is unique and has its own unique encryption keypair.
Connect creates a unique ID and pair of an encryption key and a decryption key for every device, and each time a device logs in, it supplies to the server an blob of which contains information about the device logging in, from whether the device is running Windows or Linux to the encryption key for the device. This information blob is encrypted with a key from your keycard – keycards have to be trustworthy, which is why the process of uploading one to the server is so highly scrutinized. The server creates a special message with this blob attached and delivers it to your mailbox. Other devices see this special message and prompt you to approve or reject the device. Assuming that you approve the device, the existing device packages up all of your keys, encrypts it with the device’s key, and uploads it to the server. When the new device tries to log in again, it receives the package of keys, decrypts it, and the second device is able to do everything the original one could. Whew!
Other Progress
Now that it’s possible to have a second device on your account, I can work on synchronizing data between them–something that is my current focus. Connect in the last couple of months has also seen other small features like monitoring your online status, queuing up tasks to bring in updates or send out messages, and quality-of-life adjustments like displaying dates in a nice way.
A solid month was spent on a very necessary feature for mensagod: Setup Mode.
I did a lot of side IT work for the school I taught at during my teaching career, even things like setting up an instant messaging server to function as an inter-classroom communication system. I also did a lot of homelab stuff, like setting up a mail server, and it was hard. Today I work as a systems administrator, and so often the software I deal with is a pain to set up. mensagod speaks to that pain with Setup Mode. To set up a new mensagod server, you run mensagod --setup
and it will ask you a series of questions that don’t assume you know what you’re doing, set up the database, and print out information where you can set up the administrator account on another computer. Experienced sysadmins can use a text file with the answers in place and it will just do its thing. People who run their own servers – homelab users – are one group of people I designed mensagod for. Simple, easy setup.
Next Steps
Device sync is the big focus now. Once that’s in place, we’ll be well on our way to having an alpha that people can finally try out. Hopefully more big news next time. Until then, be well and be safe, my friends.