How to check Hubs encryption yourself
Rebuild the encryption files from the open source code, and check that thehubs.gg serves exactly what each signed release lists.
The end-to-end encryption in Hubs is open source, and every time we release the website we publish a signed list of every file it serves. With a computer and a few commands, you can check that thehubs.gg runs exactly the published code. End-to-end encryption explains what this covers and what it doesn't.
Get the code
- Copy the repository at github.com/AscentsGG/hubs-encryption to your computer, with git or as a download.
- Open a terminal in its folder.
Check the website against its signed list
node tools/check-release.mjs --currentThis reads the release thehubs.gg is running and fetches its signed list from github.com/AscentsGG/hubs-releases. It checks the signature with the release signing key built into the script, then fetches the pages, their headers and the files, and compares each one with the list.
To also fetch every older file the release still carries (a few thousand requests, so several minutes)
node tools/check-release.mjs --current --allTo check another address that serves Hubs, such as an organization's own domain
node tools/check-release.mjs --current --site https://<address>Rebuild the encryption files
The website runs the two files the open source code builds, unchanged, and the build makes the same bytes on any computer. From the repository's folder:
cd typescript
npm ci
npm run build
cd ..
node tools/check-release.mjs --current --rebuilt typescript/distThe check verifies the signed list, confirms thehubs.gg serves the files it names, and compares your two files with the release's. It ends with "Your rebuild matches this release" when every byte is the same.
The main branch holds the code the current release runs. When a release changes the encryption code, the repository gets a tag named after that release, so you can check an older release from its tag.
Check a signature with OpenSSL alone
Download a release's list and its signature from the releases folder of hubs-releases, and save the public key from End-to-end encryption as release-signing-key.pem. Then:
base64 -d -i <release>.json.sig > sig.bin
openssl pkeyutl -verify -pubin -inkey release-signing-key.pem -rawin -in <release>.json -sigfile sig.binIf something doesn't match
Email security@thehubs.gg with what the check printed. Please don't post about it before we have had a chance to look.
A check shows what was sent to your computer when you ran it, not what your browser ran on an earlier visit. The phone and desktop apps are covered by the signatures on their installers and store builds, not by these lists.