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
34
votes
2 answers

What are the cipher padding strings in java

Everyone talks about the padding schemes in ciphers but what are the actual strings one needs to pass in to the cipher? I don't care if they are symmetric or asymmetric, I just want a list of the possible values.
Roy Hinkley
  • 10,111
  • 21
  • 80
  • 120
30
votes
6 answers

Where to find Java 6 JSSE/JCE Source Code?

Where can I download the JSSE and JCE source code for the latest release of Java? The source build available at https://jdk6.dev.java.net/ does not include the javax.crypto (JCE) packages nor the com.sun.net.ssl.internal (JSSE) packages. Not being…
Kevin
27
votes
3 answers

Which JCE providers are FIPS 140-2 compliant?

What Java Cryptography Extension (JCE) providers are FIPS 140-2 compliant? More specifically, does the Sun/Oracle provider qualify?
Rob H
  • 14,502
  • 8
  • 42
  • 45
26
votes
5 answers

bouncycastle + JBoss AS7: JCE cannot authenticate the provider BC

I use BouncyCastle for encryption in my application. When I run it standalone, everything works fine. However, if I put it in the webapp and deploy on JBoss server, I get a following error: javax.servlet.ServletException: error constructing MAC:…
mrzasa
  • 22,895
  • 11
  • 56
  • 94
22
votes
3 answers

How would I use Maven to install the JCE Unlimited Strength Policy files?

Some code I have requires the JCE unlimited Strength Policy Files. I'd like to add this dependency into the Maven Pom file so the other developers on my team don't have to individually each apply this to their systems. I realize that the systems…
Jeff Martin
  • 10,812
  • 7
  • 48
  • 74
21
votes
2 answers

No Java folder located in Library despite JDK installation

Currently running OSX El Capitan on a recently set up computer. I'm trying to set up Java's unlimited crypto policy which requires me to modify some files within my current jre, but I can't find the Java folder that is supposed to be located within…
Tyler
  • 310
  • 1
  • 2
  • 6
19
votes
1 answer

Reading pkcs12 certificate information

I have a problem with reading certificate information. I want to read full information using java with bouncycastle library in Android programmatically. Now, i'm just using keytool command in console: >keytool -list -keystore 1.p12 -storetype pkcs12…
ilya.stmn
  • 1,604
  • 5
  • 23
  • 41
18
votes
4 answers

ECDHE cipher suites not supported on OpenJDK 8 installed on EC2 Linux machine

When starting jetty-distribution-9.3.0.v20150612 with openjdk 1.8.0_51 running on an EC2 Amazon Linux machine, is prints that all configured ECDHE suites are not supported. 2015-08-12 16:51:20 main SslContextFactory [INFO] Cipher…
Kof
  • 23,893
  • 9
  • 56
  • 81
18
votes
3 answers

Why is a SecretKeySpec needed when deriving a key from a password in Java?

What is difference between SecretKey vs SecretKeySpec classes in Java? The documentation of SecretKeySpec says: it can be used to construct a SecretKey from a byte array In this code, if I print secretKey.getEncoded() or secret.getEncoded(), in…
Riley Willow
  • 594
  • 2
  • 5
  • 21
17
votes
5 answers

Java 7 and Could not generate DH keypair

I read a previous post regarding the error 'Could not generate DH keypair' fired when the server sents a key longer than 1024 bits. Downloading the JCE unlimited jars should fix this issue. In the test environment I have I encountered the following,…
user1408089
  • 171
  • 1
  • 1
  • 4
16
votes
1 answer

JCE zip file for JDK 9

I want to try JDK 9 and I need JCE patched. Where can I get JCE zip file for JDK 9? Or can I use the one for JDK 8 ? I searched for JCE zip for JDK 9 but am not able to locate it. Thanks in advance.
Anjana
  • 873
  • 7
  • 22
16
votes
2 answers

How to read a password encrypted key with java?

I have private key stored in file in PKCS8 DER format and protected by password. What is the easiest way to read it? Here is the code I use to load unencrypted one: InputStream in = new FileInputStream(privateKeyFilename); byte[] privateKeydata =…
Denis
  • 1,130
  • 3
  • 17
  • 32
15
votes
3 answers

How do we convert a String from PEM to DER format

Have a String being sent from in the below format: -----BEGIN RSA PUBLIC…
MSSV
  • 171
  • 1
  • 1
  • 7
14
votes
1 answer

How does JCA/JCE and PKCS#11 work (together)?

I want to use a HSM (hardware security module) to create a signature of a XML file. I did a bit of research and am now a bit confused, though. Can you please clarify those questions: What is meant with a key handle in JCE? I have read about it,…
Andy
  • 1,964
  • 1
  • 15
  • 29
13
votes
5 answers

How to sign a custom JCE security provider

Sun's PKCS11 JCE security provider is lacking some functionality we need. So I wrote an enhanced version of it using the original sources. Unfortunately the JCE infrastructure rejects the new provider "JCE cannot authenticate the provider" because…
3dGrabber
  • 4,710
  • 1
  • 34
  • 42
1
2
3
28 29