$ cat /methodology.txt
Mathematical algorithms and methods behind our random data generators
[ Methodology - Quick Summary ]
What: Generate-Random.org uses cryptographically secure pseudo-random number generation (CSPRNG) based on operating system entropy sources, combined with specialized algorithms for each data type (Diceware for passphrases, Fisher-Yates for shuffling, Luhn algorithm for validation).
Standards: NIST SP 800-90A (CSPRNG), NIST SP 800-63B (passwords), RFC 4122 (UUIDs), EFF Diceware wordlists, ISO 13616 (IBANs).
Entropy sources: /dev/urandom (Linux/macOS), CryptGenRandom (Windows) - hardware timing jitter, thermal noise, interrupt events.
Key principle: Uniform distribution with cryptographic unpredictability - no value can predict future values.
[CRYPTOGRAPHICALLY SECURE RANDOM NUMBER GENERATION]
All randomness on Generate-Random.org originates from Cryptographically Secure Pseudo-Random Number Generators (CSPRNG), which meet the requirements defined in NIST Special Publication 800-90A.
[ALGORITHM IMPLEMENTATIONS BY GENERATOR TYPE]
1. Passwords & Passphrases
charset = [a-zA-Z0-9!@#$%^&*...]
for i = 0 to length-1:
random_index = CSPRNG(0, |charset|-1)
password[i] = charset[random_index]
wordlist = EFF_Long_Wordlist[7776]
for i = 0 to word_count-1:
random_index = CSPRNG(0, 7775)
passphrase[i] = wordlist[random_index]
return join(passphrase, separator)
2. Random Numbers & Integers
// Unbiased algorithm (rejection sampling)
range = max - min + 1
bits_needed = ceil(log₂(range))
do:
random_bits = CSPRNG_bytes(bits_needed)
candidate = bits_to_int(random_bits)
while candidate >= range
return min + candidate
integer_part = CSPRNG(min_int, max_int)
fractional = CSPRNG(0, 10^decimals - 1)
return integer_part + fractional / 10^decimals
3. UUIDs (Universally Unique Identifiers)
bytes = CSPRNG_bytes(16) // 128 bits
bytes[6] = (bytes[6] & 0x0F) | 0x40 // Version 4
bytes[8] = (bytes[8] & 0x3F) | 0x80 // Variant RFC 4122
return format_uuid(bytes)
unix_ts_ms = current_timestamp_milliseconds() // 48 bits
random_bits = CSPRNG_bytes(10) // 80 bits
uuid = (unix_ts_ms << 80) | random_bits
apply_version_variant_bits(uuid, v7)
return format_uuid(uuid)
4. Shuffling & List Randomization
array = input_array
n = length(array)
for i = n-1 down to 1:
j = CSPRNG(0, i) // Unbiased random index
swap(array[i], array[j])
return array
5. Validation Algorithms
// Generate 15 random digits
for i = 0 to 14:
card[i] = CSPRNG(0, 9)
// Calculate Luhn check digit
sum = 0
for i = 0 to 14 (right to left):
digit = card[i]
if i is_odd: digit *= 2
if digit > 9: digit -= 9
sum += digit
check_digit = (10 - (sum mod 10)) mod 10
card[15] = check_digit
// Generate random account number
country = "DE"
bank_code = random_digits(8)
account = random_digits(10)
// Calculate mod-97 check digits
rearranged = bank_code + account + country_to_digits("DE") + "00"
check_digits = 98 - (rearranged mod 97)
iban = country + pad(check_digits, 2) + bank_code + account
6. Hashing & Encoding
random_data = CSPRNG_bytes(length)
hash = hash_function(random_data)
return hex_encode(hash)
password = CSPRNG_string(length)
salt = CSPRNG_bytes(16) // 128-bit salt
cost = 10 // 2¹⁰ = 1,024 iterations
hash = bcrypt(password, salt, cost)
return format_bcrypt(hash) // $2y$10$...
random_bytes = CSPRNG_bytes(length)
charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
return base64_encode(random_bytes)
[STANDARDS & SPECIFICATIONS COMPLIANCE]
[ENTROPY CALCULATIONS & SECURITY ANALYSIS]
Entropy measures the unpredictability of random data. Higher entropy = harder to guess.
Type | Example | Entropy | Possible Values |
---|---|---|---|
8-char password (lowercase) | abcdefgh | 37.6 bits | 2.1 × 10¹¹ |
8-char password (mixed + symbols) | aB3$dF8! | 52.4 bits | 6.1 × 10¹⁵ |
4-word passphrase | correct-horse-battery-staple | 51.7 bits | 3.7 × 10¹⁵ |
16-char password (mixed + symbols) | K9$mP2@vL7!qR4*z | 104.8 bits | 3.7 × 10³¹ |
6-word passphrase | correct-horse-battery-staple-pencil-cloud | 77.5 bits | 2.2 × 10²³ |
UUID v4 | f47ac10b-58cc-4372-a567-0e02b2c3d479 | 122 bits | 5.3 × 10³⁶ |
256-bit API key | 7f8a9c2e... | 256 bits | 1.2 × 10⁷⁷ |
[ATTACK RESISTANCE ANALYSIS]
[QUALITY ASSURANCE & TESTING]
We validate randomness quality through multiple statistical tests and algorithmic verification.