Jump to content
  • Advertisement

Archived

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

Vlion

Hmmm..simple encryption algos

This topic is 5860 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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!