I want to compute the XOR of two pairing elements belonging to group GT. However, it seems that XOR operation is not supported but only multiplication(mul) and division(div) operations are supported for pairing element of group GT.
I want to compute the XOR for the same because of the algorithm which I am trying to implement. Below is basically what my algorithm will do in simple sense.
>>> from charm.toolbox.pairinggroup import PairingGroup, GT
>>> group = PairingGroup('SS512')
>>> val1 = group.random(GT)
>>> val2 = group.random(GT)
>>> val = val1 ^ val2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for ^: 'pairing.Element' and 'pairing.Element'
>>>
The val1 and val2 are two pairing elements and I want to compute the XOR operation between them.
Can someone please guide me in this regard? What is the solution for this problem? Any help will be appreciated.
I want to compute the XOR of two pairing elements belonging to group GT. However, it seems that XOR operation is not supported but only multiplication(mul) and division(div) operations are supported for pairing element of group GT.
I want to compute the XOR for the same because of the algorithm which I am trying to implement. Below is basically what my algorithm will do in simple sense.
The
val1
andval2
are two pairing elements and I want to compute the XOR operation between them.Can someone please guide me in this regard? What is the solution for this problem? Any help will be appreciated.