public class AesPseudorandomFunction extends java.lang.Object implements PseudorandomFunction
PrfKey, PrfPreimage, and PrfImage are of type ByteArrayImpl.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Integer |
keylength |
| Constructor and Description |
|---|
AesPseudorandomFunction(int keylength)
Instantiates the PRF with a given AES key length.
|
AesPseudorandomFunction(Representation repr) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
PrfImage |
evaluate(PrfKey k,
PrfPreimage x)
Maps a preimage x to its image using key k.
|
PrfKey |
generateKey()
Generates a key k for use with this PRF.
|
java.lang.Integer |
getKeylength() |
Representation |
getRepresentation()
The representation of this object.
|
int |
hashCode() |
PrfImage |
restoreImage(Representation repr)
Restores an image y from its representation.
|
PrfKey |
restoreKey(Representation repr)
Restores a key k from its representation.
|
PrfPreimage |
restorePreimage(Representation repr)
Restores a preimage x from its representation.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitrestoreFromRepresentationpublic AesPseudorandomFunction(int keylength)
keylength - a valid AES key length in bit (e.g., 128 or 256)public AesPseudorandomFunction(Representation repr)
public Representation getRepresentation()
RepresentableReprUtilgetRepresentation in interface RepresentableRepresentationpublic PrfKey generateKey()
PseudorandomFunctiongenerateKey in interface PseudorandomFunctionpublic PrfImage evaluate(PrfKey k, PrfPreimage x)
PseudorandomFunctionevaluate in interface PseudorandomFunctionpublic PrfKey restoreKey(Representation repr)
PseudorandomFunctionrestoreKey in interface PseudorandomFunctionpublic PrfPreimage restorePreimage(Representation repr)
PseudorandomFunctionrestorePreimage in interface PseudorandomFunctionpublic PrfImage restoreImage(Representation repr)
PseudorandomFunctionrestoreImage in interface PseudorandomFunctionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.Integer getKeylength()