Questions tagged [jce]

Java Cryptographic Extension : a pluggable cryptography framework where various providers can bring the desired functionality

Part of the Java Cryptographic Architecture. The JCA is comprised of one API part and providers. Providers shipped with the JRE may not have implementation for all features permitted by the API e.g. Sun's provider missing the RC5 algorithm, in which case one can turn to external providers like Bouncycastle to get the desired functionality.

432 questions
0
votes
1 answer

PDFbox Exception - Exception in thread "main" java.lang.VerifyError

I''m trying to run the sample code from pdfbox examples but the code finishes with creating PDF with signature with exceptions below and not able to verify signature when I open it in Adobe PDF any help? Exception in thread "main"…
realnumber
  • 2,124
  • 5
  • 25
  • 33
0
votes
1 answer

Finding the length of the public key

I'm trying to find the length of a DSA public key but it can't find the method .length, I've made sure I have the right imports but it doesn't seem to work. The snippet is below, is there a special function to find this? //my imports import…
Student
  • 55
  • 2
  • 13
0
votes
1 answer

Exception while file signing using HSM and SUNPKCS11

We are using the HSM(Hardware Security Module) for the signing and encryption from our java application. We have plugged the HSM to our JVM using the java.security property file using the following…
Mayuran
  • 669
  • 2
  • 8
  • 39
0
votes
1 answer

IllegalBlockSizeException trying to decrypt string

I'm using AES 128 bit encryption on JRE 1.6. I keep getting this exception trying to decrypt strings generated by encrypt(): 2014-11-19 14:40:10.831 28 javax.crypto.IllegalBlockSizeException: Input length (with padding) not multiple of 16…
Wes
  • 1,183
  • 3
  • 23
  • 51
0
votes
1 answer

Maven build fails while using JCE with " The jurisdiction policy files are not signed by a trusted signer!"

I am using the JCE to encrypt and decrypt in my project. I have installed the necessary java security jars under $JAVA_HOME/jre/lib/security. Also in my development environment in eclipse I am pointing to the correct jre. Everything works fine in…
user_mda
  • 18,148
  • 27
  • 82
  • 145
0
votes
1 answer

Storing persistent encryption keys

Sensitive information stored in our database is stored encrypted. My application needs a single global AES 256 encryption key. My boss suggests using the same key stored in a certificate used for our SSL. Mind you this application is not SSL…
Wes
  • 1,183
  • 3
  • 23
  • 51
0
votes
1 answer

Exception when decrypting a "der" file generated with OpenSSL: Input length must be multiple of 8 when decrypting with padded cipher

first I generate a private RSA keyfile with OpenSSL and then convert it into an encrypted "der" file: $ openssl pkcs8 -topk8 -inform PEM -outform DER -in private_key.pem -out private_key.der Next I try to decrypt this file from Java using the…
Roland
  • 7,525
  • 13
  • 61
  • 124
0
votes
2 answers

How to authenticate my own provider( only for testing purposes)

Now, I wrote a new provider (ESMJCE provider), and I also write a simple application to test it, but I have some exceptions like that java.lang.SecurityException: JCE cannot authenticate the provider ESMJCE at…
Isaaac_Perlman
  • 322
  • 5
  • 19
0
votes
2 answers

DTLS vs encrypting UDP datagrams with JKS/JCE

I need an encrypted UDP connection in Java. I know about DTLS, but it is problematic in Java. So I would much prefer to do my own encryption using JKS or JCE. Why UDP? Some lost packets or reordering doesn't concern me, but latency does. So far I…
Quizzie
  • 879
  • 4
  • 15
0
votes
0 answers

Bypassing JCE Policy Files

In my current project I need to use a strong PBE encryption algorithm, as asked by the client. But for that to work, I would need to install JCE Policy Files on each machine I want to deploy on. Based on the amount of machines, that is NOT a valid…
Daniel
  • 209
  • 1
  • 3
  • 12
0
votes
1 answer

JCE Unlimited Strength installed but AES 256 is not supported

I have installed JCE Unlimited strength to JAVA_HOME\lib\security However, I'm still getting 128 for Cipher.getMaxAllowedKeyLength("AES"). I'm wondering if I have installed the JCE at the wrong place. I have Java installed in 2 places. C:\Program…
user3034683
  • 39
  • 3
  • 10
0
votes
2 answers

Providing JCE policies without patching the JRE

In my project I had some issues with cryptography which I fixed by using "JCE Unlimited Strength Jurisdiction Policy Files". On local machine I just replaced some JARs in the jre/lib/security directory. However, I also need my project to build (to…
karlicoss
  • 2,501
  • 4
  • 25
  • 29
0
votes
1 answer

Using bouncycastle in Websphere liberty profile

Our application uses Bouncycastle. I am now attempting to deploy my app on websphere liberty profile and getting the below error [err] java.io.IOException: error constructing MAC: java.lang.SecurityException: JCE cannot authenticate the provider…
Palanivelrajan
  • 121
  • 1
  • 10
0
votes
2 answers

Symmetric Key Generation

I have two questions: When to use SecretKeySpec and when to use KeyGenerator for key generation? Is it necessary that the Key instance and the Cipher instance has to follow the same Algorithm? What is the concept behind?
0
votes
1 answer

Include local_policy and US_export_policy [JCE unlimited strength]

Is it possible to include the local_policy and US_export_policy jars in my java application or in the JRE running on the enduser's system? Or is it still only possible to replace both files?
p4tm4n
  • 73
  • 1
  • 9