From 9d33962c013e68dcecd8c26bb23ca232bc52c2a2 Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Fri, 13 Feb 2026 18:13:26 +0400 Subject: [PATCH] constTimeIsEqual --- .../TelegramCore/Sources/SecretChats/SecretChatEncryption.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift index b46bcf7a00..ebcda09595 100644 --- a/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift +++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift @@ -231,7 +231,7 @@ func withDecryptedMessageContents(parameters: SecretChatEncryptionParameters, da return nil } - if localMessageKey != msgKeyData { + if !constTimeIsEqual(data1: localMessageKey, data2: msgKeyData) { Logger.shared.log("SecretChatEncryption", "message key doesn't match") return nil }