.. c:function:: void dipe_init(FILE* configfp, dipe_param_t* param)
Initializes public parameters as well as the PBC library. The
- function allocates data for the `param` structure that needs to be
+ function allocates data for the ``param`` structure that needs to be
freed with :c:func:`dipe_free_param`.
:param configfp: File structure holding the pairing group definition as understood by PBC
.. c:function:: void dipe_master_keygen(dipe_param_t param, size_t dimension, dipe_master_publickey_t* pk, dipe_master_secretkey_t* sk)
- Generate a keypair for an authority. The `dimension` is supposed to
+ Generate a keypair for an authority. The ``dimension`` is supposed to
be a system parameter and needs to be consistently used for all
- operations. The function allocates data for the `pk` and `sk`
+ operations. The function allocates data for the ``pk`` and ``sk``
structures that need to be freed with
:c:func:`dipe_free_master_publickey` and
:c:func:`dipe_free_master_secretkey` respectively.
.. c:function:: void dipe_keygen(dipe_param_t param, dipe_master_secretkey_t msk, char* cid, element_t* y, dipe_secretkey_t* sk)
Issues a secretkey for a used identified by the 16-bit string
- `cid`. The element vector `y` is expected to be an array of
- `dimension` many elements. The function allocates data for the `sk`
+ ``cid``. The element vector ``y`` is expected to be an array of
+ ``dimension`` many elements. The function allocates data for the ``sk``
structure that need to be freed with :c:func:`dipe_free_secretkey`.
:param char* cid: Client ID, expected to be 16 bytes
- :param y: Policy vector for the secret key that is to be generated. Must match with the dimensions when `msk` was generated
+ :param y: Policy vector for the secret key that is to be generated. Must match with the dimensions when ``msk`` was generated
:type y: Array of Zn elements
En-/Decryption
.. c:function:: void dipe_encrypt(dipe_param_t param, dipe_master_publickey_t mpk, element_t* x, size_t ptxt_len, char* ptxt, size_t ctxt_len, char* ctxt)
- Creates a DIPE ciphertext of exactly length `ctxt_len` for a policy
- vector `x` from some plaintext. `ctxt_len` needs to be large enough
- to store `ptxt_len` + :c:func:`dipe_ciphertext_overhead` many bytes
+ Creates a DIPE ciphertext of exactly length ``ctxt_len`` for a policy
+ vector ``x`` from some plaintext. ``ctxt_len`` needs to be large enough
+ to store ``ptxt_len`` + :c:func:`dipe_ciphertext_overhead` many bytes
but may be arbitrarily larger.
:param dipe_param_t param: Public Parameters
.. c:function:: size_t dipe_decrypt(dipe_param_t param, dipe_secretkey_t sk, char* cid, element_t* y, size_t ctxt_len, char* ctxt, char* ptxt)
- Decrypts a DIPE ciphertext. The buffer `ptxt` needs to be able to
- hold at least `ctxt_len` - :c:func:`dipe_ciphertext_overhead` many
+ Decrypts a DIPE ciphertext. The buffer ``ptxt`` needs to be able to
+ hold at least ``ctxt_len`` - :c:func:`dipe_ciphertext_overhead` many
bytes. The function returns the length of the recovered plaintext
- but may modify the remaining bits of the `ptxt` buffer as well.
+ but may modify the remaining bits of the ``ptxt`` buffer as well.
:param dipe_param_t param: Public Parameters
:param dipe_secretkey_t sk: User Secretkey