Rsa Problem

When I running my Rsa program to testing the time. It has a exception that: Data must not be longer than 117 bytes. My encrypted thing is a object contains 4 string information. There is no restraction of RSA about data in document. Anybody know what's the problem?

Thanks very much.

KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");

keyGen.initialize(1024);

KeyPair pair = keyGen.generateKeyPair();

long startTime = TimeCounter.startTime();

Rsa rsa =new Rsa(pair);

rsa.encypt(si);

SecretInformation decrypted = rsa.decypt();

System.out.println(TimeCounter.period(startTime));

[744 byte] By [easona] at [2007-10-3 3:05:41]
# 1
http://forum.java.sun.com/thread.jspa?forumID=9&threadID=669434Just search the forums for "117" and you'll get plenty of hits.
ghstarka at 2007-7-14 20:55:49 > top of Java-index,Security,Cryptography...
# 2

A general RSA limitation is that in its basic form it can only encrypt a value less than the RSA modulus. There are various techniques for getting round this limitation but much depends on the application.

One approach is to use RSA to encrypt a random session key for one of the symetric encryption algorithms (AES, DESede etc) then use the session key and algorithm to encrypt the data. Obviously, with this approach one has to ship the RSA encrypted session key with the encrypted data.

sabre150a at 2007-7-14 20:55:49 > top of Java-index,Security,Cryptography...