Does JKS supports keys created by Post Quantum algorithms like dilithium3?

147 Views Asked by At

I am trying to add my .pfx file to JKS using keytool command and its working with keys generated using RSA but not with keys generated using dilithium algorithm

command : keytool -importkeystore -srckeystore combined.pfx -srcstoretype PKCS12 -destkeystore keystore.jks

error : keytool error: java.security.UnrecoverableKeyException: Get Key failed: 1.3.6.1.4.1.2.267.7.8.7 KeyFactory not available

1

There are 1 best solutions below

0
On

It is possible to create a JKS keystores using dilithium3 post quantum algorithm. You need to have bouncycastle bcprov-jdk180n latest version Jar to be used as provider.

keytool -genkeypair -alias your_alias -storetype JKS -keyalg DILITHIUM3 -sigalg DILITHIUM3 -keystore your_keystore.jks -validity 365 -storepass your_keystore_password -keypass your_key_password -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath /path/to/bcprov-jdk18on.jar