Class: H2C::M2C::SSWUAB0

Inherits:
Object
  • Object
show all
Defined in:
lib/h2c/m2c/sswuab0.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(iso, z) ⇒ SSWUAB0

Constructor

Parameters:



11
12
13
14
# File 'lib/h2c/m2c/sswuab0.rb', line 11

def initialize(iso, z)
  @sswu = SSWU.new(iso.e0, z)
  @iso = iso
end

Instance Attribute Details

#isoObject (readonly)

Returns the value of attribute iso.



6
7
8
# File 'lib/h2c/m2c/sswuab0.rb', line 6

def iso
  @iso
end

#sswuObject (readonly)

Returns the value of attribute sswu.



6
7
8
# File 'lib/h2c/m2c/sswuab0.rb', line 6

def sswu
  @sswu
end

Instance Method Details

#map(u) ⇒ ECDSA::Point

Parameters:

  • u (Integer)

Returns:

  • (ECDSA::Point)


19
20
21
22
23
# File 'lib/h2c/m2c/sswuab0.rb', line 19

def map(u)
  p = sswu.map(u)
  coordinate = iso.map(p.x, p.y)
  iso.e1.new_point(coordinate)
end