Skip to content

Exception raised in ecdsa gem, not on jruby-head nor ruby-head #3653

Open
@rickhull

Description

@rickhull

I noticed a discrepancy in behavior between ruby-head and jruby-head on the one hand, and truffleruby-head on the other, via Github Actions.

Here is the GHA that fails only on truffleruby-head: https://github.com/rickhull/nostrb/actions/runs/10637157995/job/29490471421 The outermost test that fails is rake test, which succeeds entirely on ruby-head and jruby-head.

relevant stack trace:

 /home/runner/.rubies/truffleruby-head/lib/gems/gems/ecdsa-1.2.0/lib/ecdsa/prime_field.rb:62:in `inverse': Inversion bug: remainder is not 1. (RuntimeError)
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/ecdsa-1.2.0/lib/ecdsa/point.rb:74:in `add_to_point'
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/ecdsa-1.2.0/lib/ecdsa/point.rb:122:in `multiply_by_scalar'
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/schnorr_sig-0.2.1.1/lib/schnorr_sig/pure.rb:149:in `verify?'
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/schnorr_sig-0.2.1.1/lib/schnorr_sig/pure.rb:97:in `sign'
	from /home/runner/work/nostrb/nostrb/lib/nostrb/event.rb:155:in `sign'

The failure is in the ecdsa gem, here: https://github.com/DavidEGrayson/ruby_ecdsa/blob/master/lib/ecdsa/prime_field.rb#L62

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions