Class: BSVShimEC

Inherits:
Object
  • Object
show all
Defined in:
lib/bsv/primitives/openssl_ec_shim.rb

Overview

Shim EC key wrapping a public key point.

The DER-parsing constructor and parse_der class method have been removed. They existed solely to support Curve.ec_key_from_private_bytes and Curve.ec_key_from_public_bytes, which were deleted in the A4 crypto hardening pass (HLR #316). No production code path constructs a BSVShimEC from DER any longer.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(point) ⇒ BSVShimEC

Returns a new instance of BSVShimEC.

Raises:

  • (ArgumentError)


146
147
148
149
150
# File 'lib/bsv/primitives/openssl_ec_shim.rb', line 146

def initialize(point)
  raise ArgumentError, "expected BSVShimECPoint, got #{point.class}" unless point.is_a?(BSVShimECPoint)

  @public_key = point
end

Instance Attribute Details

#public_keyObject (readonly)

Returns the value of attribute public_key.



144
145
146
# File 'lib/bsv/primitives/openssl_ec_shim.rb', line 144

def public_key
  @public_key
end