Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random Key generation help.

Status
Not open for further replies.

rpk2006

Technical User
Apr 24, 2002
225
IN
Hi,
In my application I have an empty frame on my form, in which I want users to move mouse randomly so as to generate random numbers, which will be used to generate keys.
Previously, I placed some labels with caption of different numbers and set the visible property to false. But, I noticed that this is not the standard, appropriate and secure way to generate numbers.
Any idea about how to gather random data?

Thanks,
.............
Rohit. ---------------------------------
Securing a computer system has traditionally been a battle of wits: the penetrator tries to find the holes, and the designer tries to close them. � M.Gosser
 
Normally random numbers are generated using a crypt() or Rand() function. Because the Rand() function is time-based, it is generally better to create your number in a loop and call the Randomize() function each time you loop, then generate the Rand() value.

Are you generating for an encryption seed value or initialization vector?

Typically it is bad to store these values in a form because the form's handle can be enumerated and the text read from text boxes. I haven't attempted to do this with labels, but the theory should be the same.

What language/development suite are you using?
pansophic
 
Finally, I am able to generate random numbers from mouse movements, date, time etc., without using Labels in a form. Just random mouse movements are recorded.
I want to use this long random number to generate Session Key for my application, further, from which Private and Public Keys will be derived. ---------------------------------
Securing a computer system has traditionally been a battle of wits: the penetrator tries to find the holes, and the designer tries to close them. � M.Gosser
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top