Module: crypto_provider
- class x3dh.crypto_provider.CryptoProvider[source]
Bases:
ABCAbstraction of the cryptographic operations needed by this package to allow for different backend implementations.
- abstractmethod async static hkdf_derive(hash_function, length, salt, info, key_material)[source]
- Parameters:
hash_function (
HashFunction) – The hash function to parameterize the HKDF with.length (
int) – The number of bytes to derive.salt (
bytes) – The salt input for the HKDF.info (
bytes) – The info input for the HKDF.key_material (
bytes) – The input key material to derive from.
- Return type:
- Returns:
The derived key material.