[client] Cache the box shared key per remote peer in the Signal client (#7807)

This commit is contained in:
Viktor Liu
2026-09-30 17:03:04 +02:00
committed by GitHub
parent e72be6698f
commit 0dc729c4ea
5 changed files with 352 additions and 2 deletions
+8
View File
@@ -0,0 +1,8 @@
//go:build !ios && !android
package encryption
// maxSharedKeys bounds the cache so peers that come and go (ephemeral peers get a
// new key on every registration) cannot grow it for the lifetime of the process.
// An entry costs about 130 bytes, so a full cache is around 8 MB.
const maxSharedKeys = 1 << 16