Documentation
¶
Index ¶
- func Encode(name string, k any) *pem.Block
- func GenerateAttribKeys(sk *abe.FAMESecKey, attributes []string, fileName string)
- func GenerateFAMEKeys()
- func SymKeygen() [32]byte
- func UnmarshalFameAttrKey(data []byte) (*abe.FAMEAttribKeys, error)
- func UnmarshalFamePrivKey(data []byte) (*abe.FAMESecKey, error)
- func UnmarshalFamePubKey(data []byte) (*abe.FAMEPubKey, error)
- type AeadCipher
- type Cipher
- type CipherFunc
- type FameCipher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAttribKeys ¶
func GenerateAttribKeys(sk *abe.FAMESecKey, attributes []string, fileName string)
func GenerateFAMEKeys ¶
func GenerateFAMEKeys()
func UnmarshalFameAttrKey ¶
func UnmarshalFameAttrKey(data []byte) (*abe.FAMEAttribKeys, error)
Decode a FameKey from a byte array
func UnmarshalFamePrivKey ¶
func UnmarshalFamePrivKey(data []byte) (*abe.FAMESecKey, error)
func UnmarshalFamePubKey ¶
func UnmarshalFamePubKey(data []byte) (*abe.FAMEPubKey, error)
Types ¶
type AeadCipher ¶
AeadCipher is an AEAD cipher
type Cipher ¶
type Cipher interface { Encrypt(uint64, string, string) ([]byte, error) Decrypt(uint64, []byte, []byte) (string, error) }
Cipher is either an AEAD cipher or a CPABE scheme initialized with keys
func CipherAESGCM ¶
Creates a new AESGCM cipher with the given key
func CipherChaChaPoly ¶
Creates a new ChaCha20 Poly1305 AEAD cipher
type CipherFunc ¶
type FameCipher ¶
FameCipher represent the FAME CPABE scheme
func CipherFame ¶
func CipherFame(publisher bool, keyFile string) FameCipher
Creates a new FameCipher object with the given key
func (FameCipher) Decrypt ¶
func (c FameCipher) Decrypt(u uint64, ad, ciphertext []byte) (string, error)
Decrypts a ciphertext generated using the FAME CP-ABE scheme
func (FameCipher) Encrypt ¶
func (c FameCipher) Encrypt(u uint64, policy, msg string) ([]byte, error)
Encrypts a message MSG with a POLICY using the FAME CP-ABE scheme
func (*FameCipher) FameKeygen ¶
func (c *FameCipher) FameKeygen(attributes []string) (*abe.FAMEPubKey, *abe.FAMEAttribKeys)
Click to show internal directories.
Click to hide internal directories.