30 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
561
views
How to delete public keys from a PKCS#11 security token in Java?
I would like modify a software which was written in Java. The software should be able to create public and private keys on a HSM and also be able to delete them. I would like to do these tasks by ...
-1
votes
1
answer
59
views
Chrome Messaging Host: How to ignore app standard output
I have a Chrome Native Messaging Host application writed in Java 8, running on MacOS, that uses SunPKCS11 to read digital certificates from a cryptographic USB token.
String providerConfig = "...
2
votes
0
answers
155
views
Why does it show "do not have RSA/ECB/PKCS1Padding algorithm" when using PCKS11 Provider with opensc?
I want to finish a class to encrypt and decrypt by using HSM and SUN PKCS11 Provider,so I choose opensc to be my PKCS11 driver and use PKCS15 tool to initial my HSM.And I create a pair of RSA key and ...
0
votes
0
answers
855
views
java.security.ProviderException: Initialization failed
I am writing a java program that needs to read a USB Token Flash Private Key to do something, but I got stuck in the first phase of this program and it throws Error like this:
Exception in thread &...
1
vote
1
answer
244
views
Document altered/corrupted while attaching IAIK PKCS11 signing Hash
I have a base64 encoded message digest (signing bytes of a pdf), which I want to sign and return PKCS7. Previously, I was using SUNPKCS11 and was able to attach the same to the pdf.
I have started ...
0
votes
0
answers
88
views
Why signed data using two methods do not match?
I created a CSR file and a private key PEM file used the following command in openSSL
openssl req -new -utf8 -nameopt multiline,utf8 -config rahat.cnf -newkey rsa:2048 -nodes -keyout rahat.key -out ...
1
vote
1
answer
635
views
Initialization of SunPKCS11 provider dynamically with OpenJDK 8 failed
I tried to initialized dynamically SunPKCS11 provider using OpenJDK 8 1.8.0_322 (on Linux) but get the following exception:
java.lang.ExceptionInInitializerError
at AES256.init(AES256.java:26)
at ...
1
vote
0
answers
265
views
java.security.ProviderException: Could not create trust object
I have Java application running on two different servers. On the 1st server while the application is trying to insert a X.509 certificate to NSS keystore it is getting the following error:
Failed to ...
1
vote
1
answer
969
views
PKCS11 does not recognize new slot created in softhsm in runtime
I have a piece of code to import key and certificate into hsm using java. The problem is that when I run the java back-end to execute that api, it is ok when using the slots which were created before. ...
0
votes
1
answer
2k
views
PKCS11Exception: CKR_MECHANISM_INVALID How to integrate Java and PKCS11 and GCP Cloud KMS?
I'm trying to use GCP Cloud KMS for establishing mTLS. For this purpose I'm preparing PoC of integration Java + JCE + PKCS11 + Cloud KMS integration lib + GCP Cloud KMS.
Stack:
OpenJDK 1.8
SunPKCS11 ...
0
votes
1
answer
620
views
Signature generation with OpenSC Smart Card
I have Escrypt Smart Card to sign data bytes and get signature and certificate for it.
I have java tool to do it and everything was fine until Java 8. Now application migrated to Java 11. And problem ...
2
votes
0
answers
2k
views
java.security.KeyStoreException: PKCS11 not found Caused by: java.security.NoSuchAlgorithmException: no such algorithm: PKCS11 for provider SunPKCS11
I have recently migrated from Java8 to Java11. The below piece of code is giving an issue:
One of my methods to load the provider looks like below:
Provider prototype = Security.getProvider(&...
2
votes
1
answer
3k
views
How to initialize the PKCS11 provider without using SunPKCS11?
I have a problem and I tried searching a solution but couldn't find it. Someone please help me, thanks you so much.
String pkcs11Config = "name=CA-Token\nlibrary=C:/java/CA-Token_v2.dll\nslot=1&...
1
vote
1
answer
774
views
SunPKCS11 usage against HSM without CKO_CERTIFICATE
My problem concern the usage of an hsm with Java (openjdk 11.0.12).
Hsm should be use for signature purpose, by SHA512 RSA algorithm.
I could be wrong in a lot of the following sentences, I'm totally ...
2
votes
1
answer
161
views
SunPKCS11 is removing duplicate key entries
I'm using SunPKCS11 security provider to store key entries (certificate + private key) into a nShield HSM using the setKeyEntry method but when I store the same certificate with different aliases the ...