You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library sometimes produces a different result than the btcsuite implementation. For example:
test"mult that fails"dok=bin("1111111111111111111111111111111111111111111111111111111111111111")x=31855367722742370537280679280108010854876607759940877706949385967087672770343y=46659058944867745027460438812818578793297503278458148978085384795486842595210p=Secp256k1.Point.new(Secp256k1.Secp256k1Curve,x,y)p=Secp256k1.Point.mult(p,as_uint(k))assertp.x==54221562124304953885180771592460698670019519428706259911404568629517370541567assertp.y==41503598524832693408649273746083320222793867734891856875367632750649152059192endtest"mult that passes"dok=bin("1212121212121212121212121212121212121212121212121212121212121212")x=63982838722979151810905110027192376571325135238113748936948631759147324327927y=17180151785156071809562681746353818655281144606192631545001595874213337763680p=Secp256k1.Point.new(Secp256k1.Secp256k1Curve,x,y)p=Secp256k1.Point.mult(p,as_uint(k))assertp.x==111804478433660530705186081768070827849460643277644950589351528573593999580785assertp.y==60380851274475674924967971953847652042604723681086380245173273372347822570512enddefas_uint(<<i::unsigned-size(256)>>),do: idefpbin(h)doBase.decode16!(h,case: :lower)end
You will notice that in the failing example the y point that the elixir implementation is returning is negative. I think all results are supposed to be positive.
The text was updated successfully, but these errors were encountered:
btcd and lnd both use this function for multiplying a public key point by a private key:
https://github.com/btcsuite/btcd/blob/master/btcec/btcec.go#L758
This library sometimes produces a different result than the btcsuite implementation. For example:
You will notice that in the failing example the y point that the elixir implementation is returning is negative. I think all results are supposed to be positive.
The text was updated successfully, but these errors were encountered: