Miscallaneous tools

Miscellaneous Tools: Tools that are not common to symmetric or asymmetric.

pyflocker.ciphers.backends.cryptodome_.misc.derive_hkdf_key(master_key: bytes, dklen: int, hashalgo: BaseHash, salt: bytes, cipher_ctx: bytes = b'enc-key', auth_ctx: bytes = b'auth-key') tuple[bytes, bytes][source]

Derive key materials for HMAC from given master key.

Parameters:
  • master_key – The key used to derive the keys from.

  • dklen – Desired lenth of the derived key.

  • hashalgo – The name of the hash algorithm.

  • salt – The salt to use.

  • cipher_ctx – Context for cipher.

  • auth_ctx – Context for HMAC.

Returns:

A pair of cipher key and MAC key.