To be clear bitcoinj released a fix for this issue 11 months ago in version 0.16.5.
I doubt they’ve given it much thought. They’re probably just amplifying criticism they’ve heard from within the Bitcoin community.
Nice interview of nostr:npub1hea99yd4xt5tjx8jmjvpfz2g5v7nurdqw7ydwst0ww6vw520prnq6fg9v2 about Sparrow Wallet on JavaFX in Action. Frank Delporte asks good questions about reproducible builds, JavaFX, etc and also gets an introduction to Bitcoin using the Sparrow UI.
And you must mean MessageDigest and NoSuchAlgorithmException. Ai yai, I thought I tested that.
Oh, I see one mistake 🤦♂️. Yeah, that script requires JDK 25+.
In the JBang script? You change from Java 17 to what version? And I wouldn’t think the `import` statement would have to change? I must be missing something.
What did you have to tweak? I thought I had tested everything.
There’s a Nostr workshop in Santa Cruz this month. I’ll probably do it there…
Assuming, of course, that you are running Nix.
Getting started with secp256k1-jdk in a note!
nostr:note13lhmq20lcy5jsxl8v77hgapl6zvuxg5kv5reey7zh7thrnqzfwgsg4u5kk
To run the Schnorr Signature example with JVM:
nix run github:msgilligan/secp256k1-jdk-flake#secp256k1-jdk
To run it the natively-compiled version:
nix run github:msgilligan/secp256k1-jdk-flake#secp256k1-jdk-native
If you want to play with source, do:
nix shell nixpkgs#jbang
enter the below code into a file named SecpEcdsa.java and then `jbang SecpEcdsa.java`.
(Schnorr sig is little trickier to run in JBang because you need libsecp256k installed, but the flakes above handle it.)
——
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17+
//REPOS mavencentral, secpjdk=https://gitlab.com/api/v4/projects/55956336/packages/maven
//DEPS org.bitcoinj.secp:secp-bouncy:0.2
import org.bitcoinj.secp.*;
byte[] message = sha256("Hello World!");
void main() {
IO.println("secp256k1-jdk ECDSA Sample");
try (Secp256k1 secp = Secp256k1.getById("bouncy-castle")) {
var pair = secp.ecKeyPairCreate();
var sig = secp.ecdsaSign(message, pair).get();
var isValid = secp.ecdsaVerify(sig, message, pair.publicKey()).get();
IO.println("Valid ECDSA signature = " + isValid);
}
}
byte[] sha256(String message) {
try {
return MessageDigest.getInstance("SHA-256").digest(message.getBytes());
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e); // Can't happen.
}
}
——
secp256k1-jdk is a modern, functional-style Java API with two implementations for Java, JDK, GraalVM native-image, Kotlin, Scala, etc.
It aims to be the standard library for secp256k1 in the greater JDK/JVM Bitcoin ecosystem.
Thanks to Andreas Schildbach and nostr:npub1hea99yd4xt5tjx8jmjvpfz2g5v7nurdqw7ydwst0ww6vw520prnq6fg9v2 for their help!
Version 0.2 is now available for early integration testing.
Binaries are available in a GitLab Maven repo, but remember: "Don't trust. Verify." This is an experimental pre-release.
Status report

nostr:npub18pudjhdhhp2v8gxnkttt00um729nv93tuepjda2jrwn3eua5tf5s80a699

Yeah, haven’t done the Zap thing yet. I’ll set it up eventually. Should be fun! But I’m on a “mission from Satoshi” right now and focused on other things.
Does that 💯 mean that you can easily run `nix shell` with the latest `nixpkgs-unstable`?
Didn't expect this today: The bitcoin kernel API is now in Bitcoin Core's master branch! A decade of effort for various contributors and three years from myself: https://github.com/bitcoin/bitcoin/pull/30595
Looking forward to an ecosystem of implementations, full nodes, and tools being developed around it!
I know a few Java developers who are very excited about this…
nostr:npub18pudjhdhhp2v8gxnkttt00um729nv93tuepjda2jrwn3eua5tf5s80a699