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
It turns out that the underlying implementation of a Curve point in ECPrivateKeyParameters is different between Secp256k1.java and BcKeyUtils.java (this only manifests as a test failure starting in BouncyCastle v1.74 and above -- broken build here).
For consistency, we should make everything use BcKeyUtils.PARAMS and deprecate Secp256k1 (slated for removal in v4).
Appendix
Test failure
java.lang.AssertionError:
Expecting actual:
org.bouncycastle.crypto.params.ECPrivateKeyParameters@2462cb01
to be equal to:
org.bouncycastle.crypto.params.ECPrivateKeyParameters@19b843ba
when recursively comparing field by field, but found the following 5 differences:
field/property 'parameters.G.curve' differ:
- actual value : org.bouncycastle.math.ec.ECCurve$Fp@61722b91
- expected value: org.bouncycastle.math.ec.custom.sec.SecP256K1Curve@61722b91
org.bouncycastle.math.ec.ECCurve$Fp can't be compared to org.bouncycastle.math.ec.custom.sec.SecP256K1Curve as SecP256K1Curve does not declare all Fp fields, it lacks these: [q, r]
The text was updated successfully, but these errors were encountered:
It turns out that the underlying implementation of a Curve point in
ECPrivateKeyParameters
is different betweenSecp256k1.java
andBcKeyUtils.java
(this only manifests as a test failure starting in BouncyCastle v1.74 and above -- broken build here).For consistency, we should make everything use
BcKeyUtils.PARAMS
and deprecateSecp256k1
(slated for removal in v4).Appendix
Test failure
The text was updated successfully, but these errors were encountered: