Hi,
I'm still unsure as to the max length string I can use to encrypt. I'm
using the rsacrypto class in .net to encrypt.
I know I can't pass in a string that's 256 bytes long or greater
because there us an exception that gets thrown. But as I work my way
back in length I still get exceptions with string lengths smaller than
256.
On May 26, 2010, at 4:56 PM, "David Schwartz" <dav...@webmaster.com>
wrote:
Chuck Pareto wrote:
if my public key is 256 bytes long, what is the max length
of the string I can use to encrypt? Is it 256?
If the output is exactly 256 bytes, there are (in theory) 2^(256*8)
possible
outputs. That means there can be at most 2^(256*8) possible inputs.
There
are more than 2^(256*8) possible input strings of 256 bytes or less
(since
there are that many strings just of exactly 256 bytes). So there's
no way it
can possibly take all input strings of 256 bytes or less.
In any event, unless you know exactly what you are doing, you should
not be
using PK algorithms directly. There are *way* too many gotchas. Use
a system
that includes the PK algorithm you.
DS
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org