aspose 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 Soft Skills this week in the Jobs Discussion 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: 16303
    
  21

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.
 
 
subject: decryption problem...