Caustic v0.1.4 Caustic.ECPoint View Source

Represents an elliptic curve point y^2 = x^3 + ax + b

Link to this section Summary

Functions

Addition of points in an elliptic curve

Find points on an elliptic curve

Link to this section Functions

Addition of points in an elliptic curve.

Examples

iex> Caustic.ECPoint.add(Caustic.ECPoint.make(-1, -1, 5, 7), Caustic.ECPoint.infinity(5, 7))
{-1, -1, 5, 7}
iex> Caustic.ECPoint.add(Caustic.ECPoint.infinity(5, 7), Caustic.ECPoint.make(-1, -1, 5, 7))
{-1, -1, 5, 7}
iex> Caustic.ECPoint.add(Caustic.ECPoint.make(-1, 1, 5, 7), Caustic.ECPoint.make(-1, -1, 5, 7))
{nil, nil, 5, 7}

Find points on an elliptic curve.

Examples

iex> Caustic.ECPoint.find_points(-100, 5, 7)
[]
iex> Caustic.ECPoint.find_points(-1.0, 5, 7)
[{-1.0, 1.0, 5, 7}, {-1.0, -1.0, 5, 7}]