Introduce secure mode (part 1) (#1808)

Use noise protocol on handshake. Check peer's public key if needed. Also support rekey and replay attack prevention.

E2EE and temporary password will be implemented based on this.
This commit is contained in:
KKRainbow
2026-01-25 20:16:51 +08:00
committed by GitHub
parent ffa08d1c43
commit 101f416268
29 changed files with 3320 additions and 91 deletions
+10
View File
@@ -230,3 +230,13 @@ message LimiterConfig {
optional uint64 fill_duration_ms =
3; // default 10ms, the period to fill the bucket
}
message SecureModeConfig {
bool enabled = 1;
// base64(X25519 private key), used by shared node to present a stable identity
optional string local_private_key = 2;
// base64(X25519 public key), required if local_private_key is set
optional string local_public_key = 3;
}