adv

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ELGAMAL_ALGORITHM  = framework.DefineSignature("ELGAMAL", true, 31)
	PAILLIER_ALGORITHM = framework.DefineSignature("PAILLIER", true, 32)
)
View Source
var (
	ELGAMAL  = ElgamalCryptoFunction{}
	PAILLIER = PaillierCryptoFunction{}
)

Functions

This section is empty.

Types

type AdvCryptoService

type AdvCryptoService struct {
	// contains filtered or unexported fields
}

func NewAdvCryptoService

func NewAdvCryptoService() AdvCryptoService

func (AdvCryptoService) GetFunctions

func (c AdvCryptoService) GetFunctions() []framework.CryptoFunction

type ElgamalCryptoFunction

type ElgamalCryptoFunction struct {
}

func (ElgamalCryptoFunction) Decrypt

func (e ElgamalCryptoFunction) Decrypt(privKey *framework.PrivKey, ciphertext *framework.AsymmetricCiphertext) ([]byte, error)

func (ElgamalCryptoFunction) Encrypt

func (ElgamalCryptoFunction) GenerateKeypair

func (e ElgamalCryptoFunction) GenerateKeypair() (*framework.AsymmetricKeypair, error)

func (ElgamalCryptoFunction) GenerateKeypairWithSeed

func (e ElgamalCryptoFunction) GenerateKeypairWithSeed(seed []byte) (*framework.AsymmetricKeypair, error)

func (ElgamalCryptoFunction) GetAlgorithm

func (ElgamalCryptoFunction) ParseCiphertext

func (e ElgamalCryptoFunction) ParseCiphertext(ciphertextBytes []byte) (*framework.AsymmetricCiphertext, error)

func (ElgamalCryptoFunction) ParseDigest

func (e ElgamalCryptoFunction) ParseDigest(digestBytes []byte) (*framework.SignatureDigest, error)

func (ElgamalCryptoFunction) ParsePrivKey

func (e ElgamalCryptoFunction) ParsePrivKey(privKeyBytes []byte) (*framework.PrivKey, error)

func (ElgamalCryptoFunction) ParsePubKey

func (e ElgamalCryptoFunction) ParsePubKey(pubKeyBytes []byte) (*framework.PubKey, error)

func (ElgamalCryptoFunction) RetrieveEncrypedPrivKey

func (e ElgamalCryptoFunction) RetrieveEncrypedPrivKey(privateKey string, pwd []byte) (*framework.PrivKey, error)

func (ElgamalCryptoFunction) RetrievePrivKey

func (e ElgamalCryptoFunction) RetrievePrivKey(privateKey string) (*framework.PrivKey, error)

func (ElgamalCryptoFunction) RetrievePubKey

func (e ElgamalCryptoFunction) RetrievePubKey(privKey *framework.PrivKey) (*framework.PubKey, error)

func (ElgamalCryptoFunction) RetrievePubKeyFromCA

func (e ElgamalCryptoFunction) RetrievePubKeyFromCA(cert *ca.Certificate) (*framework.PubKey, error)

func (ElgamalCryptoFunction) Sign

func (ElgamalCryptoFunction) SupportCiphertext

func (e ElgamalCryptoFunction) SupportCiphertext(ciphertextBytes []byte) bool

func (ElgamalCryptoFunction) SupportDigest

func (e ElgamalCryptoFunction) SupportDigest(digestBytes []byte) bool

func (ElgamalCryptoFunction) SupportPrivKey

func (e ElgamalCryptoFunction) SupportPrivKey(privKeyBytes []byte) bool

func (ElgamalCryptoFunction) SupportPubKey

func (e ElgamalCryptoFunction) SupportPubKey(pubKeyBytes []byte) bool

func (ElgamalCryptoFunction) Verify

func (e ElgamalCryptoFunction) Verify(pubKey *framework.PubKey, data []byte, digest *framework.SignatureDigest) bool

type PaillierCryptoFunction

type PaillierCryptoFunction struct {
}

func (PaillierCryptoFunction) Decrypt

func (p PaillierCryptoFunction) Decrypt(privKey *framework.PrivKey, ciphertext *framework.AsymmetricCiphertext) ([]byte, error)

func (PaillierCryptoFunction) Encrypt

func (PaillierCryptoFunction) GenerateKeypair

func (p PaillierCryptoFunction) GenerateKeypair() (*framework.AsymmetricKeypair, error)

func (PaillierCryptoFunction) GenerateKeypairWithSeed

func (p PaillierCryptoFunction) GenerateKeypairWithSeed(seed []byte) (*framework.AsymmetricKeypair, error)

func (PaillierCryptoFunction) GetAlgorithm

func (PaillierCryptoFunction) ParseCiphertext

func (p PaillierCryptoFunction) ParseCiphertext(ciphertextBytes []byte) (*framework.AsymmetricCiphertext, error)

func (PaillierCryptoFunction) ParseDigest

func (p PaillierCryptoFunction) ParseDigest(digestBytes []byte) (*framework.SignatureDigest, error)

func (PaillierCryptoFunction) ParsePrivKey

func (p PaillierCryptoFunction) ParsePrivKey(privKeyBytes []byte) (*framework.PrivKey, error)

func (PaillierCryptoFunction) ParsePubKey

func (p PaillierCryptoFunction) ParsePubKey(pubKeyBytes []byte) (*framework.PubKey, error)

func (PaillierCryptoFunction) RetrieveEncrypedPrivKey

func (p PaillierCryptoFunction) RetrieveEncrypedPrivKey(privateKey string, pwd []byte) (*framework.PrivKey, error)

func (PaillierCryptoFunction) RetrievePrivKey

func (p PaillierCryptoFunction) RetrievePrivKey(privateKey string) (*framework.PrivKey, error)

func (PaillierCryptoFunction) RetrievePubKey

func (p PaillierCryptoFunction) RetrievePubKey(privKey *framework.PrivKey) (*framework.PubKey, error)

func (PaillierCryptoFunction) RetrievePubKeyFromCA

func (p PaillierCryptoFunction) RetrievePubKeyFromCA(cert *ca.Certificate) (*framework.PubKey, error)

func (PaillierCryptoFunction) Sign

func (PaillierCryptoFunction) SupportCiphertext

func (p PaillierCryptoFunction) SupportCiphertext(ciphertextBytes []byte) bool

func (PaillierCryptoFunction) SupportDigest

func (p PaillierCryptoFunction) SupportDigest(digestBytes []byte) bool

func (PaillierCryptoFunction) SupportPrivKey

func (p PaillierCryptoFunction) SupportPrivKey(privKeyBytes []byte) bool

func (PaillierCryptoFunction) SupportPubKey

func (p PaillierCryptoFunction) SupportPubKey(pubKeyBytes []byte) bool

func (PaillierCryptoFunction) Verify

func (p PaillierCryptoFunction) Verify(pubKey *framework.PubKey, data []byte, digest *framework.SignatureDigest) bool

Jump to

Keyboard shortcuts

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