I am using Charm Crypto for implementation. I want to XOR two elements in G1. I have written the following code and XOR operation is correct but I am getting a list. Can someone tell me how can I convert the list to an element in G1? Hope to hear soon.
Example Code
sigma_m = group.random(G1)
km = group.random(G1)
#XOR Operation
km_bytes = objectToBytes(km, group)
len_km = len(km_bytes)
sigma_bytes = objectToBytes(sigma_m, group)
k1mXORk2m =[]
for i in range(len_km):
k1mXORk2m.append( km_bytes[i] ^ sigma_bytes[i])
orig_k1mXORk2m = objectToBytes(k1mXORk2m, group)
gXOR= bytesToObject (orig_k1mXORk2m, group)
@ArtjomB. I am working on ABE scheme and I have to compare the performance of my designed scheme against ABE scheme based on elliptic curves ABE ECC. In the encryption phase, I have to compute XoR XOR operation of two points on elliptic curves (equations 8 and 9 on page 8). I am not sure how to do that and for this reason posted a question here.