Documentation ¶
Overview ¶
Package cspp implements a DiceMix Light and CoinShuffle++ client.
Index ¶
Constants ¶
const MessageSize = 20
MessageSize is the size of messages returned by Gen.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenConfirmer ¶
type GenConfirmer interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler Gen() ([][]byte, error) Confirm() error }
GenConfirmer is a generator of fresh messages to mix in a DiceMix run and a signable message that can include the mixed messages. This will often be a transaction in wire encoding when CoinShuffle++ is used by applying DiceMix to create a CoinJoin transaction. Inputs spent by the CoinJoin must set the input amount. A single output for change is allowed, and if included, must pay the required share of fee.
The CoinShuffle++ server must combine inputs from all peers at the start of the protocol and share the combined message with each peer. Conforming implementations must return errors from Confirm if any of their inputs or anonymous outputs are missing after unmarshaling. See MissingMessage for documentation on how to return errors.
type Logger ¶
type Logger interface { Print(args ...interface{}) Printf(format string, args ...interface{}) }
Logger writes client logs.
type MissingMessage ¶
type MissingMessage interface { error MissingMessage() }
MissingMessage describes a UnmarshalBinary or Confirm error where an anonymized message is missing from the mix. It results in a failed run, revealing secrets, and assigning blame. If the mix is instead missing non-anonymized messages, this error should not be used, and any other error will cause the client to abort the protocol due to the server being malicious.
type Session ¶
type Session struct { Pk ed25519.PublicKey // Session pubkey Sk ed25519.PrivateKey // Session signing key // contains filtered or unexported fields }
Session represents a DiceMix Light session (which consists of one or more runs to remove unresponsive or malicious peers).
func NewSession ¶
NewSession creates a new Session for a mix session described by pairCommitment, which will submit mixes number of mixed messages.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package coinjoin defines a builder type for creating Decred CoinJoin transactions.
|
Package coinjoin defines a builder type for creating Decred CoinJoin transactions. |
internal
|
|
nettest
Package nettest provides a test server to test network listener handlers, similar to how net/http/httptest provides HTTP handler testing.
|
Package nettest provides a test server to test network listener handlers, similar to how net/http/httptest provides HTTP handler testing. |
Package messages implements the message types communicated between client and server.
|
Package messages implements the message types communicated between client and server. |
Package server implements a DiceMix Light server for CoinShuffle++.
|
Package server implements a DiceMix Light server for CoinShuffle++. |
Package x25519 implements ECDHE over curve25519.
|
Package x25519 implements ECDHE over curve25519. |