Versions in this module Expand all Collapse all v1 v1.3.71 Apr 15, 2024 Changes in this version + const Andgate + const Orgate + func CouldDecrypt(ciphertext []byte, a *Attributes) bool + func DecryptCCA(ciphertext []byte, key *AttributesKey) ([]byte, error) + func EncryptCCA(rand io.Reader, public *PublicParams, policy *Policy, msg []byte) ([]byte, error) + func GenerateParams(rand io.Reader) (*PublicParams, *SecretParams, error) + func HashStringToScalar(key []byte, value string) *pairing.Scalar + func ToScalar(n int) *pairing.Scalar + type Attribute struct + Value *pairing.Scalar + func (a *Attribute) Equal(b *Attribute) bool + type Attributes map[string]Attribute + func (a *Attributes) Equal(b *Attributes) bool + type AttributesKey struct + func DeriveAttributeKeysCCA(rand io.Reader, sp *SecretParams, attrs *Attributes) (*AttributesKey, error) + func (a *AttributesKey) Equal(b *AttributesKey) bool + func (a *AttributesKey) MarshalBinary() ([]byte, error) + func (a *AttributesKey) UnmarshalBinary(data []byte) error + type Formula struct + Gates []Gate + func (f *Formula) Equal(g Formula) bool + func (f *Formula) MarshalBinary() ([]byte, error) + func (f *Formula) UnmarshalBinary(data []byte) error + type Gate struct + Class int + In0 int + In1 int + Out int + func (g Gate) Equal(g2 Gate) bool + type Policy struct + F Formula + Inputs []Wire + func (p *Policy) Equal(p2 *Policy) bool + func (p *Policy) ExtractFromCiphertext(ct []byte) error + func (p *Policy) MarshalBinary() ([]byte, error) + func (p *Policy) Satisfaction(attr *Attributes) (*Satisfaction, error) + func (p *Policy) String() string + func (p *Policy) UnmarshalBinary(data []byte) error + type PublicParams struct + func (p *PublicParams) Equal(p2 *PublicParams) bool + func (p *PublicParams) MarshalBinary() ([]byte, error) + func (p *PublicParams) UnmarshalBinary(data []byte) error + type Satisfaction struct + type SecretParams struct + func (s *SecretParams) Equal(s2 *SecretParams) bool + func (s *SecretParams) MarshalBinary() ([]byte, error) + func (s *SecretParams) UnmarshalBinary(data []byte) error + type Wire struct + Label string + Positive bool + RawValue string + Value *pairing.Scalar + func (w *Wire) Equal(w2 *Wire) bool + func (w *Wire) MarshalBinary() ([]byte, error) + func (w *Wire) String() string + func (w *Wire) UnmarshalBinary(data []byte) error