Re: openssh rsa encrypt problem



"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

.



Relevant Pages

  • Re: /etc/security/passwd
    ... Brute Force. ... Thank you for your informative reply Mike, ... >> As you can tell I'm not familiar with AIX or any UNIX system. ... > the primary encryption function, and is used to encrypt passwords, ...
    (comp.unix.aix)
  • Re: Sending with encryption
    ... ErrMsg The Message Could Not Be Sent An Error Has Occurred ... The 3rd one above specifically relates to Certitificates ... Mike - http://pages.prodigy.net/michael_santovec/techhelp.htm ... > has to Sign and Encrypt the email she is sending. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Best free encryption method?
    ... I think Mike was trying to say if you have sensitive information that ... Windows XP introduced EFS, Encrypted File System.. ... on a folder and go to its properties, you can chose to either encrypt ... do you know what Mike meant by "watch out for those temporary ...
    (alt.computer.security)
  • Re: Question from a newbie -- protecting files
    ... "Mike" writes: ... I just found out that the Windows locks can easily ... encrypt some files one-off, then there are loads of good encryption ...
    (comp.security.misc)

Loading