openssh rsa encrypt problem



On Linux FC4, I am trying to use openssl to encrypt messages.
Here is my script:

#!/bin/bash
openssl rsautl -in $1.txt -out $1.crp \
-inkey public_key -pubin -encrypt

It works for small input files, but for an input
file of length 286 bytes I get:

RSA operation error
27358:error:0406D06E:rsa routines:RSA_padding_add_PKCS1_type_2:data too
large for key size:rsa_pk1.c:151:

Is there something I can do about this? I would hope it
is possible to encrypt large messages.

If there is a better place to ask this, please let me know.

Thanks for your help.
Mike.


.



Relevant Pages

  • openssl rsa encryption problem
    ... I am trying to use openssl to encrypt messages. ... Here is my script: ... It works for small input files, ...
    (comp.os.linux.security)
  • Want your opinion on @ARGV file globbing
    ... Recently someone asked me to write a Perl script that would operate ... on a bunch of input files specified at the command line. ... I do this because the DOS shell passes in wildcard designators ...
    (comp.lang.perl.misc)
  • Re: compare two files using regular expression
    ... desirable match would be only line1 file4; is this achievable via the use of two ... How does the script cause line1 file6 to be produced? ... This thread's now too long, your input files are too long, even the input file numbers are changing and your requirements are too vague. ...
    (comp.lang.awk)
  • Re: Combining scripts
    ... > Without seeing the input files, it is hard to tell exactly why things are ... I have broken apart and changed the script to match your reply. ... # Now swap the pattern space and the hold space. ... # Delete everything between the two newline characters inclusive ...
    (comp.unix.shell)
  • labelframe not platform-independent
    ... Only this week I started with tclkit. ... My goal is to make a gui to create some input files for my fortran ... script works both on linux and on Windows-XP without any modification. ... Now I found a nice thing named "labelframe", with which I hope to be ...
    (comp.lang.tcl)