abenc_accountability_jyjxgd20¶
ABE with Privacy Protection and Accountability (JYJXGD20)
Authors: Jiguo Li, Yichen Zhang, Jianting Ning, Xinyi Huang, Geong Sen Poh, Debang Wang
Scheme Properties
Type: ciphertext-policy attribute-based encryption (public key)
Setting: Pairing groups
Assumption: Decisional Bilinear Diffie-Hellman
Implementation
- Authors:
Ahmed Bakr
- Date:
08/2023
- class abenc_accountability_jyjxgd20.Attribute(attr_name, values_list: List[str] = [])[source]¶
Bases:
object
- class abenc_accountability_jyjxgd20.CP_Hiding_ABE(group_obj)[source]¶
Bases:
ABEncCipher text policy hiding attribute based encryption (Section 3 in the paper).
- decrypt(CT, PK, SK)[source]¶
Decrypt a cipher text. This algorithm is performed by a data user who has the required attributes to decipher the ciphertext that was encrypted using an access policy. Inputs:
CT: Cipher text.
PK: Public parameters and the public key of the TA.
SK: User’s secret key.
- Outputs:
m: The original decrypted message.
- encrypt(m, PK, access_policy: Dict[str, List[str]])[source]¶
Encrypt a message using an access policy. This function is performed by a data user who wants to encrypt his message with an access policy. They consider only and-gates in their policy. Note: The access policy is hidden into the ciphertext. Inputs:
PK: Public parameters and the public key of the TA.
m: Message to be encrypted in G_T.
- access_policy: Access policy that will be used to encrypt the message. It has to be and gated policy,
which means that each attribute can have only one value.
- Outputs:
CT: Cipher text.
- key_gen(MSK, PK, attributes_list)[source]¶
Key generation for a user based on his list of attributes. This algorithm is performed by TA. Inputs:
MSK: Master Secret Key of the TA.
PK: Public parameters and the public key of the TA.
- attributes_list: List of attributes held by this user, where each attribute is in the format:
‘attrName_value’
- Outputs:
SK: User’s secret key.
- class abenc_accountability_jyjxgd20.CP_Hiding_Accountability_ABE(group_obj)[source]¶
Bases:
CP_Hiding_ABECipher text policy hiding attribute based encryption (Section 4 in the paper).
- decrypt(CT, PK, SK)[source]¶
Decrypt a cipher text. This algorithm is performed by a data user who has the required attributes to decipher the ciphertext that was encrypted using an access policy. Inputs:
CT: Cipher text.
PK: Public parameters and the public key of the TA.
SK: User’s secret key.
- Outputs:
m: The original decrypted message.
- encrypt(m, PK, access_policy: Dict[str, List[str]])[source]¶
Encrypt a message using an access policy. This function is performed by a data user who wants to encrypt his message with an access policy. They consider only and-gates in their policy. Note: The access policy is hidden into the ciphertext. Inputs:
PK: Public parameters and the public key of the TA.
m: Message to be encrypted in G_T.
- access_policy: Access policy that will be used to encrypt the message. It has to be and gated policy,
which means that each attribute can have only one value.
- Outputs:
CT: Cipher text.
- key_gen(MSK, PK, ID, attributes_list)[source]¶
Key generation for a user based on his list of attributes. This algorithm is performed by TA and the user. Part of the key generation is executed as an interaction between the user and the TA, as the user generates a random number (k) that he does not share with the TA. However, he shares with it w**k, and proves knowledge of (k) to TA using any ZKP algorithm. Inputs:
MSK: Master Secret Key of the TA.
PK: Public parameters and the public key of the TA.
ID: User’s unique identifier.
- attributes_list: List of attributes held by this user, where each attribute is in the format:
‘attrName_value’
- Outputs:
SK: User’s secret key.
- key_gen_TA(MSK, PK, ID, R, attributes_list)[source]¶
Key generation for a user based on his list of attributes. This algorithm is performed by TA and the user. Part of the key generation is executed as an interaction between the user and the TA, as the user generates a random number (k) that he does not share with the TA. However, he shares with it w**k, and proves knowledge of (k) to TA using any ZKP algorithm. Inputs:
MSK: Master Secret Key of the TA.
PK: Public parameters and the public key of the TA.
ID: User’s unique identifier.
R: w ** k, where (w) is a public point on the curve, and (k) is the secret KFN selected by the user.
- attributes_list: List of attributes held by this user, where each attribute is in the format:
‘attrName_value’
- Outputs:
SK: User’s secret key.
- setup(attributes_dict: Dict[str, List[str]])[source]¶
System Setup algorithm. This algorithm is performed by TA. Inputs:
None
- Outputs:
MSK: TA’s master secret key.
PK: Public Parameters.
- trace(SK_suspected, authentic_user_IDs_list, PK)[source]¶
Trace function is executed by the auditor. The auditor checks the suspected SK and determines who is misbehaving : the user who owns SK or the TA. If this function is called, it means that either the user or the TA is
misbehaving. The trigger how this function is triggered and how the malicious activity is detected is out of this paper’s scope.
- Inputs:
- SK_suspected: Secret key of the suspected user under the white box model, which means that it has access
to the full secret key of the user.
- authentic_user_IDs_list: A list of the authentic user IDs issued by a trusted third party outside the
system.
PK: Public parameters and the public key of the TA.
- Outputs:
- {‘user’: True/False,
‘TA’: True/False} ; Only one of them will be true and the other will be false.
- class abenc_accountability_jyjxgd20.ShnorrInteractiveZKP[source]¶
Bases:
objectShnorr’s Interactive ZKP
- class Prover(secret_x, groupObj)[source]¶
Bases:
object
- class Verifier(groupObj)[source]¶
Bases:
object- create_verifier_challenge()[source]¶
This function is executed by the verifier after he had received the value u from the prover to send a challenge value to the prover.
- is_proof_verified(z, pk, u, h)[source]¶
4) This function is executed by the verifier to verify the authenticity of the proof sent by the prover z: Created by the prover in create_proof function u: Created by the prover in create_prover_commitments function h: g^x, where x is the secret key of the prover that he wants to prove that he knows it.