Sam Finch
Jul 10th, 2001, 01:37 AM
I'm interested in using a variant on RSA for security in distributing some files.
The files only run using a viewer program, and are purchased over the web.
The way I'm thinking of distributing is as follows.
The viewer is distributed on a CD, with each CD having a seperate serial Number.
When the user buys a file he sends me his serial number, I then encrypt the file with a weak encryption system such as random xor encryption, using his serial number as the key.
After that I encryptthe file using RSA, however, I keep the encryption key secret and publish the decryption key. (So I effectivley decrypt the file using RSA and let the user encrypt it to get the original file)
when the viewer runs the file The program, (hard coded on the CD so it can't be changed) decrypts the RSA and then daecrypts the weak encryption using the serial number as the key. (so if it's been encrypted using a different serial number the file will be garbage.
So, although the user can get hold of the decrypted file, they can't encrypt it for their viewer. And hence must buy the file if they want to use it.
Now you know all that I'm asking 3 questions.
1. Can anyone spot any weaknesses in the above system?
2. RSA involves 2 large prime numbers, p and q. we select q and q, then multiply together to get N. We then pick 2 numbers, e (the encryption key) and d (the decryption key) which multipy together such that e*d = ( (p-1)(q-1) ) +1. We publish N and (in this case) d. There is no way of working out e unless we know p and q, which are kept secret. The question is how large do I need to make p and q? I don't need world beating security, just enough to act as a good deterent. I don't think there's any real advantage in cracking it, you could just buy encrypted files, and re encrypt them, selling them off slightly cheaper than I do. So I need good enough security to make that unprofitable.
3. where can I get hold of large primes? I don't want to go in the main prime numbers websites, because then people will just look at the 100 most common primes got off the main websites, and they'll have cracked it in no time,
any help would be great.
The files only run using a viewer program, and are purchased over the web.
The way I'm thinking of distributing is as follows.
The viewer is distributed on a CD, with each CD having a seperate serial Number.
When the user buys a file he sends me his serial number, I then encrypt the file with a weak encryption system such as random xor encryption, using his serial number as the key.
After that I encryptthe file using RSA, however, I keep the encryption key secret and publish the decryption key. (So I effectivley decrypt the file using RSA and let the user encrypt it to get the original file)
when the viewer runs the file The program, (hard coded on the CD so it can't be changed) decrypts the RSA and then daecrypts the weak encryption using the serial number as the key. (so if it's been encrypted using a different serial number the file will be garbage.
So, although the user can get hold of the decrypted file, they can't encrypt it for their viewer. And hence must buy the file if they want to use it.
Now you know all that I'm asking 3 questions.
1. Can anyone spot any weaknesses in the above system?
2. RSA involves 2 large prime numbers, p and q. we select q and q, then multiply together to get N. We then pick 2 numbers, e (the encryption key) and d (the decryption key) which multipy together such that e*d = ( (p-1)(q-1) ) +1. We publish N and (in this case) d. There is no way of working out e unless we know p and q, which are kept secret. The question is how large do I need to make p and q? I don't need world beating security, just enough to act as a good deterent. I don't think there's any real advantage in cracking it, you could just buy encrypted files, and re encrypt them, selling them off slightly cheaper than I do. So I need good enough security to make that unprofitable.
3. where can I get hold of large primes? I don't want to go in the main prime numbers websites, because then people will just look at the 100 most common primes got off the main websites, and they'll have cracked it in no time,
any help would be great.