File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "decryption problem..." Watch "decryption problem..." New topic
Author

decryption problem...

Muneeb Kiani
Greenhorn

Joined: Sep 08, 2011
Posts: 5
hello...!

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

iaik.me.security.CryptoException: Invalid PKCS#1 padding: length of encrypted message does not match modulus length! or
iaik.me.security.CryptoException: Invalid PKCS#1 padding: no leading zero! and sometimes it decrypt... please help me if anyone is familiar with such type of exception

Thanks...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: decryption problem...
 
Similar Threads
encryption of images and media files
IllegalBlockSizeException while decrypting using Triple DES
Padding Exception
"javax.crypto.BadPaddingException: pad block corrupted" using BouncyCastle and DESede: How to avoid?
Weblogic9.2 Error message:Could not perform unpadding: invalid pad byte.