public interface ChallengeSpace
extends org.cryptimeleon.math.serialization.annotations.RepresentationRestorer
| Modifier and Type | Method and Description |
|---|---|
Challenge |
generateRandomChallenge() |
Challenge |
hashIntoChallengeSpace(byte[] bytes)
Hashes the given bytes into this challenge space (in a random-oracle-like manner).
|
Challenge |
mapIntoChallengeSpace(byte[] bytes)
Creates a challenge from the given
byte[]. |
Challenge |
restoreChallenge(org.cryptimeleon.math.serialization.Representation repr)
Restores a given challenge from representation.
|
default java.lang.Object |
restoreFromRepresentation(java.lang.reflect.Type type,
org.cryptimeleon.math.serialization.Representation repr) |
java.math.BigInteger |
size()
Returns the size of the challenge space.
|
Challenge |
subtract(Challenge challengeToSplit,
Challenge share1)
Returns the unique challenge share2 such that
subtract(challengeToSplit, share2).equals(share1). |
Challenge generateRandomChallenge()
java.math.BigInteger size()
throws java.lang.UnsupportedOperationException
UnsupportedOperationException if unknown.java.lang.UnsupportedOperationExceptionChallenge restoreChallenge(org.cryptimeleon.math.serialization.Representation repr)
default java.lang.Object restoreFromRepresentation(java.lang.reflect.Type type,
org.cryptimeleon.math.serialization.Representation repr)
restoreFromRepresentation in interface org.cryptimeleon.math.serialization.annotations.RepresentationRestorerChallenge mapIntoChallengeSpace(byte[] bytes)
byte[].
Given two random byte[] of the same (arbitrary) length, it should be unlikely that their challenge collides.
Challenge hashIntoChallengeSpace(byte[] bytes)
Challenge subtract(Challenge challengeToSplit, Challenge share1) throws java.lang.UnsupportedOperationException
subtract(challengeToSplit, share2).equals(share1).
This is akin to secret sharing.
For all challengeToSplit, subtract(challengeToSplit, generateRandomChallenge()) shall be distributed like generateRandomChallenge().java.lang.UnsupportedOperationException - if this challenge space does not support splitting challenges.