JHUISI / charm

Charm: A Framework for Rapidly Prototyping Cryptosystems
http://charm-crypto.io
GNU Lesser General Public License v3.0
542 stars 166 forks source link

Get coordinates from group element #242

Open andreaferretti opened 4 years ago

andreaferretti commented 4 years ago

I am trying to extract the coordinate from a group element

from charm.toolbox.pairinggroup import PairingGroup, GT

pairing_group = PairingGroup('SS512')
msg = pairing_group.random(GT)
msg

prints (in this case)

[8416277314109678377741357126193121170097155748484043797974496904533399351152501306344631327015136817549829485001376614748001867214897179873492877324043908, 4713724079419660427971901763120587231848329837211638412293927556609649503969507319503904349862209510391821733453175025074648569119238159918004386517169222]

How do I get the x, y coordinates of msg? msg[0] fails, as all my other attempts