Documentation
¶
Index ¶
- func UnmarshallPublicKey(publicKey string) (kyber.Point, error)
- type EncryptedMessage
- type EncryptionScheme
- type PREEncryptedMessage
- type PREEncryptionScheme
- func (pre *PREEncryptionScheme) Decrypt(encMsg *EncryptedMessage) ([]byte, error)
- func (pre *PREEncryptionScheme) Encrypt(data []byte) (*EncryptedMessage, error)
- func (pre *PREEncryptionScheme) GetEncryptedKey() string
- func (pre *PREEncryptionScheme) GetPrivateKey() (string, error)
- func (pre *PREEncryptionScheme) GetPublicKey() (string, error)
- func (pre *PREEncryptionScheme) GetReGenKey(encPublicKey string, tag string) (string, error)
- func (pre *PREEncryptionScheme) InitForDecryption(tag string, encryptedKey string) error
- func (pre *PREEncryptionScheme) InitForEncryption(tag string)
- func (pre *PREEncryptionScheme) Initialize(mnemonic string) error
- func (pre *PREEncryptionScheme) ReDecrypt(D *ReEncryptedMessage) ([]byte, error)
- func (pre *PREEncryptionScheme) ReEncrypt(encMsg *EncryptedMessage, reGenKey string, clientPublicKey string) (*ReEncryptedMessage, error)
- func (pre *PREEncryptionScheme) SymDec(group kyber.Group, ctx []byte, keyhash []byte) ([]byte, error)
- func (pre *PREEncryptionScheme) SymEnc(group kyber.Group, message []byte, keyhash []byte) ([]byte, error)
- type ReEncryptedMessage
- type ReKey
- type ReKeyBytes
- type Suite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EncryptedMessage ¶
type EncryptionScheme ¶
type EncryptionScheme interface {
Initialize(mnemonic string) error
InitForEncryption(tag string)
InitForDecryption(tag string, encryptedKey string) error
Encrypt(data []byte) (*EncryptedMessage, error)
Decrypt(*EncryptedMessage) ([]byte, error)
ReDecrypt(D *ReEncryptedMessage) ([]byte, error)
GetEncryptedKey() string
GetReGenKey(encPublicKey string, tag string) (string, error)
ReEncrypt(encMsg *EncryptedMessage, reGenKey string, clientPublicKey string) (*ReEncryptedMessage, error)
GetPublicKey() (string, error)
GetPrivateKey() (string, error)
}
func NewEncryptionScheme ¶
func NewEncryptionScheme() EncryptionScheme
type PREEncryptedMessage ¶
type PREEncryptedMessage struct {
EncryptedKey kyber.Point `json:"-"`
EncryptedData []byte
MessageChecksum []byte
OverallChecksum []byte
TagA []byte
}
func (*PREEncryptedMessage) MarshalJSON ¶
func (u *PREEncryptedMessage) MarshalJSON() ([]byte, error)
type PREEncryptionScheme ¶
type PREEncryptionScheme struct {
PublicKey kyber.Point
PrivateKey kyber.Scalar
SuiteObj Suite
Tag []byte
T kyber.Point
Ht kyber.Point
EncryptedKey kyber.Point
}
func (*PREEncryptionScheme) Decrypt ¶
func (pre *PREEncryptionScheme) Decrypt(encMsg *EncryptedMessage) ([]byte, error)
func (*PREEncryptionScheme) Encrypt ¶
func (pre *PREEncryptionScheme) Encrypt(data []byte) (*EncryptedMessage, error)
func (*PREEncryptionScheme) GetEncryptedKey ¶
func (pre *PREEncryptionScheme) GetEncryptedKey() string
func (*PREEncryptionScheme) GetPrivateKey ¶
func (pre *PREEncryptionScheme) GetPrivateKey() (string, error)
func (*PREEncryptionScheme) GetPublicKey ¶
func (pre *PREEncryptionScheme) GetPublicKey() (string, error)
func (*PREEncryptionScheme) GetReGenKey ¶
func (pre *PREEncryptionScheme) GetReGenKey(encPublicKey string, tag string) (string, error)
func (*PREEncryptionScheme) InitForDecryption ¶
func (pre *PREEncryptionScheme) InitForDecryption(tag string, encryptedKey string) error
func (*PREEncryptionScheme) InitForEncryption ¶
func (pre *PREEncryptionScheme) InitForEncryption(tag string)
func (*PREEncryptionScheme) Initialize ¶
func (pre *PREEncryptionScheme) Initialize(mnemonic string) error
func (*PREEncryptionScheme) ReDecrypt ¶
func (pre *PREEncryptionScheme) ReDecrypt(D *ReEncryptedMessage) ([]byte, error)
-----------------------------------------------ReDecryption-------------------------------------------------
func (*PREEncryptionScheme) ReEncrypt ¶
func (pre *PREEncryptionScheme) ReEncrypt(encMsg *EncryptedMessage, reGenKey string, clientPublicKey string) (*ReEncryptedMessage, error)
type ReEncryptedMessage ¶
func (*ReEncryptedMessage) Marshal ¶
func (reEncMsg *ReEncryptedMessage) Marshal() ([]byte, error)
func (*ReEncryptedMessage) Unmarshal ¶
func (reEncMsg *ReEncryptedMessage) Unmarshal(data []byte) error
type ReKeyBytes ¶
Click to show internal directories.
Click to hide internal directories.