IntelliJ Java IDE
The moose likes Java Micro Edition and the fly likes decryption problem... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Reply 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: 12513

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.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
 
 
subject: decryption problem...
 
Threads others viewed
Padding Exception
Weblogic9.2 Error message:Could not perform unpadding: invalid pad byte.
encryption of images and media files
IllegalBlockSizeException while decrypting using Triple DES
"javax.crypto.BadPaddingException: pad block corrupted" using BouncyCastle and DESede: How to avoid?
IntelliJ Java IDE