code: func decompressPoint(curve *KoblitzCurve, x *big.Int, ybit bool) (*big.Int, error) {
  	// TODO: This will probably only work for secp256k1 due to
  	// optimizations.
  
  	// Y = +-sqrt(x^3 + B)
  	x3 := new(big.Int).Mul(x, x)
  	x3.Mul(x3, x)
  	x3.Add(x3, curve.Params().B)
  	x3.Mod(x3, curve.Params().P)
  
  	// Now calculate sqrt mod p of x^3 + B
  	// This code used to do a full sqrt based on tonelli/shanks,
  	// but this was replaced by the algorithms referenced in
  	// https://bitcointalk.org/index.php?topic=162805.msg1712294#msg1712294
  	y := new(big.Int).Exp(x3, curve.QPlus1Div4(), curve.Params().P)
  
  	if ybit != isOdd(y) {
  		y.Sub(curve.Params().P, y)
  	}
  
  	// Check that y is a square root of x^3 + B.
  	y2 := new(big.Int).Mul(y, y)
  	y2.Mod(y2, curve.Params().P)
  	if y2.Cmp(x3) != 0 {
  		return nil, fmt.Errorf("invalid square root")
  	}
  
  	// Verify that y-coord has expected parity.
  	if ybit != isOdd(y) {
  		return nil, fmt.Errorf("ybit doesn't match oddness")
  	}
  
  	return y, nil
  }
docs: // decompressPoint decompresses a point on the given curve given the X point and
  // the solution to use.