Fix encryption key exchange and add persistent identity for favorites

- Implement three-tier key system: ephemeral encryption, ephemeral signing, persistent identity
- Fix signature verification by properly separating KeyAgreement and Signing keys
- Add persistent identity key for favorites that survives app restarts
- Fix Data subscript crashes by converting to byte arrays
- Add proper error handling for key exchange
- Private messages remain fully encrypted with ephemeral keys
This commit is contained in:
jack
2025-07-04 01:43:16 +02:00
parent 34e51b3d9a
commit fe986ed397
12 changed files with 679 additions and 929 deletions
@@ -73,4 +73,12 @@ class NotificationService {
sendLocalNotification(title: title, body: body, identifier: identifier)
}
func sendFavoriteOnlineNotification(nickname: String) {
let title = "\(nickname) is online"
let body = "Your favorite peer just joined the chat"
let identifier = "favorite-online-\(UUID().uuidString)"
sendLocalNotification(title: title, body: body, identifier: identifier)
}
}