Improved IFAC mask derivation

This commit is contained in:
Mark Qvist 2023-02-02 23:59:02 +01:00
parent 4df67304d6
commit 53ceafcebd
1 changed files with 5 additions and 5 deletions

View File

@ -589,8 +589,8 @@ class Transport:
# Generate mask # Generate mask
mask = RNS.Cryptography.hkdf( mask = RNS.Cryptography.hkdf(
length=len(raw)+interface.ifac_size, length=len(raw)+interface.ifac_size,
derive_from=interface.ifac_signature+ifac, derive_from=ifac,
salt=RNS.Reticulum.IFAC_SALT, salt=interface.ifac_key,
context=None, context=None,
) )
@ -932,8 +932,8 @@ class Transport:
# Generate mask # Generate mask
mask = RNS.Cryptography.hkdf( mask = RNS.Cryptography.hkdf(
length=len(raw), length=len(raw),
derive_from=interface.ifac_signature+ifac, derive_from=ifac,
salt=RNS.Reticulum.IFAC_SALT, salt=interface.ifac_key,
context=None, context=None,
) )
@ -2401,4 +2401,4 @@ class Transport:
@staticmethod @staticmethod
def exit_handler(): def exit_handler():
if not Transport.owner.is_connected_to_shared_instance: if not Transport.owner.is_connected_to_shared_instance:
Transport.persist_data() Transport.persist_data()