7 .. c:type:: dipe_param_t
9 Stores public parameters used in DIPE. Initialized by :c:func:`dipe_init()` and freed by :c:func:`dipe_free_param`
11 .. c:type:: dipe_master_secretkey_t
12 .. c:type:: dipe_master_publickey_t
13 .. c:type:: dipe_secretkey_t
14 .. c:type:: dipe_ctxt_t
22 .. c:function:: void dipe_init(FILE* configfp, dipe_param_t* param)
24 initializes public parameters as well as the PBC library
26 :param configfp: File structure holding the pairing group definition as understood by PBC
31 .. c:function:: void dipe_master_keygen(dipe_param_t param, size_t dimension, dipe_master_publickey_t* pk, dipe_master_secretkey_t* sk);
33 .. c:function:: void dipe_keygen(dipe_param_t param, dipe_master_secretkey_t msk, char* cid, element_t* y, dipe_secretkey_t* sk);
35 :param cid: Client ID, expected to be 16 bytes
36 :param y: Policy vector for the secret key that is to be generated. Must match with the dimensions when `msk` was generated
37 :type y: Array of Zn elements
42 .. c:function:: void dipe_encrypt(dipe_param_t param, dipe_master_publickey mpk, element_t* x, element_t ptxt, dipe_ctxt_t* ctxt)
43 .. c:function:: void dipe_decrypt(dipe_param_t param, dipe_secretkey_t sk, char* cid, element_t* y, dipe_ctxt_t ctxt, element_t* ptxt)
45 :param result: It is the responsibility of the caller to initialize the element to GT and to free it after usage
46 :type result: :c:type:`element_t`
51 .. c:function:: void dipe_free_param(dipe_param_t param);
52 .. c:function:: void dipe_free_master_secretkey(dipe_master_secretkey_t sk);
53 .. c:function:: void dipe_free_master_publickey(dipe_master_publickey_t pk);
54 .. c:function:: void dipe_free_secretkey(dipe_secretkey_t sk);