Hi Andrew It was a good job I asked the question I think. Gerrit and yourself have caused me to sit down and learn a lot more about cryptography than I had intended, but it has been very useful.
On Friday 19 Mar 2004 01:01, Andrew Mann wrote: > I don't see that you should be using public key encryption here. Why > don't you just make a secret key, encrypt your data, send the data and a > reference along with it, and output the secret key and the reference? I now intend to use symmetric encryption (probably blowfish) with an SHA hash as the reference (Which I now understand to be considered more collision resistant than MD5) > > Public key operations are slow. If you intend to encrypt an entire > file with the public key alg (as opposed to encrypting just a secret key > that's then used to encrypt the data) you can expect a lot of time spent > on compression and decompression. One RSA implementation I've used does > about 30,000 bytes/sec with a 1024 bit key on a p3 1.2 ghz. You'll also > need to pad any data - which is 2:1 padding to data (varies by padding > method I think?), so you end up with ~3x the original size. This alone makes my original implementtion untenable. Bandwidth is obviously a major concern for a file sharing application. > The usual operation is to use a shared secret key to encrypt the actual > bulk of the data you want to transfer. The public key is used to > encrypt the shared secret key, since you need a way to transfer that key > from location A - > location B through "hostile territory". In your > situation the secret key stays in a single location, so there's no need > to provide security to transport it anywhere. Now fully apprieciated :) > Additionally you might consider ways to hide the size and source of data. I understand size, but by source you mean who/where the data came from to protect against 'habit' attacks? > Also, by linking the public key with the file you give the person > running the server the ability to replace your data. They take a > replacement file, encrypt it with the public key you gave them for > reference, and now you get back whatever they encrypted. If you use a > block encryption method they can replace individual blocks. If someone > knows a bit about you they can probably use your habits, the current > situation, and the size of the file to make a pretty good guess as to > what's inside - which can give them a good idea what they could replace > it with that might cause the most problems for you. Understood. Your comments have been very useful. Thanks! Andrew ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]