Despite what others have said, RSA is perfectly reasonable (if slow) to use
for encryption.  If you do, you should use OAEP/OAEP+ rather than the
common/naive method of padding.

http://cseweb.ucsd.edu/~mihir/papers/oaep.html

The Wikipedia article is a good starting place

http://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding

and there's a brief article here

http://www.rsa.com/rsalabs/node.asp?id=2346

more detail here

ftp://ftp.rsasecurity.com/pub/rsalabs/rsa_algorithm/rsa-oaep_spec.pdf

- M

On Sat, Jul 10, 2010 at 11:13 AM, Jeffrey Walton <noloa...@gmail.com> wrote:

> > The general approach is to encrypt data using a symmetric cipher (e.g.,
> > AES-256) with a randomly-generated key, and then encrypt that symmetric
> key
> > with the RSA (public) key.
> AES-256 requires a RSA modulus with an equivalent strength, which is a
> 15360 (IIRC). If you choose RSA-1024 or RSA-2048, you are off by
> orders of magnitude.
>
> On Thu, Jul 8, 2010 at 11:43 PM, Phillip Hellewell <ssh...@gmail.com>
> wrote:
> > The general approach is to encrypt data using a symmetric cipher (e.g.,
> > AES-256) with a randomly-generated key, and then encrypt that symmetric
> key
> > with the RSA (public) key.
> >
> > And for the symmetric encryption you'll also have to make a decision
> about
> > what mode to use (ECB, CBC, CTR, etc).  Whatever you do, don't use ECB :)
> >
> > Phillip
> >
> > On Thu, Jul 8, 2010 at 7:40 PM, Chuck Pareto <chuckda...@gmail.com>
> wrote:
> >>
> >> Is there an algorithm that I can use, similar to RSA with public/private
> >> key, that will allow me to encrypt really long strings (like an
> email/text
> >> file)? Actually no limit on the size would be ideal.
> >
> >
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org
>

Reply via email to