1

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.

Aisha
  • 127
  • 10
  • @halfer Can you help me in this? – Aisha Jul 31 '17 at 20:22
  • @sathiyarajan Can you help? – Aisha Jul 31 '17 at 20:23
  • XOR is not an operation that pairing groups are designed to do. You'll likely need to XOR the X coordinates of the two points and hope that the result is still a valid X coordinate from which you can derive the Y coordinate and get a point. You'll have a hard time doing this in Charm. – Artjom B. Aug 28 '17 at 08:58

0 Answers0