Documentation ¶
Index ¶
- Variables
- type AdvCryptoService
- type ElgamalCryptoFunction
- func (e ElgamalCryptoFunction) Decrypt(privKey *framework.PrivKey, ciphertext *framework.AsymmetricCiphertext) ([]byte, error)
- func (e ElgamalCryptoFunction) Encrypt(pubKey *framework.PubKey, data []byte) (*framework.AsymmetricCiphertext, error)
- func (e ElgamalCryptoFunction) GenerateKeypair() (*framework.AsymmetricKeypair, error)
- func (e ElgamalCryptoFunction) GenerateKeypairWithSeed(seed []byte) (*framework.AsymmetricKeypair, error)
- func (e ElgamalCryptoFunction) GetAlgorithm() framework.CryptoAlgorithm
- func (e ElgamalCryptoFunction) ParseCiphertext(ciphertextBytes []byte) (*framework.AsymmetricCiphertext, error)
- func (e ElgamalCryptoFunction) ParseDigest(digestBytes []byte) (*framework.SignatureDigest, error)
- func (e ElgamalCryptoFunction) ParsePrivKey(privKeyBytes []byte) (*framework.PrivKey, error)
- func (e ElgamalCryptoFunction) ParsePubKey(pubKeyBytes []byte) (*framework.PubKey, error)
- func (e ElgamalCryptoFunction) RetrieveEncrypedPrivKey(privateKey string, pwd []byte) (*framework.PrivKey, error)
- func (e ElgamalCryptoFunction) RetrievePrivKey(privateKey string) (*framework.PrivKey, error)
- func (e ElgamalCryptoFunction) RetrievePubKey(privKey *framework.PrivKey) (*framework.PubKey, error)
- func (e ElgamalCryptoFunction) RetrievePubKeyFromCA(cert *ca.Certificate) (*framework.PubKey, error)
- func (e ElgamalCryptoFunction) Sign(privKey *framework.PrivKey, data []byte) (*framework.SignatureDigest, error)
- func (e ElgamalCryptoFunction) SupportCiphertext(ciphertextBytes []byte) bool
- func (e ElgamalCryptoFunction) SupportDigest(digestBytes []byte) bool
- func (e ElgamalCryptoFunction) SupportPrivKey(privKeyBytes []byte) bool
- func (e ElgamalCryptoFunction) SupportPubKey(pubKeyBytes []byte) bool
- func (e ElgamalCryptoFunction) Verify(pubKey *framework.PubKey, data []byte, digest *framework.SignatureDigest) bool
- type PaillierCryptoFunction
- func (p PaillierCryptoFunction) Decrypt(privKey *framework.PrivKey, ciphertext *framework.AsymmetricCiphertext) ([]byte, error)
- func (p PaillierCryptoFunction) Encrypt(pubKey *framework.PubKey, data []byte) (*framework.AsymmetricCiphertext, error)
- func (p PaillierCryptoFunction) GenerateKeypair() (*framework.AsymmetricKeypair, error)
- func (p PaillierCryptoFunction) GenerateKeypairWithSeed(seed []byte) (*framework.AsymmetricKeypair, error)
- func (p PaillierCryptoFunction) GetAlgorithm() framework.CryptoAlgorithm
- func (p PaillierCryptoFunction) ParseCiphertext(ciphertextBytes []byte) (*framework.AsymmetricCiphertext, error)
- func (p PaillierCryptoFunction) ParseDigest(digestBytes []byte) (*framework.SignatureDigest, error)
- func (p PaillierCryptoFunction) ParsePrivKey(privKeyBytes []byte) (*framework.PrivKey, error)
- func (p PaillierCryptoFunction) ParsePubKey(pubKeyBytes []byte) (*framework.PubKey, error)
- func (p PaillierCryptoFunction) RetrieveEncrypedPrivKey(privateKey string, pwd []byte) (*framework.PrivKey, error)
- func (p PaillierCryptoFunction) RetrievePrivKey(privateKey string) (*framework.PrivKey, error)
- func (p PaillierCryptoFunction) RetrievePubKey(privKey *framework.PrivKey) (*framework.PubKey, error)
- func (p PaillierCryptoFunction) RetrievePubKeyFromCA(cert *ca.Certificate) (*framework.PubKey, error)
- func (p PaillierCryptoFunction) Sign(privKey *framework.PrivKey, data []byte) (*framework.SignatureDigest, error)
- func (p PaillierCryptoFunction) SupportCiphertext(ciphertextBytes []byte) bool
- func (p PaillierCryptoFunction) SupportDigest(digestBytes []byte) bool
- func (p PaillierCryptoFunction) SupportPrivKey(privKeyBytes []byte) bool
- func (p PaillierCryptoFunction) SupportPubKey(pubKeyBytes []byte) bool
- func (p PaillierCryptoFunction) Verify(pubKey *framework.PubKey, data []byte, digest *framework.SignatureDigest) bool
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 (e ElgamalCryptoFunction) Encrypt(pubKey *framework.PubKey, data []byte) (*framework.AsymmetricCiphertext, error)
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 (e ElgamalCryptoFunction) GetAlgorithm() framework.CryptoAlgorithm
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 (ElgamalCryptoFunction) RetrievePrivKey ¶
func (e ElgamalCryptoFunction) RetrievePrivKey(privateKey string) (*framework.PrivKey, error)
func (ElgamalCryptoFunction) RetrievePubKey ¶
func (ElgamalCryptoFunction) RetrievePubKeyFromCA ¶
func (e ElgamalCryptoFunction) RetrievePubKeyFromCA(cert *ca.Certificate) (*framework.PubKey, error)
func (ElgamalCryptoFunction) Sign ¶
func (e ElgamalCryptoFunction) Sign(privKey *framework.PrivKey, data []byte) (*framework.SignatureDigest, error)
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 (p PaillierCryptoFunction) Encrypt(pubKey *framework.PubKey, data []byte) (*framework.AsymmetricCiphertext, error)
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 (p PaillierCryptoFunction) GetAlgorithm() framework.CryptoAlgorithm
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 (PaillierCryptoFunction) RetrievePrivKey ¶
func (p PaillierCryptoFunction) RetrievePrivKey(privateKey string) (*framework.PrivKey, error)
func (PaillierCryptoFunction) RetrievePubKey ¶
func (PaillierCryptoFunction) RetrievePubKeyFromCA ¶
func (p PaillierCryptoFunction) RetrievePubKeyFromCA(cert *ca.Certificate) (*framework.PubKey, error)
func (PaillierCryptoFunction) Sign ¶
func (p PaillierCryptoFunction) Sign(privKey *framework.PrivKey, data []byte) (*framework.SignatureDigest, error)
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
Click to show internal directories.
Click to hide internal directories.