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

Installing Java Cryptography Extension in Debian

I need to install the JCE in my Wheezy machine. According to the documentation, I should replace the files local_policy.jar and US_export_policy.jar in $java_home/lib/security. However, my system doesn't have these files, and just copying JCE's…
CodingHater
  • 51
  • 1
  • 5
0
votes
2 answers

Will updating Java overwrite everything in the JRE folder, or will it patch?

I'm think of increasing the maximum encryption key length by downloading security policy files from Oracle. They need to be placed in $JRE_HOME/lib/security to take effect. My question is, would this "tweak" be overwritten when upgrading Java to a…
Programmer Trond
  • 303
  • 2
  • 15
0
votes
1 answer

SecureRandom.setSeed(byte[])

I'd like to seed a secure random generator myself using bytes, e.g.: SecureRandom sha1prng = SecureRandom.getInstance("SHA1PRNG"); sha1prng.setSeed(new byte[] { 2, -4, 127, -54 }); System.out.println(sha1prng.nextLong()); I found a number of…
andy
  • 99
  • 7
0
votes
0 answers

Which ibm provider support PKCS7Padding

Ibm java has this…
hudi
  • 15,555
  • 47
  • 142
  • 246
0
votes
1 answer

why decrypted string cannot display?

I decrypt a file but it is not displaying the decrypted string. It is also throwing an javax.crypto.IllegalBlockSizeException. Here is my code: File f=new File("C:/Users/User/Desktop/Test.txt"); int ch; StringBuffer strContent = new…
0
votes
2 answers

Explanation to understand AES encryption code

I am creating a project to encrypt and decrypt a file. I have these two algorithms that work fine: public static byte[] encrypt(byte[] raw, byte[] clear) throws Exception { SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); Cipher…
MarcForn
  • 3,321
  • 7
  • 25
  • 39
0
votes
0 answers

Android: Using SimpleFramework to create an XML string and Encrypt it is not working with large files

I have an issue with my android application which only occurs every so often. I basically have a bunch of data in my database, which is converted to an XML String and that XML String is then Encrypted and saved in a file. The issue is that…
riggaroo
  • 2,584
  • 20
  • 34
0
votes
1 answer

Android string encryption stops before cipher.init() method

I am creating an Android application that encrypts a string using a user-chosen password. The system will display the encrypted string in the edit text. This is the method that I try to encrypt with. Can anyone tell me where is the error that do…
user3006788
  • 165
  • 1
  • 14
  • 30
0
votes
1 answer

android cipher dofinal array too large

I am writing an Android version of a Java program that I use to keep track of passwords. I have the following function that I use to decode one line of the encrypted data: public String decrypt(String text) { byte[] decryptedText = null; …
VingInMedina
  • 713
  • 1
  • 6
  • 16
0
votes
1 answer

Is this Java-based multi-cipher crypto format implementation secure?

I implemented a crypto format (in the form of a MultiCipherOutputStream and a MultiCipherInputStream) that supports nesting multiple cipher streams into one another. The goal was to produce a flexible crypto file format that will satisfy even the…
binwiederhier
  • 1,893
  • 1
  • 16
  • 23
0
votes
1 answer

Trusted Signon in IBM Cognos with SAML Token & JCE Policy

I am trying to create a Custom Java Authentication Provider (CJAP) which is trying to read the SAML tokens (Version 1.1) passed from the source application (Trusted) to Cognos Application (Version 10.2.1 FP 1) (Application Server : Tomcat). Also…
Jignesh Parmar
  • 68
  • 1
  • 1
  • 9
0
votes
1 answer

How to Encrypt and Decrypt file Using RSA And AES Algorithm

I want to encrypt test.txt file I am using this java class for encryption and decryption.In My directory I have three files private.txt for save private key and public.txt for public key and test.txt is for encryption. package…
sufala
  • 553
  • 4
  • 11
  • 19
0
votes
2 answers

What is difference in implementation of SunJCE 1.6 and SunJCE 1.5?

I am migrating from JDK 1.5 to JDK 1.6. I've encountered difficult problem. Here is piece of code: SecretKeyFactory factory = SecretKeyFactory.getInstance("PBEWithMD5AndTripleDES"); SecretKey key = factory.generateSecret(keySpec); Cipher ecipher =…
Dmitry Kaigorodov
  • 1,512
  • 18
  • 27
0
votes
0 answers

How to query and retrieve a list of field-value pairs from X509 certificate in Java?

In your browser if you go to Advanced Settings and then view the certificates, and select one and click on View (at least on Windows), you will see a popup dialog with 3 tabs. The Details tab will show a tabular list of Field and Value. Are these…
likejudo
  • 3,396
  • 6
  • 52
  • 107
0
votes
2 answers

JCE - Java 7...?

I've installed JDK 7. Which already contains the following JARs: local_policy US_export_policy But when I start my application, I was facing JCE error. So I googled and downloaded JDK 7 JCE from here. My doubt is, when JDK 7 already has JCE JARs,…
Gokul Nath KP
  • 15,485
  • 24
  • 88
  • 126