public class HashBasedKeyDerivationFunction extends java.lang.Object implements KeyDerivationFunction<SymmetricKey>
KeyDerivationFunction using a hash function.
This class can be used to generate key derivation functions that are not provably secure
(e.g. using SHA256HashFunction as a hash function),
or it can be used to generate provably secure key derivation functions.| Constructor and Description |
|---|
HashBasedKeyDerivationFunction()
Initializes this key derivation function based on the SHA256 hash function.
|
HashBasedKeyDerivationFunction(org.cryptimeleon.math.hash.HashFunction hashFunction) |
HashBasedKeyDerivationFunction(org.cryptimeleon.math.serialization.Representation repr) |
| Modifier and Type | Method and Description |
|---|---|
int |
bitSize()
Returns the output length in number of bytes
|
SymmetricKey |
deriveKey(KeyMaterial material) |
boolean |
equals(java.lang.Object obj) |
org.cryptimeleon.math.serialization.Representation |
getRepresentation() |
int |
hashCode() |
public HashBasedKeyDerivationFunction(org.cryptimeleon.math.hash.HashFunction hashFunction)
public HashBasedKeyDerivationFunction()
public HashBasedKeyDerivationFunction(org.cryptimeleon.math.serialization.Representation repr)
public org.cryptimeleon.math.serialization.Representation getRepresentation()
getRepresentation in interface org.cryptimeleon.math.serialization.Representablepublic SymmetricKey deriveKey(KeyMaterial material)
deriveKey in interface KeyDerivationFunction<SymmetricKey>public int bitSize()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object