mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-06-07 06:22:47 -04:00
Cleanup
This commit is contained in:
parent
29a52e19cf
commit
d680f4d411
1 changed files with 2 additions and 3 deletions
|
@ -87,6 +87,7 @@ class Identity:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
DERIVED_KEY_LENGTH = 512//8
|
DERIVED_KEY_LENGTH = 512//8
|
||||||
|
DERIVED_KEY_LENGTH_LEGACY = 256//8
|
||||||
|
|
||||||
# Storage
|
# Storage
|
||||||
known_destinations = {}
|
known_destinations = {}
|
||||||
|
@ -720,10 +721,8 @@ class Identity:
|
||||||
token = Token(derived_key)
|
token = Token(derived_key)
|
||||||
plaintext = token.decrypt(ciphertext)
|
plaintext = token.decrypt(ciphertext)
|
||||||
|
|
||||||
# TODO: Remove after migration
|
|
||||||
# If decryption fails, try legacy decryption mode
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Decryption failed, attempting legacy mode fallback", RNS.LOG_DEBUG)
|
# RNS.log("Decryption failed, attempting legacy mode fallback", RNS.LOG_DEBUG)
|
||||||
derived_key = RNS.Cryptography.hkdf(
|
derived_key = RNS.Cryptography.hkdf(
|
||||||
length=Identity.DERIVED_KEY_LENGTH_LEGACY,
|
length=Identity.DERIVED_KEY_LENGTH_LEGACY,
|
||||||
derive_from=shared_key,
|
derive_from=shared_key,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue