Questions tagged [iaik-jce]

IAIK-JCE is a crypto toolkit which means "Institute for Applied Information Processing and Communication - Java Cryptography Extension"

The IAIK Provider for the Java Cryptography Extension (IAIK-JCE) is a set of APIs and implementations of cryptographic functionality, including hash functions, message authentication codes, symmetric, asymmetric, stream, and block encryption, key and certificate management. It supplements the security functionality of the default JDK.

See also the official homepage.

41 questions
5
votes
0 answers

How to generate ECDSA keys with brainpool curve in PKCS11 based SafeNet HSM?

I am trying to generate the ECDSA Keys using brain pool curve at the Safenet HSM. I enabled the user-defined domain parameters at the Safenet HSM and we are facing exception java.security.InvalidAlgorithmParameterException: params must be either a…
Ahmad
  • 1,462
  • 5
  • 17
  • 40
3
votes
2 answers

How to encrypt RSA private key with PBE in PKCS#5 format in Java with IAIK JCE?

I've created an RSA Key Pair. Now, I'm trying to encrypt the private key with a DES algorithm, format it to PKCS#5 and print it on the console. Unfortunately, the generated private key does not work. When I try to use it, after entering the right…
3
votes
1 answer

"Invalid keystore format" on setting keystore for type "JCEKS" for symmetric key encryption

I am trying to use symmetric encryption for securing the communication on jetty-9 using java-8. The cipher suite for this purpose I am using is "TLS_PSK_WITH_AES_128_GCM_SHA256". The implementation for this cipher suite is provided by third party…
3
votes
1 answer

How to initialize provider for pkcs11?

I want to use nss as a provider for pkcs11 and I'm coding in java, on oracle JRE and ubuntu 64bit. I tried 2 different wrappers, iaik and SunPKCS11 but in both I had the same problem. For my provider, I first tried to use libnss3.so and each time I…
Saeed
  • 7,262
  • 14
  • 43
  • 63
2
votes
2 answers

How to get number of password retries in eToken SafeNet by IAIK PKCS#11

I use Java and IAIK to read eToken info. Module pkcs11Module = Module.getInstance("PKCS11.dll"); pkcs11Module.initialize(null); Slot[] slotsWithToken = pkcs11Module.getSlotList(Module.SlotRequirement.TOKEN_PRESENT); log.info("number of…
htan
  • 79
  • 6
2
votes
0 answers

Generate RSA Key with PKCS11

I am trying to generate an RSA-2048 key with my HSM, using PKCS11 standard, It seems to be ok for the private key, but when I try to wrap my public key I get this error : iaik.pkcs.pkcs11.wrapper.PKCS11Exception: CKR_KEY_HANDLE_INVALID Here is the…
zero
  • 43
  • 4
2
votes
1 answer

How to change token label without re-initializing it?

I'm aware of initToken(char[] pin, java.lang.String label) from the IAIK docs. But the function will reset the token and any data in the token would be lost. I just want to change the token label without losing token's content. Is there any way to…
2
votes
1 answer

How a pair privatekey and certificate match together in IAIK PKCS11 Wrapper?

I want to work with a pkcs11 token in java. Thus, I used "IAIK" as a pkcs11 java wrapper. I can search for objects like keys and certificates but I can't find out which key belongs to which certificate. I used "CryptoKi Manager" for search objects…
Mohsen Gorgani
  • 420
  • 4
  • 18
2
votes
2 answers

aws cloudhsm C_FindObjectsInit CKR_ATTRIBUTE_TYPE_INVALID

Using iaik.pkcs.pkcs11 wrapper to communicate with cloudhsm on ubuntu. When trying to retrieve all public keys of class RSAPublicKey I get this exception: iaik.pkcs.pkcs11.wrapper.PKCS11Exception: CKR_ATTRIBUTE_TYPE_INVALID at…
Tom
  • 2,481
  • 1
  • 15
  • 16
2
votes
1 answer

IAIK PKCS#11 Wrapper: ECDH KeyAgreement Example

I try to perform some ECDH key agreement, using the IAIK PKCS#11 wrapper (https://jce.iaik.tugraz.at/sic/Products/Core_Crypto_Toolkits/PKCS_11_Wrapper), explizitly NOT using the JCE provider. So far I did not find any example how to do so,…
Daniel Heldt
  • 417
  • 5
  • 15
2
votes
0 answers

Compression failing with Java Mail API 1.4.5

I'm trying to compress a MIME message using java mail APIs and IAIK. I've written the following code: MimeBodyPart wrappedMessage = new MimeBodyPart(new InternetHeaders(), content); CompressedContent compressed = new…
Piyush
  • 101
  • 4
2
votes
0 answers

JVM Crash: Problematic frame C [libsystem_platform.dylib+0x4caf] _os_lock_corruption_abort+0x0

import iaik.pkcs.pkcs11.Module; import iaik.pkcs.pkcs11.wrapper.CK_SLOT_INFO; import iaik.pkcs.pkcs11.wrapper.PKCS11Connector; import iaik.pkcs.pkcs11.wrapper.PKCS11Exception; import…
dijkstra
  • 1,068
  • 2
  • 16
  • 39
2
votes
0 answers

"SSLHandshakeException: No appropriate protocol" error on running cipher suite enabled jetty server client

I am trying to configure symmetric key cipher suite on embedded jetty v9 (using Java 8). Test server class as follows: import iaik.security.provider.IAIK; import java.io.IOException; import java.security.Security; import…
Manojkumar Khotele
  • 963
  • 11
  • 25
2
votes
1 answer

InvalidKeyException using MSCAPI and IAIK

I use Sun's MSCAPI provider in my application to retrieve a signing certificate. The signer's privatekey is a sun.security.mscapi.RSAPrivateKey. IAIK does not seem to recognize this class (See error below). I do not understand why. What are the…
Cyril Bremaud
  • 117
  • 2
  • 9
1
vote
1 answer

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 using IAIK PKCS11 Wrapper. Below is the process, I…
tulak.hord
  • 63
  • 1
  • 9
1
2 3