json

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_MARSHAL_K = "couldn't marshal K: %v"
View Source
const ERROR_UNMARSHAL_K = "couldn't unmarshal K: %v"

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address []byte

type Ciphertext

type Ciphertext struct {
	K    PublicKey // r
	C    PublicKey // C
	UBar PublicKey // ubar
	E    []byte    // e
	F    []byte    // f
	GBar PublicKey // GBar
}

type Deal

type Deal struct {
	Index         uint32
	Signature     []byte
	EncryptedDeal EncryptedDeal
}

type DealerResponse

type DealerResponse struct {
	SessionID []byte
	Index     uint32
	Status    bool
	Signature []byte
}

type DecryptReply

type DecryptReply struct {
	V []byte
	I int64
}

type DecryptRequest

type DecryptRequest struct {
	K []byte
	C []byte
}

type EncryptedDeal

type EncryptedDeal struct {
	DHKey     []byte
	Signature []byte
	Nonce     []byte
	Cipher    []byte
}

type Message

type Message struct {
	Start                    *Start                    `json:",omitempty"`
	StartResharing           *StartResharing           `json:",omitempty"`
	Deal                     *Deal                     `json:",omitempty"`
	Reshare                  *Reshare                  `json:",omitempty"`
	Response                 *Response                 `json:",omitempty"`
	StartDone                *StartDone                `json:",omitempty"`
	DecryptRequest           *DecryptRequest           `json:",omitempty"`
	DecryptReply             *DecryptReply             `json:",omitempty"`
	VerifiableDecryptReply   *VerifiableDecryptReply   `json:",omitempty"`
	VerifiableDecryptRequest *VerifiableDecryptRequest `json:",omitempty"`
	ReencryptRequest         *ReencryptRequest         `json:",omitempty"`
	ReencryptReply           *ReencryptReply           `json:",omitempty"`
}

type PublicKey

type PublicKey []byte

type ReencryptReply

type ReencryptReply struct {
	PubK PublicKey
	UiI  int
	UiV  []byte
	Ei   []byte
	Fi   []byte
}

type ReencryptRequest

type ReencryptRequest struct {
	K    []byte
	PubK PublicKey
}

type Reshare

type Reshare struct {
	Deal        Deal
	PublicCoeff []PublicKey
}

type Response

type Response struct {
	Index    uint32
	Response DealerResponse
}

type ShareAndProof

type ShareAndProof struct {
	V  PublicKey
	I  int64
	Ui PublicKey // u_i
	Ei []byte    // e_i
	Fi []byte    // f_i
	Hi PublicKey // h_i

}

type Start

type Start struct {
	Threshold  int
	Addresses  []Address
	PublicKeys []PublicKey
}

type StartDone

type StartDone struct {
	PublicKey PublicKey
}

type StartResharing

type StartResharing struct {
	TNew       int
	TOld       int
	AddrsNew   []Address
	AddrsOld   []Address
	PubkeysNew []PublicKey
	PubkeysOld []PublicKey
}

type VerifiableDecryptReply

type VerifiableDecryptReply struct {
	Sp []ShareAndProof
}

type VerifiableDecryptRequest

type VerifiableDecryptRequest struct {
	Ciphertexts []Ciphertext
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL