code: func (e *G1) Unmarshal(m []byte) ([]byte, error) {
  	// Each value is a 256-bit number.
  	const numBytes = 256 / 8
  	if len(m) < 2*numBytes {
  		return nil, errors.New("bn256: not enough data")
  	}
  	// Unmarshal the points and check their caps
  	if e.p == nil {
  		e.p = &curvePoint{}
  	} else {
  		e.p.x, e.p.y = gfP{0}, gfP{0}
  	}
  	var err error
  	if err = e.p.x.Unmarshal(m); err != nil {
  		return nil, err
  	}
  	if err = e.p.y.Unmarshal(m[numBytes:]); err != nil {
  		return nil, err
  	}
  	// Encode into Montgomery form and ensure it's on the curve
  	montEncode(&e.p.x, &e.p.x)
  	montEncode(&e.p.y, &e.p.y)
  
  	zero := gfP{0}
  	if e.p.x == zero && e.p.y == zero {
  		// This is the point at infinity.
  		e.p.y = *newGFp(1)
  		e.p.z = gfP{0}
  		e.p.t = gfP{0}
  	} else {
  		e.p.z = *newGFp(1)
  		e.p.t = *newGFp(1)
  
  		if !e.p.IsOnCurve() {
  			return nil, errors.New("bn256: malformed point")
  		}
  	}
  	return m[2*numBytes:], nil
  }
docs: // Unmarshal sets e to the result of converting the output of Marshal back into
  // a group element and then returns e.