Skip to content

Commit 9b44924

Browse files
authored
fix(import): document Telegram tempkey hash
1 parent 01eeecc commit 9b44924

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

internal/telegramdesktop/scripts/import_postbox.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ def read_passcodes(value: str | None) -> list[bytes]:
245245

246246

247247
def tempkey_key(passcode: bytes) -> tuple[bytes, bytes]:
248+
# Telegram Desktop derives the local tempkey AES key/IV with raw SHA512;
249+
# this mirrors that file format and is not application password storage.
250+
# codeql[py/weak-sensitive-data-hashing]
248251
digest = hashlib.sha512(passcode).digest()
249252
return digest[:32], digest[-16:]
250253

0 commit comments

Comments
 (0)