Pseudorandom number generator based on the Tiny Encryption Algorithm (TEA) operating in counter mode. Encrypts sequential 64-bit counter values to produce random output. Simple and fast but TEAβs cryptographic weaknesses limit security.
| Property | Value |
|---|---|
| Category | Random Number Generators |
| Sub-category | Pseudorandom Number Generator |
| Security status | π Educational Only |
| Complexity | Beginner |
| Inventor | David Wheeler, Roger Needham |
| Year | 1994 |
| Origin | π¬π§ United Kingdom |
| Source | algorithms/random/tea-prng.js |
| Parameter | Supported values |
|---|---|
| Seed sizes | 16 bytes (128 bits) |
| Flag | Value |
|---|---|
IsDeterministic |
Yes |
IsCryptographicallySecure |
No |
Status: π Educational Only
No vulnerabilities are recorded for this implementation.
5 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β TEA-PRNG with all-zero seed, counter=0 - First block
| Field | Value |
|---|---|
seed |
00000000000000000000000000000000 |
outputSize |
8 |
input |
null |
expected |
41ea3a0a94baa940 |
Vector 2 β TEA-PRNG with all-zero seed - First 16 bytes (2 blocks)
| Field | Value |
|---|---|
seed |
00000000000000000000000000000000 |
outputSize |
16 |
input |
null |
expected |
41ea3a0a94baa940414091a7a27f9c32 |
Vector 3 β TEA-PRNG with all-ones seed - First block
| Field | Value |
|---|---|
seed |
ffffffffffffffffffffffffffffffff |
outputSize |
8 |
input |
null |
expected |
b94a017dde3f22cb |
Vector 4 β TEA-PRNG with sequential seed - First 24 bytes (3 blocks)
| Field | Value |
|---|---|
seed |
0123456789abcdeffedcba9876543210 |
outputSize |
24 |
input |
null |
expected |
f257f7402d578cee9000e53c6e76457247665aec5ccf9639 |
Vector 5 β TEA-PRNG with ASCII seed - First block
| Field | Value |
|---|---|
seed |
59454c4c4f57205355424d4152494e45 |
outputSize |
8 |
input |
null |
expected |
aa3dc1152c9e1c64 |