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
-1
votes
1 answer

Encrypting and decrypting a chunk of text in Java with JCA and JCE

I am trying to write a simple app in order to encrypt, and decrypt a chunk of text, using JCA and JCE from Java. So far the encryption part works, but it gives me the following exception when decrypting : javax.crypto.IllegalBlockSizeException:…
user852689
  • 751
  • 1
  • 10
  • 21
-1
votes
1 answer

Java crypto without Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files

I have previously experienced a lot of trouble with JCE Unlimited Strength Jurisdiction Policy Files. I never want to have to install one again. I want to write Java crypto which "just works". Are there any options for crypto without USJPFs, or am I…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
-1
votes
1 answer

pattern matching fails on second try

I am using the following code to pattern match an instance of PrivateKey: import java.security.interfaces.{RSAPrivateKey, RSAPublicKey} import java.security.{PrivateKey, PublicKey} object ClientPrivateKey { def apply(privateKey: PrivateKey) =…
simao
  • 14,491
  • 9
  • 55
  • 66
-1
votes
1 answer

java.security.NoSuchAlgorithmException: no such algorithm: CmacAES for provider BC

import javax.crypto.Mac; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; /** * Class to calculate CMAC which is used as PRF in KDF for SCP03 PseudoRandom CardChallenge generation */ public class Cmac { /** *…
Maksym
  • 2,650
  • 3
  • 32
  • 50
-1
votes
1 answer

Why SHA1 is slower than AES? JCE

I'm currently building applications, which uses crypto primitives. For encryption and hashing I use javax.crypto and java.security packages. I did some benchmarking and it turned out, that ECB-AES-128 is faster than SHA1. Code that I used for AES…
Sparrow_ua
  • 664
  • 1
  • 11
  • 28
-1
votes
1 answer

java.security.NoSuchProviderException : IBMJCECCA

This error occur while running the following program import java.security.SecureRandom; import java.util.Random; public class IBMSecureRandom1 { public static void main(String[] args) { try { // get a real random generator …
Shruti
  • 391
  • 1
  • 5
  • 21
-1
votes
2 answers

Why do I need to get the JCE to be able to handle keys larger than 128 bit?

Why do I need to get the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files to be able to handle keys larger than 128 bit? Why is it not bundled with Java SE?
Simon Zettervall
  • 1,764
  • 1
  • 15
  • 31
-2
votes
1 answer

Is JCE needed if you have LDAP?

Do you need to have JCE embedded in your Java application when you already have LDAP authentication in place?
Vicky
  • 11,077
  • 11
  • 35
  • 29
-2
votes
1 answer

Key length must be between 40 and 1024 bit

I am getting following exception in my password encryption and decryption java file. I got the solution for this issue in most of the website is replace existing security policy file with Java Cryptography Extension (JCE) Unlimited Strength…
-2
votes
1 answer

InvalidKeyException for encryption but not for decryption

I have two applets. One does: RSAPrivateKey sKey = getPrivateKey(keyFile); Cipher cipher = Cipher.getInstance("RSA/None/OAEPWithSHA512AndMGF1Padding"); cipher.init(Cipher.DECRYPT_MODE, sKey); sKey is 2048 bits long. the other one: byte[] kSession=…
eskalera
  • 1,072
  • 2
  • 21
  • 36
-2
votes
1 answer

JAVA: Programmatic Replacement of the JCE Policy Files

I'm working on a study project. For this I implemented a java application. This application requires a 8192-bit RSA encryption. To use the bit length, I need the java jce extension…
-3
votes
1 answer

Basic use case of a key tool

Basic use of a key tool to generate a keypair, CSR, and sign with root ca and import certificate reply
1 2 3
28
29