473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 5951
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 numbers, so I would like to encrypt them. The files...
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 authentication but first I have to encrypt the credentials, I...
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. Thanks
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 standalone Console App that demonstrates using...
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 and symmetric encryption and have successfully...
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 selection and then putting the encryption in the...
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 any data is encrypted using private key and the...
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 In a nutshell, the form uses javascript to hash...
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 into a database. When accessing the data (i.e. the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.