It’s a technical deep dive, so buckle up!

We’ve written this blog post to help you understand how Beeper Mini works. At Beeper, we believe that it is critical for you to be able to trust the software that you use, especially something as important and sensitive as your chat app. We work to earn and keep your trust in three ways:

  1. Transparency – since we started Beeper 3 years ago, we’ve been taking opportunities like this to explain how Beeper works. We have a proud history of building products, like Pebble, and stand publicly behind our work.

  2. Open source – each major piece of software that we’ve built to interact with other chat networks is open source at github.com/beeper.

  3. Privacy and security-aligned business model – we make great software and charge a small subscription fee. Simple as that. No ads. Your data stays private.

Security and privacy

Read the entire post for the full story. TLDR: the following features of Beeper Mini ensure that all communication is encrypted and secure.

  • All messages are end-to-end encrypted before being sent. Beeper (and Apple) cannot see your messages.

  • Encryption keys never leave your device.

  • Beeper Mini connects directly to Apple servers. There is no Mac server relay, like other apps.

  • No Apple ID is required. Beeper does not have access to your Apple account.

  • Your contact list never leaves your device.

Don’t believe this is possible? Try the open-source Python proof of concept on your own computer to see for yourself. Security researchers are invited to verify all claims that we make, see appendix below.

How it works

Beeper Mini works differently than Beeper Cloud in important ways that increase your privacy and security. Beeper Mini is a standalone Android app. It does not require a cloud server to send and receive messages. It also implements Apple’s end-to-end encryption protocol natively within the Android app itself. All messages are end-to-end encrypted before they are transmitted directly from your device to Apple servers. Learn more about iMessage encryption on Apple Platform Security page.

This is now possible because the iMessage protocol and encryption have been reverse engineered by jjtech, a security researcher. Leveraging this research, Beeper Mini implements the iMessage protocol locally within the app. All messages are sent and received by Beeper Mini Android app directly to Apple’s servers. The encryption keys needed to encrypt these messages never leave your phone. Neither Beeper, Apple, nor anyone except the intended recipients can read your messages or attachments. Beeper does not have access to your Apple credentials.

We built Beeper Mini by analyzing the traffic sent between the native iMessage app and Apple’s servers, and rebuilding our own app that sends the same requests and understands the same responses. Learn more by reading jjtech’s blog post, iMessage Explained, and his proof-of-concept Python implementation on Github. Anyone can download this code, run it on any computer that supports Python, login to their iMessage account, and send and receive iMessage protocol messages. No Apple hardware required.

Another change is that Beeper Mini does not use the Matrix protocol, encryption or code like Beeper Cloud. It is a completely new codebase, versus our first Android app, which was a fork of Element. In the future, we are planning to add Matrix network support back in, along with support for the 15 other chat networks in Beeper Cloud. Read more about our roadmap.

Inside the Beeper Mini Android app

1. Sign in

When you first start the Beeper Mini app and sign in with Google, a registration request is sent to our Beeper API Server. This service only exists to verify your subscription status, as well as give our support team the information they need to debug any issues that you may be running into (including your name and email address). No iMessage credentials or messages are transmitted through these servers, which are for Beeper Mini account management only.

2. Permissions and registration

After that, you are prompted to allow notifications, which sends a push token to Beeper Push Notification service, which enables our servers to send push notifications to your Android device. These push notifications do not contain the contents of messages.

Next, you are prompted to grant contact list and SMS permission access.

  • Contact list access is used to match phone numbers to contact names, and display profile pictures. Your contact list is never sent to Beeper servers.

  • SMS access is used to send an SMS text message from your number to Apple’s “Gateway” service. The gateway sends a response via SMS, and the contents from that SMS response are sent to Apple to register your phone number as a blue bubble. Your SMS chat history is also used to determine if any of your recent SMS chats were with people who have iPhones. If so, these chats are shown in the inbox.

It’s at this point that the app generates encryption keys that are used for end-to-end encrypted messaging. The public key is sent to Apple servers, and the private keys are stored in the Android device local filesystem. Beeper Mini is now signed in.

