Point

public struct Point : CustomStringConvertible, Equatable

Point instances contain elliptic curve points.

For points in a prime characteristic domain, the x-coordinate and y-coordinate are non-negative integers.

For points in a characteristic 2 domain, the x-coordinate and y-coordinate are binary polynomials where the coefficients (0 or 1) are the bits of the x and y values.

Constants

  • The point at infinity

    Declaration

    Swift

    public static let INFINITY: Point

Initializers

  • Creates a Point from its x- and y-coordinates

    Declaration

    Swift

    public init(_ x: BInt, _ y: BInt)

    Parameters

    x

    The x coordinate

    y

    The y coordinate

Stored Properties

  • x

    The x coordinate

    Declaration

    Swift

    public let x: BInt
  • y

    The y coordinate

    Declaration

    Swift

    public let y: BInt
  • Is true iff self is the point at inifinity

    Declaration

    Swift

    public let infinity: Bool

Computed Properties

  • Textual description of self

    Declaration

    Swift

    public var description: String { get }

Instance Methods

  • Tests equality of Points

    Declaration

    Swift

    public static func == (p1: Point, p2: Point) -> Bool

    Parameters

    p1

    First point

    p2

    Second point

    Return Value

    true iff p1 = p2