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
1
vote
0 answers

How to perform ECDH with IAIK PKCS#11 Wrapper

I am trying to use IAIK PKCS#11 wrapper to perform ECDH key agreement. I can see that there is a class of the parameters: EcDH1KeyDerivationParameters. But I don't see any classes of the keys for ECDH:…
Fan Zhang
  • 139
  • 1
  • 2
  • 3
1
vote
0 answers

sun.security.x509.X509CertImpl cannot be cast to iaik.x509.X509Certificate

i extracted a certificate from a JKS keystore and attempted to cast it to iaik.x509.X509Certificate. it failed with sun.security.x509.X509CertImpl cannot be cast to iaik.x509.X509Certificate. is there a way to write it to iaik.x509.X509Certificate…
Olaoluwa
  • 66
  • 12
1
vote
1 answer

Extract key Value form HSM

I have created an AES key in my HSM, and I would like to get the key value, I tried C_FindObjects but it only return the key hundel. public long Find_AES_Key(String label) { long hkey = -1L; try { …
zero
  • 43
  • 4
1
vote
0 answers

IAIK toolkit for android

I have an web application that does the signing using IAIK framework which is purely java based framework.The keystore is of type PKCS#12. In web application I am using applets to do the signing. Our New requirement is to create a mobile app to do…
1
vote
2 answers

CKR_DEVICE_ERROR using iaik for digital signature

I'm try to develop a Java Application that is able to do the digital signature on a file with smart card. I set the PKCS#11 provider in this way: Security.addProvider(new IAIK()); Properties providerProperties = new…
user3632773
  • 11
  • 1
  • 4
1
vote
1 answer

Generate AES key through IAIK PKCS#11 wrapper and show its value

I would like to use PKCS#11 compatible cryptographic USB token to generate AES key and show its value on screen. For that purpose I want to use IAIK PKCS#11 wrapper. I tried to generate the key by the example provided with IAIK package but with no…
user1563721
  • 1,373
  • 3
  • 28
  • 46
1
vote
3 answers

iaik pkcs#11 wrapper and java.lang.NoSuchMethodError

I am trying to run a simple sample code from iaik pkcs#11 wrapper (version 1.3, the latest atm) but get NoSuchMethodError on pkcs11Module.initialize call. Module pkcs11Module = Module.getInstance("siecap11"); pkcs11Module.initialize(null); Slot[]…
ali köksal
  • 1,217
  • 1
  • 12
  • 19
1
vote
1 answer

IAIK PKCS#11 wrapper fails to initialize

I am using code from web : import iaik.pkcs.pkcs11.Module; import iaik.pkcs.pkcs11.Info; public class PKCS11Test { public static void main(String[] args) { if (args.length == 1) { try { Module pkcs11Module =…
Aziris
  • 157
  • 2
  • 9
1
vote
1 answer

IAIK PCKS11Provider VS IAIK PKCS11Wrapper key generation

I would like to understand the difference between generating RSA 2048 bit keys through IAIK PKCS11Wrapper, where I am using the example class named GenerateKeyPair.java, and IAIK PKCS11Provider which also uses IAIK PKCS11Wrapper and generate key…
user1563721
  • 1,373
  • 3
  • 28
  • 46
1
vote
1 answer

decrypt pfx OR p12 using iaik_jce.jar in Java throws Unable to decrypt PrivateKey! exception

I obtained iaik_jce.jar file from thirdparty. I am using it to decrypt a pfx file. When i am calling decrypt api then i am getting Unable to decrypt PrivateKey! exception. Below is the piece of code which i use for decryption. FileInputStream…
1
vote
1 answer

Unable to load PKCS11 driver using IAIK PKCS11 Wrapper

I'm using the following: Windows 7 64bit JDK 7 64bit JRE 7 64bit The new funny JRE 7 64bit doesn't support Sun PKCS11 anymore (which is inside package 'sun.security.pkcs11'). And the big problem is that the end-users of the product by our company…
jondinham
  • 8,271
  • 17
  • 80
  • 137
0
votes
0 answers

IAIK PKCS11 wrapper support for Virtual Slot (HA)

Session logic implemented with IAIK seems to be on top of token, but in case of Virtual Slot (like Luna HSM High Availability) where there is no token present how to obtain a session via the IAIK Java PKCS11 wrapper? Please find the code snippet as…
Venkat
  • 19
  • 2
0
votes
0 answers

Itext7 PDF Sign Problem - The document has been altered or corrupted since the signature was applied

I have a program that signs pdf's via smartcard. Right now there is a new card that I need to integrate, but there is an error with the signature of the PDF (The document has been altered or corrupted since the signature was applied). Error I…
0
votes
1 answer

How to generate key in HSM with IAIK PKCS11 library

I am using the IAIK wrapper to send pkcs11 requests to my Bull HSM. My objective is to generate a consistent key (token = true). The problem is that I always have this error code: Exception in thread "main" iaik.pkcs.pkcs11.wrapper.PKCS11Exception:…
zero
  • 43
  • 4
0
votes
2 answers

PKCS11 key derivation with CMAC

I would like to know if it's possible to make a key derivation using AES_CMAC mechanism. I have an AES master key (key) and I want to generate an AES key : key2 = AES_CMAC(key, data). And ofcourse I want to get only key2 holder, not the value. when…
zero
  • 43
  • 4