Documentation ¶
Index ¶
- func Decrypt(cipthertext CipherText, userPrivateKey UserPrivateKey, pk PublicKey) *pbc.Element
- func DecryptFile(input_path string, output_path string, M *pbc.Element)
- func EncryptFile(input_path string, output_path string, pairing *pbc.Pairing) *pbc.Element
- func ExportCipherText(cipher CipherText, path string)
- func ExportMasterSecretKey(msk MasterSecretKey, path string)
- func ExportPublicKey(pk PublicKey, path string)
- func ExportUserPrivateKey(upk UserPrivateKey, path string)
- func ImportAttributes(path string) []string
- func Setup() (PublicKey, MasterSecretKey)
- type AccesPolicy
- type CipherText
- type CipherTextExport
- type MasterSecretKey
- type MasterSecretKeyExport
- type Node
- type NodeExport
- type NodeType
- type PublicKey
- type PublicKeyExport
- type UserPrivateKey
- type UserPrivateKeyExport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(cipthertext CipherText, userPrivateKey UserPrivateKey, pk PublicKey) *pbc.Element
func EncryptFile ¶
func ExportCipherText ¶
func ExportCipherText(cipher CipherText, path string)
func ExportMasterSecretKey ¶
func ExportMasterSecretKey(msk MasterSecretKey, path string)
func ExportPublicKey ¶
func ExportUserPrivateKey ¶
func ExportUserPrivateKey(upk UserPrivateKey, path string)
func ImportAttributes ¶
Types ¶
type AccesPolicy ¶
type AccesPolicy struct { ElemType NodeType Attribute string Children []*AccesPolicy }
func ImportAccessPolicy ¶
func ImportAccessPolicy(path string) AccesPolicy
type CipherText ¶
func Encrypt ¶
func Encrypt(pk PublicKey, M *pbc.Element, accesPolicy *AccesPolicy) CipherText
func ImportCiphertext ¶
func ImportCiphertext(path string, pairing *pbc.Pairing) CipherText
type CipherTextExport ¶
type CipherTextExport struct { RootNode *NodeExport Ctilda []byte C []byte }
type MasterSecretKey ¶
Structure to represent the master secret key
func ImportMasterSecretKey ¶
func ImportMasterSecretKey(path string, pairing *pbc.Pairing) MasterSecretKey
type MasterSecretKeyExport ¶
type NodeExport ¶
type PublicKey ¶
type PublicKey struct { Params *pbc.Params Pairing *pbc.Pairing G *pbc.Element H *pbc.Element F *pbc.Element EggAlpha *pbc.Element }
Structure to represent the public key
func ImportPublicKey ¶
type PublicKeyExport ¶
type UserPrivateKey ¶
Structure to represent the user's private key
func ImportUserPrivateKey ¶
func ImportUserPrivateKey(path string, pairing *pbc.Pairing) UserPrivateKey
func KeyGen ¶
func KeyGen(pk PublicKey, msk MasterSecretKey, attributes []string) UserPrivateKey
Generate a private key for a user with the specified attributes
Click to show internal directories.
Click to hide internal directories.