RSA - another question - WeOnlyDo Discussion board

RSA - another question (General questions)

by mauricio, Saturday, October 30, 2004, 04:27 (7328 days ago)

I am really confused about what large content means, the VB example project that comes with component has a RSA encryption but the largest text it can handle is 128 chars (needless to say that it generates a 172 chars - in Base64 - signature), is this a demo limit ? About RSA itself: I always thing about private key to be password protect, but this component stores the key in a file that could be used without any sort of authentication, so the key security is a phisical security question, am I right ?
thank you guys very much and keep the good work !
best regards

Re: RSA - another question

by wodSupport, Saturday, October 30, 2004, 21:04 (7327 days ago) @ mauricio

Mauricio,

RSA works on such chunks - from 128 (minus 11 I think) it generates 172. If you want to encrypt more than that - you need to split your content to chunks and then encrypt one by one.

But.. RSA isn't for encryption - it's for signatures. Usually, content is hashed with SHA1 or MD5 first, so you get only 16/20 chars to sign - and RSA can do that. Even more, if RSA encryption is very slow, so it's usually better to use asymetric cipher for encryption which is much much faster.

As for saving RSA keys - you can always specify a password. There is option to save it without password, for example, if you work in closed environment and want to automate things. Of course you should put password if someone can see your key.