-2

Possible Duplicate:
Generating random numbers with repeated hashing, but without using a standard hash function

I need a new mechanism to create Random Number Generate(RNG). In which repetition should be very rare too. RN would be use as hash.
What I planed to changes the MD5 or SHA because both are good hash functions and collision is very rare in real scenario. Also both produce quit a different MD5 values even only a single bit change in input.
To create a variants of MD5, I made following changes :
1. MD5 uses a non-linear sin(i)* pow(2,32) ----> i plane to use cos(i)*pow(2,32)
2. Instead original values of A, B, C, D that are four initial seeds( or states), that changes additively during the processing of input text.----> I am planing to start with some different then given in MD5's RFC.
3. Also I would change the code functions. F,G,H,I (in MD5's RFC) with any other used in SHA r other.

I just want to know, What would be the effect on properties of MD5(of being a good hash funtion).
I want to use variant as a good hash function. I am not using Md5's variant for authentication mechanism.

Although, I have created four variants using above ideas and checked this with time inputs of 10 to 20 minutes and its working fine. Am i doing correct ?

  • You asked this question before, and we closed it as a duplicate. Take our advice - use a proper random number generator and **DO NOT** roll your own crypto. – Polynomial Oct 09 '12 at 12:41

0 Answers0