CiFEr
|
This is a decentralized inner-product predicate encryption scheme by Yan Michalevsky and Marc Joye: "Decentralized Policy-Hiding Attribute-Based Encryption with Receiver Privacy". More...
Go to the source code of this file.
Data Structures | |
struct | cfe_dippe |
struct | cfe_dippe_cipher |
struct | cfe_dippe_pub_key |
struct | cfe_dippe_sec_key |
struct | cfe_dippe_user_sec_key |
Typedefs | |
typedef struct cfe_dippe | cfe_dippe |
typedef struct cfe_dippe_cipher | cfe_dippe_cipher |
typedef struct cfe_dippe_pub_key | cfe_dippe_pub_key |
typedef struct cfe_dippe_sec_key | cfe_dippe_sec_key |
typedef struct cfe_dippe_user_sec_key | cfe_dippe_user_sec_key |
This is a decentralized inner-product predicate encryption scheme by Yan Michalevsky and Marc Joye: "Decentralized Policy-Hiding Attribute-Based Encryption with Receiver Privacy".
typedef struct cfe_dippe_cipher cfe_dippe_cipher |
cfe_dippe_cipher represents the ciphertext of the DIPPE scheme
typedef struct cfe_dippe_pub_key cfe_dippe_pub_key |
cfe_dippe_pub_key represents the public key of the DIPPE scheme
typedef struct cfe_dippe_sec_key cfe_dippe_sec_key |
cfe_dippe_sec_key represents the secret key of the DIPPE scheme
typedef struct cfe_dippe_user_sec_key cfe_dippe_user_sec_key |
cfe_dippe_sec_key represents the user secret key of the DIPPE scheme
void cfe_dippe_init | ( | cfe_dippe * | dippe, |
size_t | assump_size | ||
) |
Initializes the DIPPE scheme and generates the global parameters
dippe | A pointer to a cfe_dippe struct |
assump_size | The size of the underlying assumption |
void cfe_dippe_free | ( | cfe_dippe * | dippe | ) |
Clears the scheme and frees allocated memory
dippe | A pointer to a cfe_dippe struct |
cfe_error cfe_dippe_attribute_vector_init | ( | cfe_vec * | av, |
size_t | num_attrib, | ||
size_t | pattern[], | ||
size_t | pat_len | ||
) |
Prepares an attribute vector
av | A pointer to a cfe_vec struct; Represents the resulting attribute vector |
num_attrib | Number of attributes |
pattern | Array of indices to define the attribute vector |
pat_len | Length of the pattern array |
cfe_error cfe_dippe_exact_threshold_policy_vector_init | ( | cfe_vec * | pv, |
cfe_dippe * | dippe, | ||
size_t | num_attrib, | ||
size_t | pattern[], | ||
size_t | pat_len, | ||
size_t | threshold | ||
) |
Prepares an exact threshold policy vector
pv | A pointer to a cfe_vec struct; Represents the resulting policy vector |
dippe | A pointer to a cfe_dippe struct |
num_attrib | Number of attributes |
pattern | Array of indices to define the policy vector |
pat_len | Length of the pattern array |
threshold | Threshold value |
void cfe_dippe_cipher_init | ( | cfe_dippe_cipher * | cipher, |
cfe_dippe * | dippe, | ||
size_t | pol_size | ||
) |
Prepares a cipher struct
cipher | A pointer to a cfe_dippe_cipher struct |
dippe | A pointer to a cfe_dippe struct |
pol_size | Length of the cipher |
void cfe_dippe_cipher_free | ( | cfe_dippe_cipher * | cipher | ) |
Clears the ciphertext and frees allocated memory
cipher | A pointer to a cfe_dippe_cipher struct |
void cfe_dippe_pub_key_init | ( | cfe_dippe_pub_key * | pk, |
cfe_dippe * | dippe | ||
) |
Prepares a public key struct
pk | A pointer to a cfe_dippe_pub_key struct |
dippe | A pointer to a cfe_dippe struct |
void cfe_dippe_pub_key_free | ( | cfe_dippe_pub_key * | pk | ) |
Clears the public key and frees allocated memory
pk | A pointer to a cfe_dippe_pub_key struct |
void cfe_dippe_sec_key_init | ( | cfe_dippe_sec_key * | sk, |
cfe_dippe * | dippe | ||
) |
Prepares a secret key struct
sk | A pointer to a cfe_dippe_sec_key struct |
dippe | A pointer to a cfe_dippe struct |
void cfe_dippe_sec_key_free | ( | cfe_dippe_sec_key * | sk | ) |
Clears the secret key and frees allocated memory
sk | A pointer to a cfe_dippe_sec_key struct |
void cfe_dippe_user_sec_key_init | ( | cfe_dippe_user_sec_key * | usk, |
cfe_dippe * | dippe | ||
) |
Prepares a user secret key struct
usk | A pointer to a cfe_dippe_user_sec_key struct |
dippe | A pointer to a cfe_dippe struct |
void cfe_dippe_user_sec_key_free | ( | cfe_dippe_user_sec_key * | usk | ) |
Clears the user secret key and frees allocated memory
usk | A pointer to a cfe_dippe_user_sec_key struct |
void cfe_dippe_generate_master_keys | ( | cfe_dippe_pub_key * | pk, |
cfe_dippe_sec_key * | sk, | ||
cfe_dippe * | dippe | ||
) |
Initializes an authority and generates its public and private key
pk | A pointer to a cfe_dippe_pub_key struct; Represents the public key that is about to be populated |
sk | A pointer to a cfe_dippe_sec_key struct; Represents the secret key that is about to be populated |
dippe | A pointer to a cfe_dippe struct |
cfe_error cfe_dippe_encrypt | ( | cfe_dippe_cipher * | cipher, |
cfe_dippe * | dippe, | ||
cfe_dippe_pub_key * | pks[], | ||
size_t | pks_len, | ||
cfe_vec * | pv, | ||
FP12_BN254 * | msg | ||
) |
Encrypts a given message under the provided policy
cipher | A pointer to a cfe_dippe_cipher struct; Represents the ciphertext that is about to be populated |
dippe | A pointer to a cfe_dippe struct |
pks | An array containing references to cfe_dippe_pub_key structs; |
pks_len | Length of the public key array |
pv | A reference to a cfe_vec struct; Represents the policy under which the message will be encrypted |
msg | A reference to a FP12_BN254 struct; Represents the message that is about to be encrypted |
cfe_error cfe_dippe_keygen | ( | cfe_dippe_user_sec_key * | usk, |
cfe_dippe * | dippe, | ||
size_t | usk_id, | ||
cfe_dippe_pub_key * | pks[], | ||
size_t | pks_len, | ||
cfe_dippe_sec_key * | sk, | ||
cfe_vec * | av, | ||
char * | gid, | ||
size_t | gid_len | ||
) |
Used with an authority's secret key to create a new user secret key for a given attribute vector
usk | A pointer to a cfe_dippe_user_sec_key struct; Represents the user secret key that is about to be populated |
dippe | A pointer to a cfe_dippe struct |
usk_id | Index of the given attribute vector for which a user secret key will be created |
pks | An array containing references to cfe_dippe_pub_key structs |
pks_len | Length of the public key array |
sk | Secret key |
av | A pointer to a cfe_vec struct; Represents the attribute vector |
gid | String that represents a unique user; Required for collusion prevention |
gid_len | Length of gid to prevent non NULL terminated strings |
cfe_error cfe_dippe_decrypt | ( | FP12_BN254 * | result, |
cfe_dippe * | dippe, | ||
cfe_dippe_user_sec_key * | usks, | ||
size_t | usks_len, | ||
cfe_dippe_cipher * | cipher, | ||
cfe_vec * | av, | ||
char | gid[], | ||
size_t | gid_len | ||
) |
Restores the underlying message of a given ciphertext
result | A pointer to a FP12_BN254 struct; Represents the resulting message |
dippe | A pointer to a cfe_dippe struct |
usks | An array containing cfe_dippe_user_sec_key structs; Represents the set of user secretes key used for decryption |
usks_len | Length of the user secret key array |
cipher | A pointer to a cfe_dippe_cipher struct; Represents the ciphertext that is about to be decrypted |
av | A pointer to a cfe_vec struct; Represents the attribute vector |
gid | String that represents a unique user; Required for collusion prevention |
gid_len | Length of gid to prevent non NULL terminated strings |