elgamal

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

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.

Jump to

Keyboard shortcuts

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