Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MD5 and RSA - Slow performance - Help / Views Required

843811Jul 14 2005 — edited Jul 15 2005
Hi,

I am facing a problem while signing a message.The
scenario is:

I have to create 20,000 messages to be sent to
clients. I am encrypting the message using MD5 and
RSA.
But when i am encrypting via RSA it takes about 20
mins to encrypt the 20k messages.I dont know why its
taking so much time. I have max 4-5 mins to manipulate
and send messages. The sample code is as follows:
ur earliest help will be quite helpful.

Thanks in advance

Hassan

************** Source Code ****************

import java.io.IOException;
import java.math.BigInteger;
import java.security.KeyFactory;
import java.security.MessageDigest;
import java.security.Signature;
import java.security.PrivateKey;
import java.security.spec.RSAPrivateKeySpec;

import org.apache.log4j.Logger;

public class Signer {


******************************************
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2005
Added on Jul 14 2005
13 comments
698 views