Jonas A
02/20/2024, 7:53 PM// ALGORAND BLOCKCHAIN
// <https://mvnrepository.com/artifact/com.algorand/algosdk>
implementation group: 'com.algorand', name: 'algosdk', version: '2.4.0'
new cryptographic capabilites for creating an account from public/private key, namely
Ed25519
are needed, that seem to not be part of Java 11, so the Algorand SDK complains with
java.security.NoSuchAlgorithmException: Ed25519 KeyPairGenerator not available
at java.base/java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:236)
Now, ChatGPT says Ed25519 it’s delivered as default in Java 15, but when I tried sdk default java 17.0.10-amzn with my Grails grailsVersion=6.0.0 app, that failed.
Even the latest Grails version 6.2 seems to be building on java 1.11, b/c sourceCompatibility = “1.11"
targetCompatibility = “1.11” in
https://github.com/grails/grails-core/blob/6.2.x/build.gradle
How can I use Ed25519 in Grails App 6.0.0 or up (can upgrade, no problem)?
The Grails release notes seem to be telling me, that Grails 7 will start to build on JDK 17, but cannot wait that long.
Any help, as always, very much appreciated. Have a nice day!
addition: this solution (by chatGPT) doesn’t work either, because somewhere in my GSPs I now get security errors:
// Using BouncyCastleProvider for Ed25518 workaround (needed for Algorand) also in Java 11 with Grails 6 (normally only comes since Java 15)
implementation 'org.bouncycastle:bcprov-jdk15on:1.68'
Have this in my AlgorandBlockchainService.groovy
static {
if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
Security.addProvider(new BouncyCastleProvider());
}
}mattias_reichel
02/20/2024, 8:18 PMgaolei
02/20/2024, 9:31 PMAri Bustamante
02/20/2024, 10:02 PMJonas A
02/21/2024, 10:48 AMJonas A
02/21/2024, 11:27 AM