端到端加密性能实测:延迟、流量与耗电到底增加多少

dingzhiying
端到端加密性能 test cover by 58聊天

We measured 端到端加密性能 on three devices with 500 messages each, against the same app running without encryption. The result is boring in the best way: the cost is real, small, and visible only on older hardware.

This test reports latency, data overhead and battery drain. Furthermore, it separates costs you can feel from costs that only a meter can detect, so you can decide whether encryption earns its place.

Key Takeaways

  • 端到端加密性能 added 18 ms to a message round trip in our test.
  • Each text message carried about 1.5 KB of extra key material and padding.
  • Battery drain rose 3.1% across an eight-hour active session.
  • A 1 MB photo took 240 ms to encrypt on a four-year-old phone.
  • Switching networks cost 0.9 seconds of reconnection time.
  • No message was lost across 1,500 sends, including 60 offline deliveries.

What 端到端加密性能 Actually Costs

Encryption adds work in three places: the handshake, each message, and each attachment. Therefore, the headline number depends on what you measure, and vendors rarely say which one they mean.

In practice, 端到端加密性能 overhead splits into a fixed part and a variable part. The fixed part is a few milliseconds per message, while the variable part scales with attachment size and device speed.

How We Measured 端到端加密性能

We used two phones and one desktop client, all on the same Wi-Fi network. Additionally, we ran a four-year-old phone as a slow baseline so the results would include realistic hardware.

Furthermore, we logged 500 messages per device, 60 of them while one side was offline. We also ran a reference path with encryption disabled, which gave us a clean baseline to subtract.

Where 端到端加密性能 Adds Milliseconds

A message round trip rose from a 120 ms baseline to 138 ms. Specifically, key derivation and padding accounted for most of that gap, and the ratchet step proved too small to isolate.

For comparison, mobile network jitter alone moves latency by far more than 18 ms. Consequently, nobody notices 端到端加密性能 in a normal conversation, even though the measurement repeats reliably.

Cold starts behaved differently. The first message after a fresh launch took 190 ms longer than the baseline, because 端到端加密性能 includes a one-time key setup on the first send. After that, the cost fell back to the 18 ms average we report.

端到端加密性能 latency and battery metrics

Battery: The Cost of 端到端加密性能

Battery is where the cost becomes tangible, and also where it stays modest. Across an eight-hour session of active chat, drain rose by 3.1 percentage points against the unencrypted baseline.

However, the pattern mattered more than the total. The extra drain concentrated in bursts of media, because encrypting photos and videos costs far more than encrypting text.

  • Text messages: measurable but negligible battery cost
  • Photos: a short CPU spike on every send
  • Video: the largest single contributor in our sessions
  • Idle time: almost no difference between the two builds

We also tracked idle drain overnight with the app in the background. The difference between the two builds stayed under 1 percentage point, which suggests 端到端加密性能 scales with activity rather than with presence.

Data Overhead You Never Notice

Every message carried about 1.5 KB of extra data, mostly key material and padding. Therefore, a 1,000-message month added roughly 1.5 MB, which is less than a single photo.

Attachments behaved differently. Compression and encryption fought each other, and the transferred size grew by about 1.5% once padding was included, a detail we also saw while testing encrypted file transfer.

Old Phones and 端到端加密性能

On slow hardware, the cost becomes visible. Encrypting a 1 MB photo took 240 ms on our four-year-old phone, which adds a short but perceptible pause before a send completes.

Meanwhile, the same operation finished well under 100 ms on current models. As a result, 端到端加密性能 is less a network problem and more a device problem, although future algorithms may raise the baseline again; see our notes on post-quantum E2EE.

端到端加密性能 results across four device classes

What Encryption Does Not Slow Down

Several operations stayed identical between the two builds. Notably, scrolling, searching local history, and rendering a conversation list showed no measurable difference, because those steps never touch the network or the key schedule.

Consequently, the honest summary for 端到端加密性能 is narrow: you pay on send and receive, and you pay almost nothing while reading. That distinction matters when someone claims the app feels sluggish, because the cause is usually elsewhere.

Frequently Asked Questions

Does 端到端加密性能 affect group chats?

Yes, and more sharply. A group message is encrypted once per device, as we saw in our multi-device sync test, so a five-person chat costs several times more than a one-to-one message.

Can I reduce the battery cost?

Send fewer large videos, and let photos upload over Wi-Fi. Those two habits removed most of the extra drain we measured.

Why does a photo take longer than text?

Text is a few hundred bytes, while a photo is a few megabytes. Therefore, the encryption step scales with the file, not with the message count.

Does battery saver break delivery?

Not in our test. Delivery continued, although background sync slipped by a few seconds on the slowest device.

References

端到端加密性能 costs 18 ms, 1.5 KB and 3.1% of a battery, and it buys protection that no server-side alternative provides. Moreover, two of those numbers shrink with every hardware generation. Therefore, treat the overhead as rent rather than as a tax, and pay it without worry.


延伸阅读

加密通话的性能开销有多大,请参阅:《加密聊天语音通话实测:通话链路上服务器还能看到什么》。

排队与加密带来的耗电和延迟,请参阅:《加密聊天离线消息实测:服务器排队时到底存了什么》。

端到端加密带来的握手与耗电成本,请参阅:《加密聊天视频通话实测:画面和声音在链路上暴露了什么》。

评论

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

评论功能已关闭。