Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mz
  Where is Mz?
 Metro Manila
 Philippines
 Mz
 To: Boudewijn Lutgerink
  Where is Boudewijn Lutgerink?
 Hoonaardstraat, Driel
 Netherlands
 Boudewijn Lutgerink
 Tags
Subject: An adhoc Article... mzhash
Thread ID: 50901 Message ID: 51283 # Views: 7 # Ratings: 0
Version: Unknown Category: Other
Date: Friday, September 10, 2004 9:35:34 AM         
   


BL it is irreversible.

* SHARING THE LIGHT *

But first my apology if what I have posted was not well documented, or perhaps my words have 'weights'
that it may seem 'harsh' or perhaps anoying. The terms and jargons I've used are common to very technical
issues and standards. anyway heres the defs.

* DEFINITIONS *

A. What is a HASH?

A.1 HASH - A fixed-size result obtained by applying a one-way mathematical function (called a hash or message digest function)
to an arbitrary amount of data. Given a change in the input data, the resulting hash changes. A hash is also called a message digest.
(see www.microsoft.com/technet/prodtechnol/exchange/exchange2000/reskit/gloss.asp)

A.2 HASH - Also called "hash function" or hashing, used extensively in many encryption algorithms. Hashing transforms a string of characters
usually into a shorter, fixed-length value or key. Information in a database is faster to search when you use a hashed key, than if you were to
try to match the original data.
(see www.datum.com/glossary.html)

* EXPLANATION *
This means that given a string, you can compute a hash given the formula

H = f(x)


where H is the HASH, f(x) "read as f of x" is the function and x is the string

for developers, it is explained as this: MyHash = AnyFunction("The quick brown Fox")
where, every asci code of "The quick brown Fox" will be computed (lets say a simple sum) and the result is the MyHash.

B. Why is it IRREVERSIBLE?

Irreversible means out of a value, you cannot derive back the string.

B.1 Sample of what is irreversible.

for example we add two numbers say
   4 + 6 = 10
   8 + 2 = 10
   3 + 7 = 10


If you got 10 would that mean that the string is 9 + 1? It is not isn't it because there are other probabilities
of 10 such as 4 + 6, 8 + 2, 3 + 7, or even 5 + 5.

In that way it is very hard to return back the string since you will cross to other "strings" that has a same value.

Morever, a very good HASH (such as MD5 algorithm), has a UNIQUE HASH RESULTS, which they boast that there is no
DUPLICATE of every hash of MD5. That means it is unique

Other definitions of hash is explained as:

A mathematical formula that converts a message of any length into a unique fixed-length string of digits (typically 160 bits) known as "message digest" that represents the original message. A hash is a one-way function - that is, it is infeasible to reverse the process to determine the original message. Also, a hash function will not produce the same message digest from two different inputs.
(see www.cio-dpi.gc.ca/pki-icp/beginners/glossary/glossary_e.asp)

* WHERE CAN WE APPLY THIS *
My article isn't done yet... Ill include this in our PHILFOXDEV meeting this September 25, Saturday. After the socket
trainings I'll also explain this article which I'll be sending to Mr. Eric about COPY PROTECTION.

Anyway...

The HASH function can be applied to the following:

1. Making sure that no data was changed - Lets say you have a string 'hello', if you wanted to send this text to a friend and you wanted
to make sure that nobody tamper that text, what you must do is that you also need to attach the HASH value of 'hello'. That means
that your recepient also has the HASH algorithm you have. For example the hash of 'hello' is 12345. Then you will
send the following text to your friend -> hello*HASH=12345*.
Therefore, if the text sent was intercepted by somebody else or perhaps somebodyelse is PRETENDING to be you and sending your friend the text
hello*HASH=62723* he or she will know that it is a fake one. That is that we assume that the pretender doesn't know
your formula.

2. Quick search for files - Lets say you have lots of files. If you have a list of all files and their HASH values, it is very easy
to tell that this file is that file since they have the same HASH value. Thus instead of opening the file and checking their contents
from bof() to eof(), you just need to see if the HASH value of that file has the same value with you.

