Add returns the sum of (x1,y1) and (x2,y2).
(x1, y1, x2, y2 *big.Int)
| 130 | |
| 131 | // Add returns the sum of (x1,y1) and (x2,y2). |
| 132 | func (BitCurve *BitCurve) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) { |
| 133 | z := new(big.Int).SetInt64(1) |
| 134 | return BitCurve.affineFromJacobian(BitCurve.addJacobian(x1, y1, z, x2, y2, z)) |
| 135 | } |
| 136 | |
| 137 | // addJacobian takes two points in Jacobian coordinates, (x1, y1, z1) and |
| 138 | // (x2, y2, z2) and returns their sum, also in Jacobian form. |