By Bonaventure Ogeto · Published · Last verified:
How Encryption Protects Your M-Pesa, Bank App and WhatsApp Messages
The short answer
Encryption scrambles data so only the intended app or person can read it. Banking and payment apps talk to their servers over encrypted HTTPS connections, WhatsApp encrypts chats end to end with the Signal Protocol, and Kenya’s Data Protection Act 2019 names encryption as a safeguard. No published attack breaks this protection today, though quantum-safe upgrades have begun.
Source: Mctaba Labs, “How Encryption Protects Your M-Pesa, Bank App and WhatsApp Messages”, last verified 4 December 2026, mctaba.com/learn/cryptography/how-encryption-protects-you-in-kenya
What does encryption do when you use your phone?
Encryption turns readable information into scrambled code that only someone with the right key can turn back. Kenya's Data Protection Act 2019 defines it as “the process of converting the content of any readable data using technical means into coded form”[1].
When you send money, log in to your bank or message a friend, the cryptography in the connection does three jobs:
- It keeps the data secret. Anyone who intercepts it on the way, on public Wi-Fi or inside a network, sees gibberish.
- It proves who is on the other end. Your app checks that it is really talking to your bank, not an impostor.
- It reveals tampering. If anyone changes the data in transit, the change is detected and the data rejected.
Think of the difference between a postcard and a sealed, signed envelope. Without encryption, your data travels like a postcard that anyone handling it can read. The tools behind all three jobs are explained in symmetric vs asymmetric encryption, hashing and digital signatures.
How is an M-Pesa payment protected?
Start with what can be checked. Safaricom documents Daraja, the API businesses use to connect their systems to M-Pesa. The details below come from Safaricom's Daraja documentation as archived in December 2019[2]; the current portal may differ in detail.
Two protections stand out:
- Calls travel over HTTPS. A business first gets a temporary access token from an HTTPS address using its consumer key and secret, under the OAuth 2.0 standard. The token expires after 3,600 seconds[2], one hour, and each later request carries it. HTTPS means the whole exchange runs inside an encrypted connection.
- The most sensitive secret gets its own layer of encryption. For some calls the business must send a SecurityCredential: its initiator password, encrypted with RSA using the M-Pesa public key from an X.509 certificate[2] and then base64-encoded. RSA is a public-key method: anyone can lock data with the published key, but only the holder of the matching private key can open it. X.509 is the standard format for the certificate that carries such a key, and base64 writes the encrypted bytes as plain text. M-Pesa's core system decrypts the credential with its private key to authenticate the transaction. Even someone who got inside the HTTPS connection would see only the encrypted credential.
These documents cover how businesses talk to M-Pesa. They say nothing about how Safaricom protects its own internal systems, the M-Pesa app or USSD sessions, and this page does not guess.
Online checkouts use the same ideas. Paystack's documentation says the notifications it sends merchants about payments carry an HMAC SHA512[3] code computed with the merchant's secret key, so a forged or altered notification fails the check. Its newer header adds a timestamp, and Paystack tells merchants to reject events more than 300 seconds[3] off their server time, which stops old messages being replayed.
One caution for the future: RSA is among the algorithms NIST lists as no longer secure[4] against a large quantum computer. That machine does not exist today, but it is why payment systems will need upgrades.
How does your banking app keep your money safe?
Every banking app talks to its servers over TLS, the same encryption that puts the padlock in your browser. This page does not guess which exact algorithms any Kenyan bank uses, but every TLS connection does the same three things:
- It checks the bank's identity. The server presents a certificate, a digital ID signed by a trusted authority, and the app checks it before sending anything.
- It agrees fresh keys. App and server use public-key cryptography to agree a secret key for that session without ever sending the key itself.
- It encrypts everything else. Your PIN, balance and transfer details travel encrypted with a fast symmetric cipher such as AES, the US standard published as FIPS 197 in 2001[5].
TLS cannot protect you from everything. It guards data on the way; it cannot stop a fake app, a phishing link or a fraudster who talks you into sharing your PIN or a one-time code.
Apple's devices are starting to add quantum protection here. Apple says that from iOS 26[6] and the matching versions of its other systems, TLS connections automatically offer a hybrid quantum-secure key exchange. The server decides whether to use it, so the protection arrives only when banks and other services support it too.
What does the Central Bank of Kenya require?
The Central Bank of Kenya (CBK) regulates banks and payment service providers. Its Guidance Note on Cybersecurity of August 2017[7] applies to all licensed banks and asks them to notify the CBK within 24 hours[7] of any cybersecurity incident that could seriously affect their services, reputation or finances. A July 2019 guideline[8] required payment service providers to submit their cybersecurity policies by 31 December 2019[8].
The CBK's rule on encryption itself sits in its Risk Management Guidelines of January 2013[9], where section 7.9[9] says institutions should be able to use encryption to protect confidential information in their systems and in transmission, with encryption that meets international standards, adequate strength and proper management of keys and certificates. A draft update published for comment in September 2026[10] keeps that section.
Is WhatsApp end-to-end encrypted?
Yes. End-to-end encryption means a message is encrypted on your phone and decrypted only on the recipient's, so the company in the middle cannot read it. WhatsApp announced on 5 April 2016[11] that every call, message, photo, video, file and voice message, including group chats, is end-to-end encrypted by default. The same day, Open Whisper Systems, which designed the Signal Protocol, said its integration into WhatsApp was complete[12] across all clients.
WhatsApp's current encryption white paper, version 10 of 30 October 2026[13], says the Signal Protocol is the basis for this encryption and is designed to stop third parties, and WhatsApp itself, from reading messages or calls. Each phone holds a long-term identity key, a Curve25519 key pair, an elliptic-curve key generated when the app is installed. The messages themselves are protected with symmetric keys: the white paper says each message key includes an AES-256 key[13] to keep the message secret and an HMAC-SHA256 key[13] to reveal tampering.
One exception matters: the same white paper says WhatsApp does not consider chats with businesses using its Cloud API to be end-to-end encrypted[13], although they still use the same Signal Protocol encryption. And no encryption can protect a message once it sits on a phone someone else can open, or from a recipient who forwards it.
Are messaging apps already protecting against quantum computers?
Some are. The worry is what Signal calls harvest now, decrypt later: a sufficiently powerful quantum computer could compute a private key from a public key[14], so encrypted messages recorded today could be read in future.
- Signal announced PQXDH on 19 September 2023[14]. It combines the elliptic-curve exchange X25519 with the post-quantum algorithm CRYSTALS-Kyber, so an attacker must break both. On 2 October 2025[15] Signal announced SPQR, the Sparse Post Quantum Ratchet, which uses ML-KEM 768 and is mixed with its existing ratchet into what it calls a Triple Ratchet.
- Apple announced PQ3 for iMessage on 21 February 2024[16], rolling out with iOS 17.4[16] and matching updates. Each device registers a post-quantum Kyber-1024 key alongside a classical P-256 elliptic-curve key.
- WhatsApp's version 10[13] white paper describes the Signal Protocol with Curve25519 keys and does not describe a post-quantum layer.
The wider web is moving too: Cloudflare said in April 2026[17] that over 65% of human traffic[17] to its network was post-quantum encrypted.
What does Kenyan law say about encryption and data breaches?
The Data Protection Act 2019 came into force on 25 November 2019[1], and the Office of the Data Protection Commissioner (ODPC), established in November 2020[18], is the designated government agency[19] for ensuring personal data is handled properly. Three parts of the Act matter here:
- Section 41[1], data protection by design. Every organisation handling personal data must put appropriate technical and organisational safeguards in place. The Act lists the pseudonymisation and encryption of personal data[1] among the measures to consider, along with keeping safeguards updated as new risks appear.
- Section 42[1], the state of technology. When choosing those measures, especially for data sent over networks, an organisation must weigh the state of technological development available[1].
- Section 43[1], breaches. If personal data is accessed by someone unauthorised and there is a real risk of harm, the organisation must tell the Data Commissioner within 72 hours[1] of becoming aware of it, and a processor working for it must tell it within 48 hours[1] where reasonably practicable. Under section 43(6)[1], the organisation need not tell you, the data subject, if it had appropriate safeguards in place, which may include encryption of the affected data. The duty to notify the Commissioner still applies.
Encryption is therefore both a measure the law expects organisations to consider and a practical shield: a company whose stolen data was properly encrypted may be spared telling every customer. For how the Act applies in particular settings, see the guides on AI and the Data Protection Act and payment data storage under the Act.
What should you do to stay protected?
Encryption works in the background, but a few habits decide whether it can help you:
- Keep your apps and phone software updated. Encryption upgrades, including the post-quantum ones above, arrive through updates.
- Install banking and M-Pesa apps only from official app stores, and type web addresses yourself rather than following links in messages.
- Never share your PIN or a one-time code. Encryption protects data on the way; it cannot stop you handing a secret to a fraudster.
- Check the padlock, but do not trust it alone. It shows the connection is encrypted, not that the business behind it is honest.
For businesses the job is bigger. Data recorded today could be decrypted once large quantum computers exist, the threat explained in harvest now, decrypt later. No such machine exists yet[20], but NIST will deprecate quantum-vulnerable public-key cryptography after 2030[21], so the work has to start now. The post-quantum readiness checklist for Kenyan and African businesses sets out what to do first, what is post-quantum cryptography explains the new algorithms, and the cryptography series hub has the full story.
Frequently asked questions
- Is M-Pesa encrypted?
- The publicly documented parts are. Safaricom’s Daraja documentation, as archived in December 2019[2], shows businesses calling M-Pesa over HTTPS and encrypting their API credential with RSA. How Safaricom protects its internal systems is not described there, and no outsider should guess.
- Can WhatsApp read my messages?
- Not in end-to-end encrypted chats. WhatsApp’s white paper says its Signal Protocol encryption is designed to stop third parties and WhatsApp itself from reading messages or calls. The same paper says chats with businesses that use WhatsApp’s Cloud API are not considered end-to-end encrypted[13].
- Is WhatsApp safe from quantum computers?
- Its published design does not say so. WhatsApp’s version 10[13] white paper describes the Signal Protocol with Curve25519 elliptic-curve keys and does not describe a post-quantum layer, while Signal added one in September 2023[14]. No published attack breaks WhatsApp’s encryption today; the risk is messages recorded now and decrypted later.
- What happens if a company leaks my personal data in Kenya?
- Under section 43[1] of the Data Protection Act 2019, if there is a real risk of harm, the company must notify the Data Commissioner within 72 hours[1] of finding out. It may not have to tell you if the leaked data was protected by safeguards such as encryption. The ODPC, the government agency designated to oversee personal data, enforces these rules.
- Does the padlock in my browser mean a website is safe?
- It means your connection to that address is encrypted and the site holds a valid certificate for it. It does not mean the business is honest: fraudsters can get certificates too, so check the address and never enter a PIN or code on a page you reached from an unexpected link.
- Will quantum computers break M-Pesa or my bank app?
- Not today: no quantum computer capable of it exists yet[20]. In future, any system that relies on RSA or elliptic-curve keys, including the RSA-encrypted credential in Safaricom’s archived Daraja documentation, will need post-quantum upgrades, and NIST plans to deprecate those algorithms after 2030[21].
Sources
- [1] Republic of Kenya, Data Protection Act No. 24 of 2019 (Kenya Gazette Supplement No. 181), copy hosted by the Office of the Data Protection Commissioner, 11 November 2019, checked 4 December 2026
- [2] Safaricom Daraja developer portal (API Documentation), Internet Archive snapshot of 10 December 2019, 10 December 2019, checked 4 December 2026
- [3] Paystack (developer documentation), checked 4 December 2026
- [4] NIST, April 2016, checked 4 December 2026
- [5] NIST Computer Security Resource Center, 26 November 2001, checked 4 December 2026
- [6] Apple Support, 18 June 2026, checked 4 December 2026
- [7] Central Bank of Kenya, August 2017, checked 4 December 2026
- [8] Central Bank of Kenya, July 2019, checked 4 December 2026
- [9] Central Bank of Kenya, January 2013, checked 4 December 2026
- [10] Central Bank of Kenya, 10 September 2026, checked 4 December 2026
- [11] WhatsApp (blog), 5 April 2016, checked 4 December 2026
- [12] Signal (Open Whisper Systems) blog, 5 April 2016, checked 4 December 2026
- [13] WhatsApp (Meta), WhatsApp Encryption Overview technical white paper, 30 October 2026, checked 4 December 2026
- [14] Signal (blog), 19 September 2023, checked 4 December 2026
- [15] Signal (blog), 2 October 2025, checked 4 December 2026
- [16] Apple Security Research (Apple Security Engineering and Architecture), 21 February 2024, checked 4 December 2026
- [17] Cloudflare, 7 April 2026, checked 4 December 2026
- [18] Office of the Data Protection Commissioner (Kenya), Strategic Plan 2025-2029, 2025, checked 4 December 2026
- [19] Office of the Data Protection Commissioner (Kenya), checked 4 December 2026
- [20] NIST, 27 February 2026, checked 4 December 2026
- [21] NIST, October 2026, checked 4 December 2026
Related guides
- Symmetric vs Asymmetric Encryption, Hashing and Digital Signatures
- Harvest Now, Decrypt Later: Why Today's Data Is Already at Risk
- What Is Post-Quantum Cryptography? A Plain-English Explanation (2026)
- Post-Quantum Readiness for Kenyan and African Businesses: A Practical Checklist
- Cryptography explained: the full series
