Skip to content

group.init(ZR, 1) seems not to be the unit element of ZR #326

@BatchClayderman

Description

@BatchClayderman

I just wonder why a ZR element multiplied by the unit element of ZR does not equal the ZR element itself. I also tested G1, G2, and GT, and they seemed correct. This only occurs in ZR. Thanks a lot.

Python 3.12.3 (main, Feb  4 2025, 14:48:35) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from charm.toolbox.pairinggroup import PairingGroup, G1, G2, GT, ZR, pair, pc_element as Element
>>> group = PairingGroup("MNT159")
>>> a = group.random(ZR)
>>> a
188815440526010565054965130509425098763942272676
>>> a * group.init(ZR, 1)
156580808495405483017373581644025127177670904615
>>> a * group.init(ZR, 1) == a
False

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions