KEY TAKEWAYSSecure messaging solutions equip developers with the modern tools they need to ensure data protection across any number of users and devices.
Mobile messaging, like SMS text messaging platforms and other messaging applications, that give users the ability to quickly and easily communicate with one another are hugely popular due to their convenience and real-time capabilities. However, in today’s virtual world, the need for secure communication across these different messaging platforms is more important than ever.
For instance, have you ever sent a personal or confidential text message to a friend? Perhaps you sent the lockbox code to your house in a group chat on your iOS or Android device, or an SMS text message with information regarding your finances. Standard SMS messages are generally not considered a form of secure texting, because they are not encrypted. This means that the contents of the text message can be easily intercepted and viewed.
If you’re in the healthcare industry and using HIPAA-compliant messaging to share protected health information (PHI) such as lab results with your care team through secure text messaging, or if your use case involves a real-time group chat during a virtual event, it’s vital that your messaging app ensures secure communication and secure messaging across all devices.
Secure messaging, which is also referred to as message encryption, provides end-to-end security for every message in transit and at rest to guarantee the highest level of message security. It essentially protects your data and the contents of your message from being viewed by other parties or hacked.
In this guide, we will walk you through:
How secure messaging (end-to-end encryption) works.
The key features to look for in a secure messaging solution.
How PubNub’s robust data security controls and functions can ensure secure messaging in your app.
By the end of this guide, you’ll understand how secure messaging solutions equip developers with the modern tools they need to ensure data protection across any number of users and devices.
How does secure messaging work?
Different from regular text messaging, secure messaging solutions, or encrypted messaging, include comprehensive security protocols that protect user data so that only certain users with access can read. A standard protocol used to encrypt information between web applications and servers is Transport Layer Security (TLS), which is an updated version of Secure Sockets Layer (SSL) used for secure communication and establishing authenticated and encrypted data across the internet. It is commonly used to encrypt communications in email, instant messaging, and other messaging applications.
In most cases, SSL is no longer offered, as protocols with more security such as TLS have been updated to support modern messaging platforms, including the network that we provide to users at PubNub, which allows customers to encrypt data using TLS for point-to-point encryption and AES-256 for payload encryption. When TLS is enabled, your data is encrypted as it travels over the internet to the intended recipient, and throughout this action it is also decrypted, processed, and re-encrypted as it passes through the PubNub network and back out again.
Additionally, it is important to understand asymmetric encryption and symmetric encryption. Asymmetric encryption is when a recipient's public key is used alongside a private key that matches it. A user can share information that is encrypted with the public key, then it is exchanged and decrypted by the receiver by using their matching private key to start transmitting data. Symmetric encryption is similar to asymmetric encryption, as it also requires two keys. However, with this both the sender and receiver can encrypt and decrypt the message.
Another mechanism that lets you encrypt and decrypt data with PubNub is a cipher key, which is when data is encrypted between two end-points and sent to and through PubNub. A cipher key and TLS are independent from each other, however they can be used either separately or together. Essentially, the data is encrypted from one device, then goes through PubNub’s network and to the receiving device.
For instance, the cypher key can be sent to a client’s mobile device or browser during the login process. The cypher then converts the content of the message into a random assortment of symbols that is unreadable to anyone who does not have access to the key used to decrypt the message. It is also important to understand that PubNub does not have access to the cipher key, only the application owner does.
Apart from the data security mentioned above, the PubNub Access Manager (PAM) allows you to enforce secure controls for client access to resources within the PubNub Network. Once PAM is enabled, an authorization token is required before any action can be taken to prevent unauthorized access to publish/subscribe keys. This adds additional security permissions, allowing you to authorize users to read/write messages on channels, and grant or revoke permissions at the user, device, channel, or key level. PAM is vital for dating and social apps where real-time interaction is taking place. If an issue occurs where a user is displaying inappropriate behavior, you can change the user permissions to guarantee that the users in your chat are protected. The PubNub Access Manager safeguards your messaging app against unauthorized parties, creating a safe and secure user experience.
Protecting user data with HIPAA-compliant messaging
Message-level encryption is required when data is highly sensitive, or when there are compliance requirements like HIPAA regulations. HIPAA-compliance is required to ensure that patient data and healthcare information is always protected. It allows for compliant text messaging between patients, doctors, and healthcare providers to be shared securely and quickly on a mobile app or communication platform. Whenever protected health information (PHI) is sent, HIPAA-compliance is required.
HIPAA identifiers of PHI include name, address, lab results, medical records, or any of these additional 18 identifiers. For example, when a patient shares healthcare information with a clinician or a healthcare provider, HIPAA-compliant chat prevents unauthorized third-parties from accessing this confidential information. HIPAA-compliant messaging provides a faster and more accessible way to virtually share PHI for improved patient care.
Fundamentally, it is critical that modern messaging platforms implement secure messaging solutions in order to prevent security and compliance issues, which not only affects your company, but the overall user experience.
Key features to look for in a secure messaging solution
When determining which features are important to your messaging application, there are a few questions to ask yourself.
Does the solution secure and protect user information across the devices in which your product is offered?
Are you meeting compliance requirements?
Can the solution integrate with your existing tech stack?
Below, we’ll explore the key features to look for in a secure messaging solution.
End-to-end encryption: A fast and secure way to share information is through end-to-end encryption. With this, only the people authorized can read the message and encrypted file sharing. This prevents data from being intercepted and ensures that only the sender and the recipient can read the data. If an app does not provide a way to encrypt data, a message or file can be viewed as it is not private.
Support across multiple devices: Offering cross-platform message security provides a significant benefit on the backend. Take a real-time group chat during a virtual concert for example. Users choose their preferred mobile messaging device like an iPhone or Android to communicate during the virtual event, which can lead to unauthorized user access if certain safeguards aren’t in place across all devices. Giving developers the ability to encrypt data on one device (an iPhone), and decrypt data on another (an Android), ensures data protection from all angles.
Access controls: Access controls provide a way to manage permissions throughout the PubNub data stream network, so that the sharing of personal data and information is limited. This can be done by implementing two-factor authentication, making a channel public, or giving read/write permissions in a chat.
Scalability: Scalability goes hand-in-hand with providing a reliable and secure platform for your users. A messaging solution that can handle user fluctuations as traffic increases or decreases to any number of devices is an extremely valuable feature. When building a product, it’s important to factor in scalability so your platform is equipped to handle growth.
With PubNub’s secure publish/subscribe messaging APIs on the PubNub data stream network and enterprise-grade security and compliance, our solution ensures that your data is fully secure so that you can focus on delivering your core product offering instead of maintaining backend infrastructure.
How does PubNub ensure security on your messaging app?
PubNub gives you the ability to send and receive data to any number of users and devices simultaneously, using end-to-end encryption for every message running over the network.
We operate securely using TLS and AES256 encryption algorithms, plus we support HIPAA, GDPR, SOC2 type 2, and CCPA compliance. Our AES encryption is optimized for cross-platform use, giving developers the building blocks to encrypt on one device—like an iPhone—and decrypt on a different device—an Android. And because of our global points of presence, you can quickly and reliably deliver messages without latency issues.
Let’s dive in further to PubNub’s compliant, secure, and scalable infrastructure.
PubNub Access Manager (PAM)
As we mentioned above, PubNub Access Manager (PAM) gives you full control over allocating client access to resources within the PubNub network. Through real-time tokens, you grant and revoke access to channels instantly throughout the PubNub data stream network. When PAM is enabled, your server, PubNub, and client devices are all involved in the authorization workflows.
First, the client requests authorization from the server during the login process. Based on the authentication key from the client, the server then issues a PAM grant to allow privileges once approved. Once the client uses the PubNub credentials with that authentication key, it is then passed to PubNub to perform API operations.
PAM can be used alongside Presence and other PubNub APIs, giving developers the ability to create and enforce security controls as they see fit. This feature is also compatible with existing authentication systems like OAuth, Google, and Facebook authentication, and custom solutions.
PubNub Functions enable developers to execute their own code every time a PubNub message is sent, capturing events that are happening on PubNub’s communication platform. Functions are used to augment, transform, route, filter, or aggregate data between the sender and receiver.
Below, are a few examples of what you can do with PubNub Functions:
Translation: Augment messages in flight, like translating a chat message from one language to another.
Reroute messages: Redirect messages to a third-party service or different channels.
Trigger alerts: Send alerts like emails and text messages with third-party APIs triggered by messages and user actions.
There are various event types when using Functions, some of which are: Before Publish or Fire, After Publish or Fire, After Presence, and On Request. The event type you should choose is dependent upon your use case.
PubNub is fully HIPAA-compliant! Our platform provides HIPAA-compliant, real-time messaging infrastructure that helps streamline telehealth communication and reduce time to market, so you can focus on building your core functionality and not backend infrastructure. You can safely power your chat with end-to-end message encryption, secure login authorization, and user permissions with our full set of security features to protect sensitive health information.
Ultimately, the most important benefit of implementing secure messaging solutions is that they keep all your data from being compromised via message encryption and security protocols, like Transport Layer Security (TLS) and permission management that protects user data from unauthorized access.
Alongside these standard security features, PubNub’s developer platform makes it easy to power chat, notifications, real-time updates, geolocation, and IoT device control, with built-in reliability and scalability. Our fully secure and compliant infrastructure allows you to reduce your time to market and truly focus on delivering your core product offering without the worry of meeting compliance regulations.
If you’re ready to implement secure messaging, you can explore these resources to help you get started:
Looking to chat with one of our experts? Contact our sales team here.