472,334 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,334 software developers and data experts.

Encryption large amount of data by using Asymmetric encryption.

Dear all,

I would like to encrypt a large amount of data by using public/private keys,
but I read on MSDN:
"Symmetric encryption is performed on streams and is therefore useful to
encrypt large amounts of data. Asymmetric encryption is performed on a small
number of bytes and is therefore only useful for small amounts of data."
There is not possibility to do it? I have tried to encrypt a 300kB file by
RSA Algorithm, but I received always "Bad length"!

Thank you,

Bart
Nov 16 '05 #1
1 5805
Ciao Bart,

Split the file into small blocks and encrypt each block separately.

Still, do you really need RSA encryption for all the file? You can encrypt
the file with a symmetric algorithm, write the encrypted file and then
append the symmetric key in turn encrypted with RSA.
That's similar to how SSL works - symmetric "session" keys are exchanged
encrypted with RSA (or some other asymmetric algorithm, don't remember for
sure) and then all data exchange is done with symmetric encryption to
improve speed.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Bart" <ba**@bart.it> wrote in message
news:eD**************@TK2MSFTNGP14.phx.gbl...
Dear all,

I would like to encrypt a large amount of data by using public/private
keys,
but I read on MSDN:
"Symmetric encryption is performed on streams and is therefore useful to
encrypt large amounts of data. Asymmetric encryption is performed on a
small
number of bytes and is therefore only useful for small amounts of data."
There is not possibility to do it? I have tried to encrypt a 300kB file by
RSA Algorithm, but I received always "Bad length"!

Thank you,

Bart


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Harold Crump | last post by:
Greetings, I have a requirement of storing some .xml files on a web server. The files will contain financial information like credit card...
2
by: Paul Fi | last post by:
I have this encryption scheme that I want to implement: I have an authentication server, which takes clients' credentials to complete...
13
by: no game | last post by:
Can I encrypt data more than 117 bytes in C# (can use CAPICOM and Crypto API libraries) using RSA 1024 bit. Any sample code would be appreciated....
3
by: Mike | last post by:
Hi, I have been experimenting with the RijndaelManaged Cryptography class in C# and have stumbled upon a "peculiarity". Following code is...
3
by: The One We Call 'Dave' | last post by:
Hi there, I read a Microsoft paper explaining the basic concepts of encryption. For example, I now understand the difference between asymmetric...
3
by: Chuck P | last post by:
I need to deploy and asp.net 2.0 application that has dpapi/machine encrypted connection strings. I tried using the VS Build Publish menu...
4
by: pintu | last post by:
Hello everybody.. I hav some confusion regarding asymmetric encryption.As asymmetric encryption it there is one private key and one public key.So...
19
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr ...
3
by: Bruce | last post by:
How can I encrypt strings using an asymmetric key? I want to encrypt short strings (credit card numbers, etc.) and save the encrypted strings...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.