Documentation ¶
Index ¶
- func New(key *ecdsa.PrivateKey, pub *ecdsa.PublicKey, salt []byte, padding int, ...) (encryption.Interface, error)
- func NewDecrypter(key *ecdsa.PrivateKey, pub *ecdsa.PublicKey, salt []byte, ...) (encryption.Decrypter, error)
- func NewEncryptor(pub *ecdsa.PublicKey, salt []byte, padding int, hashfunc func() hash.Hash) (encryption.Encrypter, *ecdsa.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(key *ecdsa.PrivateKey, pub *ecdsa.PublicKey, salt []byte, padding int, hashfunc func() hash.Hash) (encryption.Interface, error)
New constructs an encryption interface (the modified blockcipher) with a base key derived from a shared secret (using a private key and the counterparty's public key) hashed with a salt
func NewDecrypter ¶
func NewDecrypter(key *ecdsa.PrivateKey, pub *ecdsa.PublicKey, salt []byte, hashfunc func() hash.Hash) (encryption.Decrypter, error)
NewDecrypter constructs an el-Gamal decrypter the receiving party uses the public key must be the ephemeral return value of the Encrypter constructor
func NewEncryptor ¶
func NewEncryptor(pub *ecdsa.PublicKey, salt []byte, padding int, hashfunc func() hash.Hash) (encryption.Encrypter, *ecdsa.PublicKey, error)
NewEncryptor constructs an El-Gamal encryptor this involves generating an ephemeral key pair the public part of which is returned as it is needed for the counterparty to decrypt
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.