Versions in this module Expand all Collapse all v1 v1.11.0 Oct 31, 2023 Changes in this version + func NewKeys(curve *curves.Curve) (*EncryptionKey, *DecryptionKey, error) + type CipherText struct + Aead []byte + C1 curves.Point + C2 curves.Point + MsgIsHashed bool + Nonce []byte + func (c *CipherText) UnmarshalBinary(data []byte) error + func (c CipherText) MarshalBinary() ([]byte, error) + func (c CipherText) ToHomomorphicCipherText() *HomomorphicCipherText + type DecryptionKey struct + func (dk *DecryptionKey) Decrypt(cipherText *HomomorphicCipherText) curves.Point + func (dk *DecryptionKey) UnmarshalBinary(data []byte) error + func (dk DecryptionKey) EncryptionKey() *EncryptionKey + func (dk DecryptionKey) MarshalBinary() ([]byte, error) + func (dk DecryptionKey) VerifiableDecrypt(cipherText *CipherText) ([]byte, curves.Scalar, error) + func (dk DecryptionKey) VerifiableDecryptWithDomain(domain []byte, cipherText *CipherText) ([]byte, curves.Scalar, error) + type EncryptParams struct + Blinding curves.Scalar + Domain []byte + GenProof bool + MessageIsHashed bool + ProofNonce []byte + type EncryptionKey struct + Value curves.Point + func (ek *EncryptionKey) UnmarshalBinary(data []byte) error + func (ek EncryptionKey) HomomorphicEncrypt(msg curves.Scalar) (*HomomorphicCipherText, error) + func (ek EncryptionKey) MarshalBinary() ([]byte, error) + func (ek EncryptionKey) VerifiableEncrypt(msg []byte, params *EncryptParams) (*CipherText, *ProofVerEnc, error) + func (ek EncryptionKey) VerifyDomainEncryptProof(nonce []byte, ciphertext *CipherText, proof *ProofVerEnc) error + func (ek EncryptionKey) VerifyEncryptProof(nonce []byte, ciphertext *CipherText, proof *ProofVerEnc) error + type HomomorphicCipherText struct + C1 curves.Point + C2 curves.Point + func (c *HomomorphicCipherText) UnmarshalBinary(in []byte) error + func (c HomomorphicCipherText) Add(rhs *HomomorphicCipherText) *HomomorphicCipherText + func (c HomomorphicCipherText) Decrypt(dk *DecryptionKey) (curves.Point, error) + func (c HomomorphicCipherText) MarshalBinary() ([]byte, error) + type ProofVerEnc struct + func (pf *ProofVerEnc) UnmarshalBinary(data []byte) error + func (pf ProofVerEnc) MarshalBinary() ([]byte, error)