Crypt Gen Random - Method of Operation

Method of Operation

Microsoft-provided cryptography providers share the same implementation of CryptGenRandom, currently based on an internal function called RtlGenRandom. Only a general outline of the algorithm had been published as of 2007:

generates as specified in FIPS 186-2 appendix 3.1 with SHA-1 as the G function. And with entropy from:

  • The current process ID (GetCurrentProcessID).
  • The current thread ID (GetCurrentThreadID).
  • The tick count since boot time (GetTickCount).
  • The current time (GetLocalTime).
  • Various high-precision performance counters (QueryPerformanceCounter).
  • An MD4 hash of the user's environment block, which includes username, computer name, and search path.
  • High-precision internal CPU counters, such as RDTSC, RDMSR, RDPMC
Source: Writing Secure Code, Second Edition. ISBN 0-7356-1722-8.

Read more about this topic:  Crypt Gen Random

Famous quotes containing the words method of, method and/or operation:

    If all feeling for grace and beauty were not extinguished in the mass of mankind at the actual moment, such a method of locomotion as cycling could never have found acceptance; no man or woman with the slightest aesthetic sense could assume the ludicrous position necessary for it.
    Ouida [Marie Louise De La Ramée] (1839–1908)

    If all feeling for grace and beauty were not extinguished in the mass of mankind at the actual moment, such a method of locomotion as cycling could never have found acceptance; no man or woman with the slightest aesthetic sense could assume the ludicrous position necessary for it.
    Ouida [Marie Louise De La Ramée] (1839–1908)

    Human knowledge and human power meet in one; for where the cause is not known the effect cannot be produced. Nature to be commanded must be obeyed; and that which in contemplation is as the cause is in operation as the rule.
    Francis Bacon (1560–1626)