An idea for an entropy – based cryprographic system
An idea for an entropy - based cryptographic system (a bit sketchy but I hope it communicates the idea, sorry about the messy layout)
-true white entropy: True Random Number Generator by for example recording audio silence (analog background entropy) and then whitening it for example with the correct character frequency of Linux /dev/urandom or such multiple times --> character frequency - wise whitened true entropy dataset. Even character distribution of for example urandom stays correct once added to the mix no matter how much the true entropy factor is increased by multiple one time pad - re - encodings and it doesn't matter whether the Pseudo Random Number Genrator (like urandom) used to this is compromised or not.
-the initial exchange of such true entropy key datasets via physical contact or physical post or couriers or such (or a trusted bitbucket or such online).
-the tanking of the secret over the Net model is based on a prime number series expansion system. * prime number series expansion system with prime number serieses of bytes 0-255 based on the shared secret (the physically (or such) shared true entropy key datasets): #initial lenght: 8 =A:100, 101, 102, B:50, 51, 52, 53, 54 expanded 100, 101, 102, 100, 101, 102, 100, 101, 102, 100, 101, 102, 100, 101, 102 50, 51, 52, 53, 54, 50, 51, 52, 53, 54, 50, 51, 52, 53, 54 lenght: 15=150, 152, 154, 153, 155, 152, 151, 153, 155, 154, 151, 153, 152, 154, 156, which is non - repeating and without a pattern * the packed material has to be randomised over the dataset by rules of the software uniform by both sides based on the entropy datasets shared in common (the initial secret) * the packed material has to be minimal (like maybe even 1%) to paranoidly avoid the cryptanalysis of even the most sophisticated quantum computing supremacies by the means of prime number factorization for the reason of the odds becoming astronomical for cryptanalysis. Therefore in the 'tanking' phase you use 99k of the secret shared true entropy datasets to send 100k of the new shared true entropy datasets with a gain of 1k of the shared secret by means of the prime number series expansion packing. After the tanking you can use the true entropy secret thus gained to communicate in full forward secrecy by true entropy one time pads between the participants.
Is this model mathematically correct? If so, why not go and do it y'all for all I care. ...But please call it Noise Crypto :-) i really don't understand the model. you should code it up in python. """Sorry, a bit drunk at the moment: a second try as a comment to your post with a hopefully better layout:
""" #ok so how's this: import random import argparse def getprime(num):
def expansion(n1, n2): '''Return the next prime number from the number given'''
def primer(tn):
'''Return True if prime'''
testnumr = tn - 1
for i in range(2, testnumr):
if newnum % i == 0:
return False
return True
c = 0
primenum = 0
while primenum == 0:
newnum = int(num) + c
if primer(newnum) == True:
primenum = newnum
return primenum
c += 1
if __name__ == '__main__':
# Give two numbers, and just make them both to be over 2, mkay :-) """Make 0-255 byte series of the prime numbers and then expand
them into a non - repeating series"""
print('1st number', n1)
print('2nd number', n2)
print()
dice = random.SystemRandom()
series1 = []
series2 = []
for i in range(0, n1):
roll = dice.randint(0, 255)
series1.append(roll)
for i in range(0, n2):
roll = dice.randint(0, 255)
series2.append(roll)
print('1st series:')
print(series1)
print()
print('2nd series:')
print(series2)
print()
ser1exp = [] #the series1 expanded by multiplying it with series2
ser2exp =[] #the series2 expanded by multiplying it with series1
c1 = 0
c2 = 0
while c1 < len(series2):
for i in series1:
ser1exp.append(i)
c1 += 1
while c2 < len(series1):
for i in series2:
ser2exp.append(i)
c2 += 1
print()
print('length of the expanded series1: ', len(ser1exp))
print(ser1exp)
print()
print()
print('lenght of the epanded series2: ', len(ser2exp))
print(ser2exp)
print()
final = []
for i in ser1exp:
indi = ser1exp.index(i)
fnum = int(i) + int(ser2exp[indi])
if fnum > 255:
fnum = fnum - 255
final.append(fnum)
print('The final non - repeating series of the same lenght:')
print()
print(final)
parser = argparse.ArgumentParser()
parser.add_argument('number_1', help='the first number')
parser.add_argument('number_2', help='the 2nd number')
args = parser.parse_args()
n1 = args.number_1
n2 = args.number_2
prime1 = getprime(n1)
prime2 = getprime(n2)
expansion(prime1, prime2)