Exception in thread "main" java.lang.IllegalArgumentException: cannot handle supplied parameter spec: must be passed IES parameters at org.bouncycastle.jcajce.provider.asymmetric.ec.IESCipher.engineInit(Unknown Source) at java.base/javax.crypto.Cipher.init(Cipher.java:1296) at java.base/javax.crypto.Cipher.init(Cipher.java:1236) at com.example.Main.main(Main.java:42)
The old version is full of vulnerabilities that's why I must upgrade to the new version.
Any idea why this is not working on the new version?
This code working perfect on version
bcprov-jdk15on 1.70
but on versionbcprov-jdk15to18 1.75
it produce an exception.`import org.bouncycastle.crypto.generators.ECKeyPairGenerator; import org.bouncycastle.jce.provider.BouncyCastleProvider;
import javax.crypto.Cipher; import java.security.Security; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.PublicKey; import java.security.SecureRandom; import java.security.Signature; import java.security.spec.ECGenParameterSpec; import java.util.Base64;
public class Generator {
}`
The exception is :
Exception in thread "main" java.lang.IllegalArgumentException: cannot handle supplied parameter spec: must be passed IES parameters at org.bouncycastle.jcajce.provider.asymmetric.ec.IESCipher.engineInit(Unknown Source) at java.base/javax.crypto.Cipher.init(Cipher.java:1296) at java.base/javax.crypto.Cipher.init(Cipher.java:1236) at com.example.Main.main(Main.java:42)
The old version is full of vulnerabilities that's why I must upgrade to the new version.
Any idea why this is not working on the new version?