public interface TwoPartyProtocolInstance
TwoPartyProtocol, modeling a single protocol run from one of the roles' perspective.| Modifier and Type | Method and Description |
|---|---|
TwoPartyProtocol |
getProtocol() |
java.lang.String |
getRoleName() |
boolean |
hasTerminated()
Returns true if the protocol is done, meaning no further calls to
nextMessage() are necessary. |
org.cryptimeleon.math.serialization.Representation |
nextMessage(org.cryptimeleon.math.serialization.Representation received)
Outputs the next message this protocol instance demands to be sent to the other party.
|
default boolean |
sendsFirstMessage()
Returns true iff this role sends the first message of this protocol.
|
TwoPartyProtocol getProtocol()
java.lang.String getRoleName()
default boolean sendsFirstMessage()
org.cryptimeleon.math.serialization.Representation nextMessage(org.cryptimeleon.math.serialization.Representation received)
received - the message recently received from the other party
or null if this is the first round and no messages have been sent yetm to be sent to the other party (who then calls nextMessage(m) on their end).
If nextMessage returns null, the protocol has terminatedboolean hasTerminated()
nextMessage() are necessary.