
January 27th, 2025
In the world of cryptography, randomness is king. This paper dissects a 32-character Base64 API key, peeling back the layers of entropy and byte distribution. Through entropy analysis, frequency mapping, and a chi-square statistical barrage, we expose its non-random secrets.
Randomness (or the lack thereof) drives the security of API keys. A seemingly chaotic 32-character string hides more than meets the eye. We ask the following:
How random is this key?
More importantly, what does it reveal?
Entropy quantifies unpredictability. We calculated the Shannon entropy for the following:
The key’s entropy suggests more structure than randomness. This is not pure chaos; it is engineered.
We visualized the byte frequencies after decoding. A truly random distribution should resemble white noise.
![]() |
Figure 1: Byte Frequency Distribution Histogram
The histogram shows:
Peaks at byte values (e.g. 50, 100, 200).
Quite a few swaths of byte values missing in action. This shouts ’structured data’.
To prove the point, we have enacted the chi-square test. Here’s the math:

Where:
Oi: Observed byte frequency.
Ei: Expected frequency under uniform randomness.
The chi-square test yielded a statistic of χ2 = 471.5909 with a p-value of p =4.21 × 10−15.
When p < 0.05, randomness takes an L. In our case, p =4.21 × 10−15, confirming structured patterns in the key.
Not random, not even close.
This API key is not pure entropy, it's precision-engineered. The peak in frequency and reduced entropy point to embedded metadata, timestamps, or versioning. For hackers and cryptographers alike, this type of information is invaluable.
DJ @ ShadowTEAM