Computing inverse of BN256 G2 point in golang x/crypto/bn256 library I'm trying to confirm a vulnerability in a signing scheme I'm helping with. To do this I need to simulate a rogue key attack on a BLS aggregate signature using the golang bn256 library https://godoc.org/golang.org/x/crypto/bn256 This requires computing the inverse of a public key.

I'm not a crypto expert but do have a fairly strong algebra background... So if g is the generator of order n then the inverse of p is just p^(n-1) right? But I have no idea what n is.

Any help would be greatly appreciated
Actually, computing an inverse of a point (that is, the inverse of X is the point Y such that X+Y is the identity) is quite easy.

For a curve in Weierstrass format with characteristic > 3 (which bn256 is), the inverse of the point (x, y) is the point (x, -y).  That is, you compute the negation of the y coordinate (which, in this case, is modulo $p$ the characteristic of the curve, as it's a prime curve).

BTW: you stated that you "don't have the time right now ... to learn the basics"; if you want to do anything with Elliptic Curves, I would suggest you take the time (the basics shouldn't take several semesters...)