3. Optional Apple ID sign in

Optionally, you may also sign in to your Apple ID to enable sending/receiving from your email address. This will also enable you to send and receive messages from other Apple devices like iPad or Macs. The Apple ID login sends your username, password and a 2-factor code using encrypted HTTPS requests directly to Apple servers.

4. Sending and receiving messages

Apple’s iMessage protocol works over Apple Push Notification service, which most developers would be familiar as the service that allows them to send push notifications to their iOS applications. For iMessage protocol, all messaging traffic flows over this service in both directions, encrypted with keys generated locally on each device. Beeper Mini connects to APNs over TCP, using the credentials generated during the login process.

A persistent connection to APNs is needed to be notified of new incoming messages in real-time. On an iPhone, an APNs connection is maintained by the operating system, and connected at all times. In Beeper Mini, the connection can only be maintained when the app is running, since Android does not support APNs natively.

To work around this limitation, we built Beeper Push Notification service (BPNs). BPNs connects to Apple’s servers on your behalf when Beeper Mini Android app isn’t running. We can do this while preserving user privacy thanks to Apple separating the credentials needed to connect to APNs to send and receive content (the “push” credentials) and the keys needed to encrypt and decrypt messages (the “identity” keys). Push credentials can be shared securely with the Beeper Push Notification service, and BPNs can connect to APNs on your behalf. Whenever BPNs receives an encrypted message that it won’t be able to decrypt, it simply disconnects from APNs and sends an FCM push notification to wake up the Android app, which then connects to APNs, downloads, decrypts and processes the incoming message. BPNs can only tell when a new message is waiting for you – it does not have credentials to see or do anything else.

BPNs will be notified when you receive a message, but without the encryption keys it can’t decrypt anything BPNs receives. Also, without the identity credentials, BPNs can’t send messages on your behalf. If you don’t mind not receiving real-time push notifications for new messages, your BPNs can be disabled entirely by going to Settings → Manage Connection → Enable Push.

When you create a new chat, the phone number or email address of your intended recipient is transmitted to Apple servers. If the contact is on iMessage, a public key is returned.

Sending messages is even simpler. When you hit send, the message is encrypted with the public keys of the intended recipients and sent directly to Apple servers via an SSL encrypted TCP connection over APNs.

5. Analytics and other services

