# How to decompose a public key into subgroups EC?

Is it possible to decompose the public key into its own subgroups? Suppose we know the order P with which the public key was generated (Qx, Qy)

How can the public key (Qx, Qy) be decomposed into subgroups of small orders?

I saw in SageMath it is possible to work with Elliptic Curves

M = EllipticCurve (GF (p), [0.7])


I am just getting familiar with SageMath and am having a hard time working on creating a generator on order. Are there examples of these works?

• A public key is a GROUP ELEMENT, which is a point with coordinates taken from a finite field in elliptical curves, AND NOT a group itself. I don't know what you mean by "decompose public key into its own subgroups". The EC group used is (generally) a large prime order (sub)group in the curve. Which means it has no non-trivial subgroup and every valid public key point generates the entire (sub)group. Oct 22 '21 at 12:12
• Do you mean determine which subgroups it belongs? Well, factor the order of the group and use the Lagrange theorem of each of the factors; if $5$ is a factor and $[5]P = \mathcal{O}$ then the order of $P$ is 5... Oct 22 '21 at 16:05
• @kelalaka Yes, it is kelalaka that I thank for the quick reply. How do I do this in SageMath? I add E = EllipticCurve(GF(p), [0,7]) Grp = E.abelian_group() g = Grp.gens()[0] numElements = g.order() ,but unfortunately I get an error Oct 22 '21 at 20:24
• cardinality and factor? Oct 22 '21 at 20:26
• Note, for direct SageMath errors, there is ask.sagemath.org Oct 22 '21 at 20:37