Algorithms - The Basics
What are algorithms?
These usually are Mathematical Formulas and/or simple/complicated steps of instructions that once followed you will get some result, but sometimes algorithms might not include Mathematical functions, only instructions. A frequent use of algorithms is encryption or a very famous one, I think that nearly all the PC users know the shareware software that you need to insert a serial or code to have the full version of the program.
How are these done?
Simple, as I already explained just making a simple mathematical formula and/or simple/complicated steps to follow, this will ensure better algorithms and more complicated and difficult to guess, but as always, nothing is secure enough!
How can I make my own?
This is the aim of this article, how you can make your own! And integrate it into your software too, so you can make your own shareware software! But as always I will show the basics, you will need to elaborate into it, to make it more complicated, secure and hard to guess. But remember once integrated into software, you can have the best algorithm ever, but if the software is not secure enough, it can just be cracked by just using a NOP, or some other ASM to disable the register dialog or to override the check.. So beware!
Anyways, I will explain the process how to make your own algorithm, and generate True results for your algorithm (known as key generator). I made a fully working application, you can find it attached at the end of this thread.
So the first step I make is to think of a formula, I completely invent it. In this case I am going to use the formula;
(((( A + D ) – C ) / 2 ) * 5 ) ^ 2 = B
And besides that, here come the instructions, B will not be the whole result of the formula, it will only take the 2nd,3rd,4th,5th and 6th numbers of the result, so if the result, B is 123456789 for the algorithm to return True only if B is equal to 23456, this will make the algorithm more powerful, because besides the formula you are adding instructions to it, or it will not work. So if someone detects your formula, he will still not be able to crack your application and enter a serial, because the program will only take the 2nd,3rd,4th,5th and 6th numbers of B!
Read Step 2 Here: