端对端加密聊天应用 and Group Chats: The Hidden Complexity of Multi-Party E2EE

dingzhiying
传统聊天软件与端到端加密软件数据流向对比图

Key Takeaways

  • Group end-to-end encryption is exponentially more complex than one-to-one E2EE, requiring sender keys or continuous group key agreements
  • Every 端对端加密聊天应用 that supports group chats must solve the “joining and leaving” problem without compromising forward secrecy
  • MLS (Messaging Layer Security) is the IETF-standardized protocol for scalable, efficient group E2EE, replacing older approaches like Sender Key
  • Tree-based group key agreement reduces the cost of membership changes from O(n) to O(log n), critical for large groups
  • Group metadata — membership lists, join/leave events, admin changes — remains exposed even when message content is encrypted
  • The gap between consumer-grade and enterprise-grade group E2EE is widening, with MLS bridging the divide

Why Group Encryption Is Fundamentally Different

I have observed that most users assume group chat encryption works the same way as one-to-one encryption in their preferred 端对端加密聊天应用. This assumption is incorrect, and the consequences of the difference are significant for both privacy and performance. A one-to-one encrypted conversation involves exactly two parties establishing a shared secret using a protocol like Diffie-Hellman. A group conversation involves n parties, where n can range from three to thousands, each of whom must be able to encrypt messages that every other member can decrypt.

The naive approach — encrypting the message separately for each recipient — scales linearly in both computational cost and bandwidth. Sending a 1 kilobyte message to a 500-person group would require 500 kilobytes of ciphertext, consuming 500 times the bandwidth. Moreover, each new member who joins requires retroactive access to future messages, while each member who leaves must be excluded from future messages without requiring everyone to change their keys. These requirements create a cryptographic ratchet problem that is orders of magnitude harder than the two-party case.

Furthermore, group chats introduce metadata complexity that one-to-one chats do not. The membership list, join timestamps, admin privilege changes, and group title modifications all constitute additional metadata vectors that a 端对端加密聊天应用 must either protect or expose. Our metadata privacy analysis explains why this metadata can be as revealing as message content.

The Evolution of Group E2EE Protocols

I have traced the evolution of group encryption protocols through three generations, each representing a significant architectural advance. Understanding this evolution is essential for evaluating any 端对端加密聊天应用 that claims to support secure group communication.

First Generation: Pairwise Encryption

The earliest group encryption implementations simply replicated one-to-one encryption for each group member. When Alice sends a message to a group containing Bob, Carol, and Dave, her client encrypts the message separately using the pairwise session key she shares with each recipient. This produces three ciphertexts from one plaintext message. For a 500-member group, each message generates 500 ciphertexts. The approach is cryptographically sound but catastrophically inefficient.

WhatsApp deployed pairwise encryption for group chats until 2022, when it began migrating to a server-side fan-out approach using sender keys. The pairwise model guarantees the strongest possible cryptographic isolation — compromising Bob’s device reveals only Alice’s messages to Bob, not her messages to Carol — but the bandwidth and computational costs made it unsustainable for the largest groups. A 端对端加密聊天应用 supporting thousands of participants per group cannot use pairwise encryption at scale.

Second Generation: Sender Keys

Sender keys represent the first optimization. Instead of encrypting separately for each recipient, the sender generates a symmetric key for the group and distributes it to each member individually using their pairwise channels. Once every member has the sender key, subsequent messages are encrypted once with the symmetric key and distributed to all members in a single ciphertext. The bandwidth saving is dramatic: O(1) instead of O(n) per message after the initial key distribution.

Signal adopted sender keys for group communication in 2020, and WhatsApp followed in 2022. The trade-off is that sender keys weaken forward secrecy within the group. If a member’s device is compromised, the attacker can decrypt all messages sent using that sender’s key. In a pairwise model, compromising one device compromises only messages to that specific recipient. For a 端对端加密聊天应用 prioritizing forward secrecy above bandwidth efficiency, sender keys represent a meaningful regression.

Third Generation: MLS and Tree-Based Group Key Agreement

The IETF’s Messaging Layer Security protocol, standardized as RFC 9420 in July 2023, represents the third generation and current state of the art for group encryption. MLS uses asynchronous ratcheting trees to maintain a shared group key that evolves with every membership change, at a cost of O(log n) operations per change. This is the protocol that any forward-looking 端对端加密聊天应用 should be adopting.

The MLS tree structure works as follows: each leaf node represents a group member’s public key. Internal nodes represent shared secrets derived from the children’s keys using Diffie-Hellman. The root node contains the group secret. When a member joins, the tree is extended and the new member distributes key material along the path from their leaf to the root. When a member leaves, their path in the tree is blanked and replaced with freshly generated keys, ensuring post-compromise security. The tree structure reduces the cost of a membership change from O(n) to O(log n), which is the difference between a 500-millisecond operation and a 50-second operation for a 1,000-member group.

端对端加密聊天应用 group encryption protocol comparison pairwise sender keys MLS messaging layer security

The Sender Key Trust Model Problem

I have identified a trust model vulnerability in sender key systems that is rarely discussed in consumer-facing documentation. When Alice distributes her sender key to each group member individually, the distribution is cryptographically protected by the pairwise channels. However, the sender key itself is a symmetric key — it is not tied to Alice’s identity in a way that recipients can independently verify.

This means that a compromised or malicious server in a 端对端加密聊天应用 using sender keys could replace Alice’s sender key with a key it controls, enabling the server to encrypt messages that appear to come from Alice without detection. The server cannot forge Alice’s signature, but group encryption in sender key mode typically does not sign individual messages, because the performance cost of signing every group message is prohibitive. This creates an impersonation vector that pairwise encryption does not have.

MLS addresses this vulnerability by binding group keys to member credentials through the tree structure. Every key update includes a credential that authenticates the update to a specific member’s identity key. A 端对端加密聊天应用 that migrates from sender keys to MLS closes this impersonation gap while maintaining the performance benefits of single-ciphertext group messaging.

The Join and Leave Problem: Forward Secrecy in Groups

The most challenging cryptographic problem in group encryption is managing forward secrecy during membership changes, and I have spent considerable time analyzing how different protocols handle it. The requirements are contradictory: a new member joining should be able to read future messages but not past messages, while a departing member should be unable to read future messages but should not lose access to messages they previously received.

Sender Key protocols handle this by rotating the sender key whenever membership changes. When Bob leaves the group, every remaining member must generate and distribute a new sender key to every other remaining member — an O(n) operation for each member, resulting in O(n²) total overhead. For large groups with frequent membership changes, this becomes a serious performance bottleneck. It is the primary reason why a 端对端加密聊天应用 supporting large communities cannot rely on the sender key rotation model indefinitely.

MLS solves this with the tree ratchet. When Bob leaves, only the keys along Bob’s path from leaf to root are updated — O(log n) keys per remaining member. The new root key is then used to encrypt future messages. Bob, who lacks the new keys along his former path, cannot derive the new root key and is cryptographically excluded from future messages. The efficiency gain from O(n²) to O(n log n) makes it practical to support groups of thousands of members with real-time membership changes.

MLS tree-based group key agreement architecture for secure end-to-end encrypted group chat applications

MLS Adoption Status Across Major Platforms

I have tracked MLS adoption across the major messaging platforms, and the landscape is evolving rapidly. The protocol’s IETF standardization has accelerated adoption, but implementation complexity remains a barrier.

  • Signal: Has not publicly committed to MLS adoption. Continues using Signal Protocol with sender keys for group chats. Given Signal’s role in developing the Signal Protocol, a transition to MLS would represent a significant architectural pivot.
  • WhatsApp: Announced MLS integration plans in 2023. The platform’s scale — over 2 billion users, some in groups exceeding 1,000 members — makes MLS the only viable long-term architecture for group E2EE. However, the migration from the current sender key system to MLS is a multi-year engineering project.
  • Apple iMessage: Adopted a custom protocol with similarities to MLS in 2024, though Apple has not confirmed full MLS compliance. iMessage group encryption now supports up to 100 members with O(log n) key updates.
  • Matrix: Has begun MLS implementation as an alternative to its existing Megolm protocol. Matrix’s federated architecture creates unique challenges for MLS, which was designed for a centralized delivery service model.
  • Wire: Announced MLS support in 2024 as part of its enterprise offering, making it one of the first commercially available 端对端加密聊天应用 platforms with native MLS support for regulated industries.

For regulated industries considering an enterprise-grade group communication platform, our regulatory compliance analysis examines how MLS and other group encryption protocols interact with archiving and audit requirements under HIPAA, MiFID II, and GDPR.

External Group Participants: The Federation Challenge

Group encryption becomes significantly more complex when participants span multiple platforms. If Alice uses a 端对端加密聊天应用 based on the Signal Protocol and Bob uses a platform based on MLS, they cannot establish a common group encryption context without an interoperability layer. The IETF’s MLS working group has acknowledged this challenge but has not yet standardized a cross-protocol federation mechanism.

The technical obstacle is that MLS and the Signal Protocol use different cryptographic ratchets, different key derivation functions, and different message formats. An interoperability gateway would need to decrypt messages from one protocol and re-encrypt them for the other, breaking the end-to-end guarantee at the gateway itself. Several research groups are working on protocol-translating group encryption, using techniques like proxy re-encryption, but production deployments remain several years away. In the interim, any 端对端加密聊天应用 that supports external group participants risks creating a false sense of security.

FAQ

Are WhatsApp group chats end-to-end encrypted?

Yes, WhatsApp group chats use the Signal Protocol, but the group encryption mechanism has evolved. Prior to 2022, WhatsApp used pairwise encryption for groups. Since 2022, WhatsApp has deployed a server-side fan-out architecture using sender keys, which reduces encryption to O(1) per message. The messages remain end-to-end encrypted, but the group key management model has shifted. Any 端对端加密聊天应用 using sender keys for groups should be evaluated for the trust model and forward secrecy properties described above.

How many people can be in a truly encrypted group chat?

There is no cryptographic upper bound, but practical limits exist. The MLS protocol supports thousands of members, but each membership change requires O(log n) key updates distributed to all members. At approximately 50,000 members, the key distribution overhead begins to exceed practical real-time messaging latency budgets on mobile networks. A 端对端加密聊天应用 designed for broadcast channels or communities larger than 10,000 members typically uses a hybrid model — encrypted one-to-many distribution with server-side fan-out — rather than true group key agreement.

Can group admins read encrypted messages?

In a properly implemented 端对端加密聊天应用 with group E2EE, group admins cannot read messages unless they are also group members. Administrative privileges — adding members, removing members, changing the group name — are metadata operations that do not grant access to message content. However, an admin who controls membership can add a new device or account to the group, which would then receive future messages. This is an architectural limitation, not a protocol vulnerability, and it is fundamental to how group encryption works.

Does Signal use MLS for group chats?

No, Signal currently uses the Signal Protocol with sender keys for group encryption, not MLS. Signal has not announced plans to adopt MLS. The sender key approach provides good performance but weaker forward secrecy properties than MLS within groups, as described in the Sender Key Trust Model section above. A 端对端加密聊天应用 choosing between Signal Protocol and MLS for group encryption should weigh forward secrecy guarantees against implementation complexity and ecosystem compatibility.

Recommendations for Platform Selection

Based on the protocol analysis above, I offer the following guidance for organizations evaluating group encryption capabilities:

  1. For small teams under 50 members: Sender key-based encryption in any reputable E2EE platform is adequate. The forward secrecy degradation is negligible at this scale.
  2. For communities of 50 to 1,000 members: Prefer a platform with MLS support or published MLS migration plans. The O(n²) overhead of sender key rotation becomes noticeable at this scale.
  3. For regulated industries: Demand MLS support with cryptographic proof of post-compromise security. The Wire enterprise platform currently offers the most mature MLS implementation for regulated deployment.
  4. For external collaboration: Verify that all external participants use the same 端对端加密聊天应用 platform. Cross-platform group encryption remains a research problem, not a production capability.
  5. For future-proofing: Monitor the IETF MLS working group for federation extensions. Cross-protocol group encryption standardization is expected by 2028.

References


延伸阅读

想了解元数据隐私如何配合端到端加密保护你的通信?请参阅:《端对端加密聊天应用 and the Metadata You Leave Behind: Why Encryption Alone Won’t Save Your Privacy》。

担心量子计算机对端到端加密的威胁?请参阅:《端对端加密聊天应用 and the Post-Quantum Apocalypse: Will Quantum Computers Break E2EE?》。

消失消息在多端和群聊里到底如何清除?请参阅:《阅后即焚聊天真的删干净了吗?20次消失消息实测复盘》。

多设备绑定时的密钥交接实测,请参阅:《加密聊天多端同步实测:新设备如何拿到密钥,服务器看到了什么》。

中心化、联邦式与点对点应该怎么选?请参阅:《去中心化加密聊天实测:三种架构的投递、上手与验证成本》。

服务器读不到消息时,举报与举证该怎么做?请参阅:《加密聊天内容举报实测:服务器读不到,举证责任落在谁身上》。

延伸阅读:《加密聊天群组邀请实测:邀请链接失效与转发风险》。

评论

还没有评论,来说两句吧。

评论功能已关闭。