def testMatchesRndLimited(usePattern=False, sampleSize=1000000, limit=103):
totalCount = 0
pattern = "011"*100
for x in range(0, sampleSize):
rndA = ""
if usePattern:
bits = getRandomBits(76)
for i in range(0, 76):
rndA += pattern[i] + bits[i]
else:
rndA = getRandomBits(152)
rndB = getRandomBits(152)
count = 0
for i in range(0, 152):
if rndA[i] == rndB[i]:
count += 1
if count >= limit:
print count
totalCount += 1
return (float(totalCount)/float(sampleSize))*100
print testMatchesRndLimited(False), "%"
>>> 0.0009 %
Edit: Bigger "sampleSize" shows 0.00068% chance. This is VERY unusual I agree. This might indicate the Outer-flame-bits are the highest bits in the Bacon26 char-bits (5), where we can find anomalous deviance towards more 0's than 1's (because Bacon26 encodes 26 chars using 5 bits, while 5 bits encode values up to 32, hence values 27-32 will never be encoded and those use mostly 1's). With this in mind, more NULLs in plain stream would indicate more bits would "leak" from the XOR 011010 key to the underlying data, hence Outer and Heights might share more bits cause underlying data in both had more NULLs.