Verifying Jex’s attested runtime and chat recovery
By Andrew Borba, CTO of Jex
A phone can sign a request to rejoin a chat, then lose its authorization before the request reaches the server. The signature tells the server which phone asked. It must also check whether that phone still belongs in the chat.
The Jex protocol model helps us check cases like this. A protocol model describes the messages participants can send and the rules for accepting them. We used a tool called Tamarin to check those rules when a group adds Jex, when his runtime opens a Memory vault, and when a device rejoins. For the rest of the design, see the Jex security architecture white paper.
Which key can join a chat as Jex?
To add a device to a Messaging Layer Security (MLS) chat, a member uses the device’s signed KeyPackage. It contains the device identity and public keys. For a Jex device, AWS Nitro signs a report that identifies the enclave build and ties that package to Jex’s device and role. The app verifies the report. It then compares the signing key in the verified package with the key the group actually adds.
The model checks that a client accepts only a matching key. Once the client learns that a build or device has been revoked, it rejects the affected key. A routine upgrade works differently. A still-valid package from the old build can pass if Nitro issued its report while the build was approved and current policy still permits it.
Who can open a Memory vault?
The vault key encrypts a person’s saved Memory. In the case we modeled, the owner’s device creates that key. A second key, called a wrapping key, protects the stored copy of the vault key.
A signed request identifies the person, the vault, and the key version the enclave may use. AWS Key Management Service (KMS) encrypts the wrapping key with the public key in the enclave’s signed report. The host forwards the response. The matching private key stays inside the enclave.
Tamarin checks that KMS releases the wrapping key to an approved enclave and that the enclave opens only the vault named in the request. It also checks that the host learns neither key. How AWS encrypts a KMS response to an enclave
How does a replacement device rejoin?
A replacement phone can rejoin a chat while the other members are offline. Its request names the current version of the group, called an epoch in MLS. Before accepting the change, the server checks that the person is still a member and the device is still authorized. If the group has changed since the phone made the request, the server rejects the outdated request.
Suppose the server adds the phone, but the phone loses its signal before the confirmation arrives. When it reconnects and sends the same request, the server confirms that it already joined. A replacement instance of Jex’s runtime needs authorization for its own identity and role.
The model covers one starting epoch per chat. It assumes MLS has already verified the signed group data and that later epochs have independent keys. The replacement receives keys for its new membership. Reading an older backup requires separate account recovery.
What the results mean
In release v0.1.0, Tamarin proved 11 claims across the three models. A proof covers every sequence of events the model allows, including cases where someone delays, replaces, or repeats a public message. Tamarin also found four examples of successful operations. They show that a legitimate key can pass admission, a vault can open, and both a phone and a Jex endpoint can rejoin.
The models assume the encryption works as specified and the trusted services correctly sign reports, enroll devices, and enforce their policies. An engineer reviewing a Jex release must still check how the shipped code handles those duties. The saved report lists the claim names, tool versions, and a fingerprint for each model file. Results for v0.1.0 · How Tamarin checks a model
Run the checks
Download and unpack the source from the v0.1.0 release. From the directory containing its Dockerfile, build the image and run the checker.
docker build --platform linux/amd64 -t jex-protocol-model .
docker run --rm --platform linux/amd64 --network none jex-protocol-model
The second command runs the checks offline and prints the results. Compare them with the saved report. The release also has instructions for running Tamarin directly.