1

I need to multiply a group element with another group element which doesn't change its value. As the integer multiplication of a pairing group element will alter its value.

group = PairingGroup('SS512')
g= group.random(G1)
g*1 ==> some other pairing group element
g*g_identity = g # Is there any g_identity element defined in charm crypto?
Artjom B.
  • 61,146
  • 24
  • 125
  • 222
  • 1
    What are you trying to do? It's not clear. Can you cite the relevant part from the paper or use better syntax? Why do you need an identity element? All group elements are immutable. – Artjom B. Oct 12 '15 at 06:14
  • i am iterating group elements in a for loop. In that i need to initialize a my group element. If i initialize it as 'integer 1' its product results in a different element. So for initialization purpose i need an identity element. – venkata praneeth Oct 12 '15 at 06:27
  • 1
    I can't reproduce your issue. `g * 1 == g` gives `True` for me. I use charm 0.43 in Python 3.4.2. – Artjom B. Oct 12 '15 at 08:19
  • I am using charm 0.42, in that when you give the element name to the interpreter, it displays it as object. So thought that those are two different objects. `>>> g` `` `>>> g*1` `` Thanks for helping... – venkata praneeth Oct 12 '15 at 11:26
  • A new object is created, but that doesn't mean it has a different value. Use `g.__str__()` and `(g*1).__str__()` to compare the values. – Artjom B. Oct 12 '15 at 11:40

0 Answers0