Privacy preserving electronic ticket scheme with attribute based credentials
def create_credential_proof(attribute_list, blind_factors, nonce): """ Create a zero-knowledge proof that the prover knows secret key values that correspond to the given attributes without revealing those secrets. """ # Generate a nonce (random value) # nonce = random.randrange(2**128) # Commit to the nonce (k) blind_nonce = nonce * g # Commit to the attributes blind_attribute_list = [a * g for a in attribute_list] # Prove knowledge of the secret key values for each attribute proof_list = [] for i in range(len(attribute_list)): proof = zkp.dLog_proof(g, blind_attribute_list[i], attribute_list[i], blind_nonce, blind_factors[i], nonce) proof_list.append(proof) proof_tuple = tuple(proof_list) return