• Advertisement

Archived

This topic is now archived and is closed to further replies.

Hmmm..simple encryption algos

This topic is 5675 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey there. I`d like to sell some of my programs at college this fall. Now these programs are small- really small, and they can easily be copied. I need some basic copy protection, consequently. I`ve figured out how to pull the current drive serial number into a unsigned long. What this will do is using a routine, generate a long. So heres the senario. 1.I sell a floppy to the user. 2.The user copies a program to his hard drive. 3.On running, it runs the routine and checks for a file with the number in it- if the two number are the same, it continues. Its not, so it sends the user a number and a prompt saying to send me this number. 4.The user tells me this number. 5.I tell him his unlock number to enter at the prompt. 6.He enters the number and the program checks the HD serial, runs algo, compares numbers, and tells the user that everything is fine, and writes the file with the unlock number to disk. Thats a 6-step process, my friends. Are there any other ways to easily stop free-for-all copying effectivly ? The programs most likely will NOT connect to the net and will be small enough for a floppy or a quick download(<5MB).

Share this post


Link to post
Share on other sites
Advertisement
Are you looking for something like this?


unsigned long get_unlock_number() {
unsigned long v[2], k[4], w[2];
v[0] = v[1] = get_serial_number();
k[0] = 2465298576; //anything
k[1] = 596225652; // anything
k[2] = 945762246; // anything
k[3] = 4162956728; // anything
encipher(v, w, k);
return w[0] ^ w[1];
}


EDIT: oops - I typed in a number greater than 2^32.

[edited by - Beer Hunter on June 30, 2002 7:14:52 PM]

Share this post


Link to post
Share on other sites
Finding a number is no big deal...
Thats totally covered.

Its the process of finding a method of copy-protection thats simple for me and simple for the user.

Share this post


Link to post
Share on other sites
try this

first define a static string in your program (#define BASE_STRING "EatMe")

next use a simple encryption alog

then write a small program that generates keys (by encryption BASE_STRING with a random key)

it would then format the key like this
ABCDE-12

the ABCDE part would be the encrypted result of BASE_STRING the 12 part would by the Encryption Key.

Of cource the encryption alog would have to have an alpha-numeric output...

I''ve already implemented this before its actualy realy easy if you want I''ll post/e-mail the code to you

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Why bother? Somewill will just by pass any security you put in.

Share this post


Link to post
Share on other sites
I`m not attempting to stop master crackers with a full-scale disassembler and 3l33t haxoring skillz.

I want to sell these at college to everyday college students and I don`t want them copying the programs and handing them to everybody and their clone !

So all I''m looking for is a moderatly effective, simple copy-protection scheme.

~V''lion

Share this post


Link to post
Share on other sites
...sounds like an XP password thing =)

some questions..

1. what happens if the user upgrades the drive?
2. wouldn''t betting the cpu and MOTHERBOARD ID be better? Since most users rarely upgrade their CPU/MOTHERBOARD...as compared to buying bigger hard disk drives.
..






Share this post


Link to post
Share on other sites
any cpu id is bad. users will most likly use the app on a school pc and their own home pc. this cause problems. plus many cpus dont have ids availible.

even better if it really does fit on a floppy, lock the app to the floppy disk. basically have a really long pascode on the floppy disk that the app needs. each exe requires a different passcode. in order to access the passcode the floppy must be in the drive. to make things more fun, have two exes, one which is encrypted while the other is the decryptor. the decryptor raw reads some bad and "empty" sectors from the floppy (this way its not copied using trivial techniques since most users may not notice this). this works on all floppy disk drives, reletivly safe since the user cant run the app from the harddrive (though you could add some sort of functionality that allows the decryptor to be run from the harddrive but still requires the floppy disc). its similar to how safedisc works. just make sure the decrypted app exe is stored in the windows tmp directory with some wierd name AND also checks for the floppy disc, though you may not want to check for the floppy, up to you). you can also use the floppy disc serial number in the mix as well.

it should be pretty safe for the avg user, so only users with the disc can run the app. ppl can share all they want, but without the correct floppy for the correct exe it wont work.

though you should mention what the apps are and their price, it will help in determining how much protection you should bother with. the apps may already have freeware equivelents making purchasing your software not worthwhile to the consumer.

Share this post


Link to post
Share on other sites
Since you''re not able to run this program "online", then your method is probably as good as it gets. Running it online of course, is pretty much the same as what you do, except it''s all automatic.


codeka.com - Just click it.

Share this post


Link to post
Share on other sites
Small math programs...output all trig results from a given angle is the one I`ve currently written...
I`d like to write a integrator/differentator, but I would need to write a parser for that, and it would take awhile for all the different functions and stuff to be done.

Small games...etch-a-sketch3d and a bowling thingy one right now, some more later as I have time.

Roughly, $5 per program.

I like the idea of linking the EXE to a given floppy serial.
I format a disk, check the serial, run a personal prog with a routine to generate a number, then compile the program using that number.
Every time the program runs it checks the serial, runs the routine, and tests it against the hard-coded number.

By online I mean by doing a XP Prod. Activation type deal

Share this post


Link to post
Share on other sites
imho copy protection is a waste of time. even if you try to minimize the inconvenience for the buyer, he is still inconvenienced far more than someone who has a copy (with the protection already bypassed). Don''t bite the hand that feeds...

Share this post


Link to post
Share on other sites
while i agree copy protection is a waste of time since it only delays the "free" version being online while hassling legitamate users. its still an interesting topic to explore.

the idea behind copy protection is not to prevent pirating at all. its to prevent casual pirating. face it, the avg person who uses a computer is not the brightest person. he is very afraid of virii (though will get them anyway since he is not being cautous). he dont understand much about how programms or the computers works. he just knows that the app he has should run. he dont bother reading directions. so its unlikly he would pirate the software if it required doing anything special. if he has to go online to get a crack, or see some stranger to get the app to work then he may reconsider. especially if the app is cheap enough.

the trig results one sounds like something a calculator can do easily. just type in the angle and press the trig function. unless it does more, it may not be worth the $5. you should show some friends the apps, but dont tell them you wrote them. ask them how much they would spend on the app. show them versions that look like trials. so they dont know you wrote it. because knowing that you wrote it is very likly going to either inflate the price, or have them want free copies (which should not be a problem, but you need to get a decent price from ppl you trust). $5 does not seem like a lot, but to a college student its a snack, pencils, drink, club cover charge, etc. so make sure that ppl would pay that much, maybe pass a few demo versions out for free.

also realize that many math solver type stuff is a bad idea to write. most ppl will quickly realize that they cant use it for tests and wont want them (then again i may be wrong and tey woudl be happy to use for tests). derivitives anit too bad, but integration is quite difficult in a genralized form.

make sure you cant easily find software that does what yours does, yet is freeware. if you can, it means you need to add more incentive for ppl to pay the $5 to use your version.

Share this post


Link to post
Share on other sites
Correct.
My goal is to stop Jane Smith from copying the program to her friends disk, not Av3ng0r from hacking it.

The trig program combines calculator functions with some other stuff. I hope to pack as much data regarding this angle in as possible.
The more functions, the more incentive people have to buy it.

Actually, if you like, I could send the current version to you, and you could see its value/disvalue.

~V''lion


Bugle4d

Share this post


Link to post
Share on other sites

  • Advertisement