Re: openssh rsa encrypt problem
- From: "Richard E. Silverman" <res@xxxxxxxx>
- Date: 17 Apr 2006 19:36:45 -0400
"Mike" == Mike <- EMAIL IGNORED <m_d_berger_1900@xxxxxxxxx>> writes:
Mike> On Linux FC4, I am trying to use openssl to encrypt messages.
Mike> Here is my script:
Mike> #!/bin/bash openssl rsautl -in $1.txt -out $1.crp \ -inkey
Mike> public_key -pubin -encrypt
Mike> It works for small input files, but for an input file of length
Mike> 286 bytes I get:
Mike> RSA operation error 27358:error:0406D06E:rsa
Mike> routines:RSA_padding_add_PKCS1_type_2:data too large for key
Mike> size:rsa_pk1.c:151:
Mike> Is there something I can do about this? I would hope it is
Mike> possible to encrypt large messages.
You never encrypt large amounts of data directly with RSA (or other
public-key algorithms) -- they are far too slow. You encrypt bulk data
with a symmetric cipher, then encrypt the symmetric key with RSA.
--
Richard Silverman
res@xxxxxxxx
.
- Follow-Ups:
- Re: openssh rsa encrypt problem
- From: Mike - EMAIL IGNORED
- Re: openssh rsa encrypt problem
- References:
- openssh rsa encrypt problem
- From: Mike - EMAIL IGNORED
- openssh rsa encrypt problem
- Prev by Date: Re: Kerberizing SSHD configuration questions
- Next by Date: Re: openssh rsa encrypt problem
- Previous by thread: openssh rsa encrypt problem
- Next by thread: Re: openssh rsa encrypt problem
- Index(es):
Relevant Pages
|
Loading