mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-01-18 16:30:33 +00:00
Allow IFAC bitmask generation for large packet sizes
This commit is contained in:
parent
5d677d2fb7
commit
45494f21aa
@ -48,7 +48,7 @@ def hkdf(length=None, derive_from=None, salt=None, context=None):
|
|||||||
derived = b""
|
derived = b""
|
||||||
|
|
||||||
for i in range(ceil(length / hash_len)):
|
for i in range(ceil(length / hash_len)):
|
||||||
block = hmac_sha256(pseudorandom_key, block + context + bytes([i + 1]))
|
block = hmac_sha256(pseudorandom_key, block + context + bytes([(i + 1)%(0xFF+1)]))
|
||||||
derived += block
|
derived += block
|
||||||
|
|
||||||
return derived[:length]
|
return derived[:length]
|
||||||
|
Loading…
Reference in New Issue
Block a user