Documentation ¶
Index ¶
- type Config
- type DefaultTpke
- func (t *DefaultTpke) AcceptDecShare(addr cleisthenes.Address, decShare cleisthenes.DecryptionShare)
- func (t *DefaultTpke) ClearDecShare()
- func (t *DefaultTpke) DecShare(ctb cleisthenes.CipherText) cleisthenes.DecryptionShare
- func (t *DefaultTpke) Decrypt(decShares map[string]cleisthenes.DecryptionShare, ctBytes []byte) ([]byte, error)
- func (t *DefaultTpke) Encrypt(msg []byte) ([]byte, error)
- type MockTpke
- func (t *MockTpke) AcceptDecShare(addr cleisthenes.Address, decShare cleisthenes.DecryptionShare)
- func (t *MockTpke) ClearDecShare()
- func (t *MockTpke) DecShare(ctBytes []byte) cleisthenes.DecryptionShare
- func (t *MockTpke) Decrypt(enc []byte) ([]cleisthenes.Transaction, error)
- func (t *MockTpke) Encrypt(data interface{}) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultTpke ¶
type DefaultTpke struct {
// contains filtered or unexported fields
}
func NewDefaultTpke ¶
func NewDefaultTpke(th int, skStr cleisthenes.SecretKey, pksStr cleisthenes.PublicKey) (*DefaultTpke, error)
func (*DefaultTpke) AcceptDecShare ¶
func (t *DefaultTpke) AcceptDecShare(addr cleisthenes.Address, decShare cleisthenes.DecryptionShare)
func (*DefaultTpke) ClearDecShare ¶
func (t *DefaultTpke) ClearDecShare()
func (*DefaultTpke) DecShare ¶
func (t *DefaultTpke) DecShare(ctb cleisthenes.CipherText) cleisthenes.DecryptionShare
DecShare makes decryption share using each secret key.
func (*DefaultTpke) Decrypt ¶
func (t *DefaultTpke) Decrypt(decShares map[string]cleisthenes.DecryptionShare, ctBytes []byte) ([]byte, error)
Decrypt collects decryption share, and combine it for decryption.
type MockTpke ¶
type MockTpke struct{}
func (*MockTpke) AcceptDecShare ¶
func (t *MockTpke) AcceptDecShare(addr cleisthenes.Address, decShare cleisthenes.DecryptionShare)
func (*MockTpke) ClearDecShare ¶
func (t *MockTpke) ClearDecShare()
func (*MockTpke) DecShare ¶
func (t *MockTpke) DecShare(ctBytes []byte) cleisthenes.DecryptionShare
func (*MockTpke) Decrypt ¶
func (t *MockTpke) Decrypt(enc []byte) ([]cleisthenes.Transaction, error)
Click to show internal directories.
Click to hide internal directories.