AutoHotkey Community

It is currently May 26th, 2012, 5:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject:
PostPosted: January 2nd, 2009, 8:44 am 
Offline

Joined: May 17th, 2008, 5:00 am
Posts: 39
Location: Dallas, TX
Laszlo wrote:
Yes, you can do that. TEA is even faster
I thought TEA was fairly broken? Do it's faults not apply to this use?
Quote:
Keep in mind that AHK's built in random number generator is two orders of magnitude faster, so only use ciphers for secure random numbers, for higher quality requirements.
Speaking of which, is there any way to drop fresh entropy -- e.g. GUID output -- into the internal state of the built-in RNG? I was reading some of your archive posts about the twister's poor applicability for security.

Thanks,
Shawn


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 2nd, 2009, 3:15 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
The XTEA version posted in the Forum is not broken, but it is not as secure AES. TEA's advantages are its speed, small footprint and the flexibility in the number of rounds, which allows tuning it to your security requirements. There are even faster and similarly secure alternatives.

The difficulty with the Mersenne Twister, built in AHK is that its large table is initialized with a Linear Congruential Generator. If you re-seed it often, you degrade the randomness to that of the LCG. If you don't re-seed it, the simple twister algorithm can be inverted, the seed guessed. Maybe the best is to use a few different simple, fast pseudorandom number generators, and add/XOR their results. The seeds could be derived from a couple of GUID's, not the AHK's default tick count alone, which does not provide enough entropy.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 28th, 2009, 5:26 am 
Offline

Joined: May 17th, 2008, 5:00 am
Posts: 39
Location: Dallas, TX
Laszlo wrote:
The XTEA version posted in the Forum is not broken[..]

The difficulty with the Mersenne Twister, built in AHK is that its large table is initialized with a Linear Congruential Generator. If you re-seed it often, you degrade the randomness to that of the LCG. If you don't re-seed it, the simple twister algorithm can be inverted, the seed guessed. Maybe the best is to use a few different simple, fast pseudorandom number generators, and add/XOR their results. The seeds could be derived from a couple of GUID's, not the AHK's default tick count alone, which does not provide enough entropy.


So how about using the GUID / XTEA + builtin random() ? e.g.:
Code:
TRandom()
{
  if (not rounds) {
    tweak = GUIDRandom()
    rounds = 100
  }
  rounds -= 1
  return Mod( tweak + random(), 1.0 )
}


thoughts? I figure 99% of the time we're just adding overhead of three extra math operations & a user function call versus just using builtin random() directly, but getting the benefit of less predicable numbers coming out of the twister.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 28th, 2009, 7:32 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
The differences between consecutive random numbers generated this way are (roughly) the same as the differences of the random numbers generated by the built in generator, most of the time, therefore there is practically no security. Generating secure random numbers is not easy, and these speedups usually turn out bad.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: get GUID in PC
PostPosted: April 21st, 2009, 4:34 pm 
Offline

Joined: March 18th, 2008, 4:04 am
Posts: 193
Hi Laszlo,

what is the function to get
GUID of a PC
that was created by some other tool ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 21st, 2009, 7:06 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
The Windows GUID is different at each call. If the other application does not tell what it got, there is no way to discover that old instance of the GUID.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2009, 6:37 am 
Offline

Joined: March 18th, 2008, 4:04 am
Posts: 193
it was created with delphi:
CoCreateGUID(guid)
and then converted to string

can it help ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2009, 6:50 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
The Delphi program can write its GUID to disk, and you can read it from there (or from the registry, or sent as a parameter of a Windows message, etc.).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2009, 12:38 pm 
Offline

Joined: March 18th, 2008, 4:04 am
Posts: 193
how I can read it with ahk ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2009, 3:59 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
It depends to where and how it is written


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2009, 5:08 pm 
Offline

Joined: March 18th, 2008, 4:04 am
Posts: 193
hi laslo,

I need to get uinque ID of client PC

how I can define some simple own GUID , for first time if it's not defined
and if defined get it's value ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2009, 5:16 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
These are random looking numbers, always different when you generate them. It does not matter if they are generated in the client machine or in your own. You probably want a secure fingerprint of the client, which is also a random looking number, but when generated repeatedly it remains the same until the PC configuration changes. See here.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: PC image copy
PostPosted: February 18th, 2012, 12:59 pm 
Offline

Joined: March 18th, 2008, 4:04 am
Posts: 193
Laszlo wrote:
You probably want a secure fingerprint of the client


Hi Laszlo,
will the unique PC number (as GUID or yours) will not be copied with
image pc copy to other PC (or server)?, means bit to bit copy.

so :
the new PC (copied with image copy) will not have the origin unique-PC-number ?

rani


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher, XX0, Yahoo [Bot] and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group