This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes decryption problem... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "decryption problem..." Watch "decryption problem..." New topic

decryption problem...

Muneeb Kiani

Joined: Sep 08, 2011
Posts: 5

i'm trying to implement a chat between client(j2me) and server(j2se), and all the communication will be encrypted(using RSA)... i'm using iaik-jce-me api for cryptography on both side... i m facing a problem, when i'm trying to decrypt a message on other side it throw an exception Invalid PKCS#1 padding: length of encrypted message does not match modulus length! or Invalid PKCS#1 padding: no leading zero! and sometimes it decrypt... please help me if anyone is familiar with such type of exception

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952

I think the first thing you need to do is make sure that the encryption process isn't causing you to send/receive binary data over text transmission channels.

Customer surveys are for companies who didn't pay proper attention to begin with.
wood burning stoves
subject: decryption problem...
Similar Threads
IllegalBlockSizeException while decrypting using Triple DES
Weblogic9.2 Error message:Could not perform unpadding: invalid pad byte.
"javax.crypto.BadPaddingException: pad block corrupted" using BouncyCastle and DESede: How to avoid?
encryption of images and media files
Padding Exception