class ECC::Group

Attributes

g[R]
n[R]

Public Class Methods

new( g:, n: ) click to toggle source

add generator alias for g - why? why not? add order alias for n - why? why not?

# File lib/elliptic-lite/base.rb, line 57
def initialize( g:, n: )
  @g, @n = g, n

  ## note: generator point (scalar multiplied by n - group order results in infinity point)
  ## pp @n*@g  #=> Point(:infinity)
end

Public Instance Methods

point( *args ) click to toggle source

note: get point class from generator point

# File lib/elliptic-lite/base.rb, line 65
def point( *args )  @g.class.new( *args );  end