Beeper Mini connects to a few other services as part of its operation. We use a self-hosted installation of Rudderstack (https://rudderstack.beeper-tools.com) for analytics and diagnostic events, which we use for improving the app but can be disabled in Settings → Preferences →Share Diagnostics. We use OneSignal to send education and account related push notifications, and RevenueCat to help integrate Google Play subscriptions.

Other than that, that’s it! No other servers or services are used. Beeper Mini keeps your messaging secure by keeping all messaging credentials, keys, messages and media local to your phone, and only sends them directly to Apple’s servers after encrypting them with iMessage’s end-to-end encryption algorithm.

We value, actually, we treasure feedback. If you run into a bug or have a feature request, there’s a button in-app to report a problem. We read every single report.


Brad Murray and Eric Migicovsky
Beeper cofounders

Appendix

To write this blog post, we performed a red team analysis on our own app. We made extensive use of the excellent mitmproxy project to capture the network traffic coming from a real phone running a modified version of the Beeper Mini client. A modified version was needed for this analysis in order to disable certificate pinning, so that the Beeper Mini Android app would accept being connected to mitmproxy instead of only accepting Apple’s certificates for that connection. If researchers would like a copy of this version of Beeper Mini (with cert pinning disabled) to perform a similar analysis, please contact us at security@beeper.com.

Below is a capture of the requests that we make with Apple’s servers over HTTPS when logging into iMessage with your phone number. We first register with a service named albert.apple.com, which sets up our “push” credentials and allows us to connect to APNS. We then make two requests to get the number we need to send an SMS to register our phone number which is different for each carrier (This capture was taken with a device registered with Rogers, a Canadian cell phone carrier 🇨🇦). Finally, we take the contents of the response SMS (not shown here) and send it to identity.ess.apple.com, registering our account with iMessage and generating the “identity” credentials we’ll use to send and receive.

Optionally, you can also register your Apple ID with Beeper Mini as well, as shown in this capture. You first provide your username and password over encrypted HTTPS directly to Apple’s servers, followed by a second request to provide your 2FA code. We can then register for iMessage again, this time providing the certificates from both the earlier phone number registration and our new Apple ID registration. Registering these together in the same call links them together, allowing any other device that you’re logged in with your Apple ID to send and receive with both your Apple ID emails and your phone number.

Next, a capture of the keys shared with the Beeper Push Notification sevice (hostname imux.beeper.com). Note, the RSA private key in this request is your “push” credentials that allow you to connect to APNs, not your “identity” credentials that allow you to encrypt and decrypt iMesssages. Push credentials cannot be used to escalate permissions or access anything other than the presence of a new APNs push notification. Check out apns.py in pypush PoC to learn more about push credentials.

Sending and receiving is not shown here, as they are not done over HTTP but instead through an SSL encrypted TCP connection to APNs. The APNs servers are hosted at *-courier.push.apple.com , where the asterisk is replaced by a number between 1 and 30. All message contents and media are encrypted with your “identity” keys, which never leave your Android phone.

There is a /login endpoint on Beeper servers, but as mentioned previous, this is only for subscription management purposes. The client submits the token received from the Google login process to our servers, and the response contains their subscription status. No iMessage credentials are ever sent to Beeper servers.

Note: Beeper and Beeper Mini are entirely independent software products, with no relationship to, or endorsement by, Apple, Google, or any other supported chat networks.

iMessage, Apple, Mac and iPhone are trademarks of Apple, Inc.

Android is a trademark of Google, LLC.


Discover more from Beeper Blog

Subscribe to get the latest posts to your email.


42 responses to “How Beeper Mini Works”

  1. Shawn Tolidano Avatar
    Shawn Tolidano

    Where do you get the phone number from? How does this work if you SIM jack? You can then intercept iMessage, yes? Will Apple allow multiple registrations and notify multiple devices for the same number? What about a number that goes back into the pool? Or can you use Twilio to claim an SMS number and register it for iMessage then release it back to the pool? Now you can get iMessage for lots of Twilio numbers (which, if I’m a business, and my customers text me from their iPhones, won’t that black hole them)?

    Like

    1. Caleb Avatar
      Caleb

      I can answer a couple of these since I’ve been using the open source repo this is based on for some time, but I don’t know anything about how it’ll work with twilio or sim jacking. For regular numbers though, Every number associated with imessage has a timeout, a certain amount of time that it’ll tell other iphones to text via imessage instead of sms, and the app will periodically be pinging apple to extend that timeout. The extensions start small, only 30 minutes at a time, but the longer you use imessage and the more apple trusts the number the longer those extensions will be, up to over a month. So the longer you use beeper mini for with a certain number, the longer a number will be “black holed” after it’s released, but you can go to apple’s website and request a number be released at any time. As for multiple devices with the same number, Apple should allow it so long as you sign in to an Apple ID, but I’m not sure how beeper mini will handle it. At the very least, you should be able to use beeper mini to register the number on one device, then use beeper cloud to send and receive with an unlimited number of devices

      Like

      1. Lee HammMX Avatar
        Lee HammMX

        “At the very least, you should be able to use beeper mini to register the number on one device, then use beeper cloud to send and receive with an unlimited number of devices…”

        You’d think. Many on Reddit are saying this is not working. How is the number ‘registration’ done? I am outside the US and Beeper Mini number registration does not work for me, even though Beeper Cloud works just fine.

        Like

      2. Stoffel Avatar
        Stoffel

        same problem – I am in the UK

        Like

  2. Nathan Lison Avatar
    Nathan Lison

    So far during my testing everything is working great. It would be nice to be able to import old iMessages from iCloud. Other than that, great job!

    Like

  3. Caleb Avatar
    Caleb

    Nice job, I’m impressed at how quickly you guys built this. I’ve been using pypush for sms-registration for some time, and it has worked beautifully, but it way too technical for the average person. Now I can share it with my friends that don’t have a CS degree lol

    Like

  4. Kyle Fellin Avatar
    Kyle Fellin

    So if you try it and decide you’re not super into it and delete the app will this cause issues with your number and receiving SMS like when switching to android in general? Or since there’s no apple id associated with it it may just fail on the ios end until they send as text message?

    Like

    1. blunden Avatar
      blunden

      It depends on whether they implement the deregistration functionality or not. If they don’t, Apple has a website where you can deregister/unregister yourself from iMessage.

      https://selfsolve.apple.com/deregister-imessage/

      Like

    2. Alex Avatar
      Alex

      yes, you will have to manually deregister your phone number on apple’s website.

      Like

  5. blunden Avatar
    blunden

    Could we get some clarification on this part?:

    “The public key is sent to Apple servers, and the private keys are stored in the Android device local filesystem.”

    Do you simply store it on the filesystem or do you use the hardware-backed keystore (or encrypt it using a key from there)?

    While simply storing them on /data/data/[package name] would encrypt it, it would still be readable to any app with root access (and potentially anyone with physical access to the device if you didn’t exclude the file from backups). Using the keystore would keep it safe, even on rooted phones. 🙂

    Like

  6. Raja Banerjee Avatar
    Raja Banerjee

    Quick question. If the messages are end to end encrypted how does Apple deliver duplicates to other devices signed in with the same Apple ID? Say a Ipad and an IPhone are both using the same Apple ID. How do they get the iMessages ?

    Like

  7. Skeetzo Avatar
    Skeetzo

    My primary # is Google Voice, it’s different from my eSIM MDN. I’d like that to be used with Beeper. Is that possible?

    Like

    1. Niraj Sanghvi Avatar
      Niraj Sanghvi

      Eric answered this in the Reddit AMA. Sadly it’s not possible.

      “We looked into supporting Google Voice but unfortunately you can’t use GVoice to send messages to the shortcodes that Apple SMS registration servers use.”

      Comment
      byu/erOhead from discussion
      inbeeper

      Like

      1. Skeetzo Avatar
        Skeetzo

        Oh word. May honestly port to my carrier, enroll, then port back 😂😂😂

        Like

      2. Bryan Avatar
        Bryan

        why would you port it back out to google voice after porting it to your carrier?

        Like

      3. Skeetzo Avatar
        Skeetzo

        Because I want to 😂

        Like

      4. Bryan Avatar
        Bryan

        well that is super helpful

        Like

      5. Adam Miller Avatar
        Adam Miller

        One practical reason is Google Voice isn’t susceptible to SIM jacking if you enable Google Advanced Protection on your Google Account.

        Like

      6. Skeetzo Avatar
        Skeetzo

        The actual reason is to continue using my number in a carrier agnostic way. VOIP calls over GV, without the crippled messaging. Voice isn’t a carrier so I don’t believe they’ll ever get RCS. As it stands, the RCS Universal Profile still needs something from the carrier I believe. Honestly, if Voice did support RCS, I wouldn’t use Beeper. It’s great but not needed once Apple supports RCS.

        Like

      7. Anthony Ciuffini Avatar
        Anthony Ciuffini

        Damm this is what I was looking for. I’m still gonna test it. Got to use those Google opinion award credits on something. Would have been better if I could get my GV number in here instead.

        Like

  8. Robert Donnelly Avatar
    Robert Donnelly

    Have you tried seeing if Beeper will work with a Google Voice number?

    Like

  9. Chris Avatar
    Chris

    How resistant is this to Apple patching iMessage and breaking Beeper Mini?

    Like

    1. Lindon Slaght Avatar
      Lindon Slaght

      As far as I’m concerned, very. If apple changes the API so beeper no longer works, they’ll either have to A. Make iMessage unusable on every phone running an iOS version below the one where they patched it. B. Update every iPhone currently able to use iMessage to work with the new protocol. Even then there’s no gurantee that they wouldn’t just reverse engineer it again, and it would probably be easier the second time. They could do something like verifying serial number of an apple device, but then it wouldn’t be anonymous.

      Like

    2. blunden Avatar
      blunden

      I’d say it probably depends on whether Beeper Mini generates “valid” validation data (including a proper serial number, etc.). If they do, the rest should basically be identical to a real phone unless they can fingerprint any small differences in the requests (ordering of headers, etc.).

      Like

  10. Joseph Avatar
    Joseph

    I tried it then uninstalled now I’m not receiving texts from Apple users

    Like

    1. Ken Norian Avatar
      Ken Norian

      I uninstalled it. Just tried to reply to a txt to an Apple user and some stranger said, this obviously wasn’t meant for me…?

      Like

    2. Joe Avatar
      Joe

      There is an option in the settings to unlink your number. There is also a webpage directly on the Apple website to unlink your number from iMsssage.

      Like

      1. Pete Grosserhode Avatar
        Pete Grosserhode

        I missed that option or couldn’t find it.
        Also cannot find the Apple website to unlink, only instructions for iPhones.
        Could you post that link?

        Like

  11. Philip king Avatar
    Philip king

    It just doesn’t work with any UK SIM I’ve tried. You can log in with your Google account, subscribe but when it comes to phone registration- every time I get Something Went Wrong. (Tried Vodafone, O2, Lebara)

    Like

    1. Stoffel Avatar
      Stoffel

      yeh I am having the same problem – got my icloud account registered but not my UK mobile # / sim

      Like

    2. Benaka Avatar
      Benaka

      Same here, exactly

      Like

  12. Luke Avatar
    Luke

    Will Beeper mini store my SMS? So if I switch to a new android phone will my messages carry over?

    Like

  13. Ken Norian Avatar
    Ken Norian

    If I stop using Beeper Mini, I’m assuming my conversations will be lost? Or is there either a way to archive them or move them back to my Google Messages?

    Like

  14. Freddy Juarez Avatar
    Freddy Juarez

    Long pressing on a message to get the emojis doesn’t work it makes the app close, also now that my number is iMessage registered and going through beeper mini does that mean if i have been blocked by someone they can receive my messages again? If the answer is no can you explain why they still wouldn’t be able to receive my messages also what if I change the option start chat to use my email

    Like

  15. Logan Avatar
    Logan

    Need it to work for Google Voice numbers now… Or umm how about even GOOGLE themselves integrating Google Voice and Google stock Messages app with RCS and everything else GV is missing already!

    Like

  16. Rob Grady Avatar
    Rob Grady

    Can beeper work as a unified messaging inbox, e.g. include regular SMS/MMS/RCS messages, as well as Facebook Messenger and WhatsApp?

    Like

    1. M. Hunt Avatar
      M. Hunt

      This is my question. I’m given to understand that integration of these protocols is on their roadmap. Maybe I’ll give it another try when they do, though I personally don’t think $3/mo is good value (ymmv of course).

      Like

  17. Luke Avatar
    Luke

    Would be cool to see the ability to name Group chats in the future, but loving it so far, works like a charm!

    Like

  18. Bill Bonanno Avatar
    Bill Bonanno

    I applaud the new direction not to use cloud servers as it’s much more scalable, but this road map is a slap in the face to the beta testers of Beeper who were told there would be a free version alongside Beeper plus. Now were essentially being told the app we tested for you will be depreciated and we’re being forced to pay a monthly subscription?

    Love the app, but I’m not shelling out a monthly subscription for Beeper. I’m a long believer of owning the things I use and since you guys don’t offer lifetime subscriptions (which I wouldn’t even mind shelling out $30-50 for), now seems like a perfect jumping off point for the people who won’t pay monthly subs.

    Like

  19. Gene Takovic Avatar
    Gene Takovic

    Will there be a version of this app, maybe a pay once instead of a subscription, where you are able to set up your own server to be able to be notified when you receive a message?

    Like

  20. Fuck_Apple Avatar
    Fuck_Apple

    You guys fucked yourselves up writing this article, Apple read it and now the party’s over. Should’ve just kept the specifics under wraps.

    Like

  21. J Green Avatar
    J Green

    How do I use my phone number to send messages instead of my email address?

    Like

Leave a comment