mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-01 02:59:08 +02:00
[client] Cache the box shared key per remote peer in the Signal client (#7807)
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user