You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from charm.toolbox.pairinggroup import PairingGroup, ZR
import math
r = group.random(ZR)
base = 10 # or whatever you need
int_r = int(r)
log_r = math.log(int_r, base)
In my project, I want to do a logarithm operation. But it will report an error message "TypeError : must be real number, not pairing.Element".
r = group.random(ZR)
math.log( r, g )
I don't know how to transform the pairing.Element to real number or integer. Does anyone have the same problem?
The text was updated successfully, but these errors were encountered: