Versions in this module Expand all Collapse all v0 v0.8.2 Jun 11, 2019 Changes in this version + var ErrUnmarshalLength = errors.New("the byte array provided is incomplete") + func Decrypt(g *bpgroup.BpGroup, pk *PrivateKey, enc *Encryption) *Curve.ECP + func Keygen(g *bpgroup.BpGroup) (*PrivateKey, *PublicKey) + func ValidateKeyPair(pk *PrivateKey, pub *PublicKey) bool + type Encryption struct + func Encrypt(g *bpgroup.BpGroup, pub *PublicKey, m *Curve.BIG, h *Curve.ECP) (*Encryption, *Curve.BIG) + func NewEncryptionFromPoints(c1 *Curve.ECP, c2 *Curve.ECP) *Encryption + func (e *Encryption) C1() *Curve.ECP + func (e *Encryption) C2() *Curve.ECP + func (e *Encryption) FromProto(pe *ProtoEncryption) error + func (e *Encryption) MarshalBinary() ([]byte, error) + func (e *Encryption) ToProto() (*ProtoEncryption, error) + func (e *Encryption) UnmarshalBinary(data []byte) error + func (e *Encryption) Validate() bool + type EncryptionResult struct + func NewEncryptionResult(enc *Encryption, k *Curve.BIG) *EncryptionResult + func (er *EncryptionResult) Enc() *Encryption + func (er *EncryptionResult) K() *Curve.BIG + type PrivateKey struct + func NewPrivateKey(d *Curve.BIG) *PrivateKey + func (pk *PrivateKey) D() *Curve.BIG + func (pk *PrivateKey) FromPEMFile(f string) error + func (pk *PrivateKey) FromProto(ppk *ProtoPrivateKey) error + func (pk *PrivateKey) MarshalBinary() ([]byte, error) + func (pk *PrivateKey) ToPEMFile(f string) error + func (pk *PrivateKey) ToProto() (*ProtoPrivateKey, error) + func (pk *PrivateKey) UnmarshalBinary(data []byte) error + func (pk *PrivateKey) Validate() bool + type ProtoEncryption struct + C1 []byte + C2 []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ProtoEncryption) Descriptor() ([]byte, []int) + func (*ProtoEncryption) ProtoMessage() + func (m *ProtoEncryption) GetC1() []byte + func (m *ProtoEncryption) GetC2() []byte + func (m *ProtoEncryption) Reset() + func (m *ProtoEncryption) String() string + func (m *ProtoEncryption) XXX_DiscardUnknown() + func (m *ProtoEncryption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProtoEncryption) XXX_Merge(src proto.Message) + func (m *ProtoEncryption) XXX_Size() int + func (m *ProtoEncryption) XXX_Unmarshal(b []byte) error + type ProtoPrivateKey struct + D []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ProtoPrivateKey) Descriptor() ([]byte, []int) + func (*ProtoPrivateKey) ProtoMessage() + func (m *ProtoPrivateKey) GetD() []byte + func (m *ProtoPrivateKey) Reset() + func (m *ProtoPrivateKey) String() string + func (m *ProtoPrivateKey) XXX_DiscardUnknown() + func (m *ProtoPrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProtoPrivateKey) XXX_Merge(src proto.Message) + func (m *ProtoPrivateKey) XXX_Size() int + func (m *ProtoPrivateKey) XXX_Unmarshal(b []byte) error + type ProtoPublicKey struct + G []byte + Gamma []byte + P []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ProtoPublicKey) Descriptor() ([]byte, []int) + func (*ProtoPublicKey) ProtoMessage() + func (m *ProtoPublicKey) GetG() []byte + func (m *ProtoPublicKey) GetGamma() []byte + func (m *ProtoPublicKey) GetP() []byte + func (m *ProtoPublicKey) Reset() + func (m *ProtoPublicKey) String() string + func (m *ProtoPublicKey) XXX_DiscardUnknown() + func (m *ProtoPublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProtoPublicKey) XXX_Merge(src proto.Message) + func (m *ProtoPublicKey) XXX_Size() int + func (m *ProtoPublicKey) XXX_Unmarshal(b []byte) error + type PublicKey struct + func NewPublicKey(p *Curve.BIG, g *Curve.ECP, gamma *Curve.ECP) *PublicKey + func PublicKeyFromPrivate(pk *PrivateKey) *PublicKey + func (pub *PublicKey) FromPEMFile(f string) error + func (pub *PublicKey) FromProto(ppub *ProtoPublicKey) error + func (pub *PublicKey) G() *Curve.ECP + func (pub *PublicKey) Gamma() *Curve.ECP + func (pub *PublicKey) MarshalBinary() ([]byte, error) + func (pub *PublicKey) P() *Curve.BIG + func (pub *PublicKey) ToPEMFile(f string) error + func (pub *PublicKey) ToProto() (*ProtoPublicKey, error) + func (pub *PublicKey) UnmarshalBinary(data []byte) error + func (pub *PublicKey) Validate() bool