ISAAC Random Number Generator
This node generates cryptographically secure random numbers using the ISAAC algorithm.
The ISAAC Random Number Generator provides high-quality pseudorandom numbers with optional seed and nonce control.
The ISAAC Random Number Generator node implements the ISAAC (Indirection, Shift, Accumulate, Add, and Count) algorithm by Robert J. Jenkins Jr. This cryptographically secure pseudorandom number generator produces uniformly distributed, unbiased output with extremely long periods and no short cycles.
Inputs
Configuration
| Data | Description |
|---|---|
| Seed | Optional seed value for deterministic output (default: auto-generated) |
| Nonce | Optional nonce for additional randomization (default: none) |
Actions
| Signal | Description |
|---|---|
| Do | Generates a new random number |
Outputs
| Data | Description |
|---|---|
| Generated Value | The random number (0 to 1 trillion range) |
| Signal | Description |
|---|---|
| Done | Triggered when generation is complete |
Algorithm Properties
The ISAAC algorithm provides exceptional randomness characteristics:
- Performance: 18.75 instructions per 32-bit value
- Period: Expected cycle length of 2^8295 values
- Security: No cycles shorter than 2^40 values
- Quality: Uniformly distributed, unbiased output
- Deterministic: Same seed produces same sequence
Usage
Basic Random Generation
- Leave both seed and nonce empty for true randomness
- Each execution produces a different random number
- Values range from 0 to 1,000,000,000,000
Deterministic Generation
- Set a specific seed for reproducible sequences
- Same seed always produces the same first random number
- Useful for testing, debugging, or procedural generation
Enhanced Randomization
- Use both seed and nonce for maximum control
- Nonce adds additional entropy while maintaining determinism
- Ideal for cryptographic applications requiring both security and reproducibility
Example Use Cases
-
Game Development:
- Procedural world generation with consistent seeds
- Random enemy behavior with controlled variance
- Loot drops and reward systems
-
Simulations:
- Monte Carlo simulations requiring high-quality randomness
- Scientific modeling with reproducible results
- A/B testing with controlled random assignments
-
Security Applications:
- Session token generation
- Random challenge generation
- Cryptographic salt creation
-
Creative Applications:
- Procedural art generation
- Music composition algorithms
- Animation parameter randomization
Seed and Nonce Behavior
| Seed | Nonce | Behavior |
|---|---|---|
| Empty | Empty | Uses current time + Math.random() for entropy |
| Set | Empty | Deterministic sequence based on seed |
| Empty | Set | Random seed + nonce modification |
| Set | Set | Deterministic seed + nonce modification |
Performance Characteristics
- Memory: ~2KB internal state per generator instance
- Speed: Extremely fast generation (millions of numbers per second)
- Quality: Passes all standard randomness tests
- Predictability: Cryptographically secure when properly seeded
Mathematical Foundation
ISAAC uses a combination of:
- Indirection: Memory array lookups
- Shift operations: Bit-level transformations
- Accumulation: State accumulation across generations
- Addition: Modular arithmetic
- Counting: Cycle counting for period extension
This combination ensures that the generator has excellent statistical properties and is suitable for both scientific and security applications.