The goal of this PR was to create a simple "handler" interface for interacting with protocols defined in terms of rounds.
Along the way, many aspects of the project were changed in order to make the code more understandable, but also to make it easier easier to implement different types of protocols in the future.
Changes to round.Round interface to remove necessary boilerplate code and facilitate interaction through handler
Protocols moved to folders that indicate what "family" they belong to. This will make it clearer if we have the same protocol with identifiable aborts or a 2 party version. This also provides a clear place for example protocols.
party.ID dependency was removed from hash package
message package was created to separate some logic from the protocol package
The protocol can return two types of errors: one for message validation and one protocol execution. This allows the user to continue the execution if some routing errors happen. The errors for "crypto bugs" are more descriptive.
protocol.Handler has a very simple interface for updating and listening to new messages.
session was placed in keygen
README and examples were updated, including a simple XOR protocol.
The goal of this PR was to create a simple "handler" interface for interacting with protocols defined in terms of rounds. Along the way, many aspects of the project were changed in order to make the code more understandable, but also to make it easier easier to implement different types of protocols in the future.
round.Round
interface to remove necessary boilerplate code and facilitate interaction through handlerparty.ID
dependency was removed fromhash
packagemessage
package was created to separate some logic from theprotocol
packageprotocol.Handler
has a very simple interface for updating and listening to new messages.session
was placed inkeygen
README
and examples were updated, including a simple XOR protocol.