3. Making an exact copy - Some large movie file that are coppied from one cd to another can be tested in a way that you have
to compute the HASH of the whole movie. This means that if the hash value are different after copying the movie to another cd, it only
means one thing... there are garbage in the coppied cd or perhaps the copy is not clear.

There are lots and other important applications that a HASH can be used. In the article that I am writing for PhilFoxDev, I
will explain how to create a simple but strong copy protection. The simple protection would'nt require any data written in the
registry or hiding some files in windows or whatsoever magic, rather it will write to a simple textfile license.txt where
the user or the client can modify the contents using a notepad.

However, the HASH value written on it can be changed, yet the computation they doesn't know. So how in the world that they can
register the system through piracy. In short, they must know the formula.

I have exposed and given the source code for free and open. Even if the clients knew about the algorithm or
perhaps they have a copy of mzhash.prg, we could quickly change the SEED which is the multiplier of 0510200405281975.
Take note, anybody can have a copy of the mzhash but you can also have a copy of it and just simply change the multiplier to another value.
In this way, the HASH VALUE changes. So whats the big deal by having a copy of mzhash... and security now comes
to your system.

Thank you so much for all your time evaluating mzhash and reading this long notes... he he. ;-) I'll post the article soon.
I'll writting it so that most of the questions such as 'how to make a copyprotection program','how to create a serial key','how can
you be sure that the data was changed',etc... the article will give clarity to developers what they are searching for.

Its gonna be written for all our needs and benefit. Good day everyone!


-MzDarkReligion



ENTIRE THREAD

The strength of Logarithm... Posted by Mz @ 9/7/2004 4:06:53 AM
RE: The strength of Logarithm... Posted by Wild Fire @ 9/7/2004 4:23:00 AM
RE: The strength of Logarithm... Posted by Alexander Federizo @ 9/7/2004 4:56:54 AM
RE: The strength of Logarithm... Posted by Mz @ 9/7/2004 5:07:57 AM
RE: The strength of Logarithm... Posted by Alexander Federizo @ 9/7/2004 6:40:06 AM
RE: The strength of Logarithm... Posted by Mz @ 9/7/2004 7:00:06 AM
RE: The strength of Logarithm... Posted by Alexander Federizo @ 9/7/2004 7:23:24 AM
RE: The strength of Logarithm... Posted by Mz @ 9/10/2004 12:47:34 PM
RE: The strength of Logarithms... Posted by Alexander Federizo @ 9/10/2004 6:07:12 PM
RE: The strength of Logarithm... Posted by Boudewijn Lutgerink @ 9/10/2004 8:43:15 AM
An adhoc Article... mzhash Posted by Mz @ 9/10/2004 9:35:34 AM
RE: An adhoc Article... mzhash Posted by Alexander Federizo @ 9/10/2004 5:53:58 PM
RE: An adhoc Article... mzhash Posted by Mz @ 9/11/2004 4:30:58 AM
RE: An adhoc Article... mzhash Posted by Sergey Karimov @ 9/11/2004 5:10:55 AM
RE: An adhoc Article... mzhash Posted by Mz @ 9/11/2004 6:45:48 AM
RE: An adhoc Article... mzhash Posted by Mz @ 9/11/2004 7:00:53 AM
RE: An adhoc Article... mzhash Posted by Sergey Karimov @ 9/11/2004 3:20:46 PM
RE: An adhoc Article... mzhash Posted by Sergey Karimov @ 9/11/2004 3:42:35 PM
RE: An adhoc Article... mzhash Posted by Mz @ 9/12/2004 10:19:23 AM
RE: An adhoc Article... mzhash Posted by Sergey Karimov @ 9/12/2004 4:13:36 PM
RE: An adhoc Article... mzhash Posted by Mz @ 9/13/2004 3:19:33 AM
An approach for Intelectual Property Protection... Posted by Mz @ 9/11/2004 7:12:08 AM
RE: An approach for Intelectual Property Protec... Posted by Dale Dedoroy @ 9/13/2004 4:14:20 AM
RE: An approach for Intelectual Property Protec... Posted by Mz @ 9/13/2004 5:27:30 AM