start_key = 2**49
num_public_keys = 2**50
bits_to_store = 64
bytes_to_store = bits_to_store//8
rate_of_key_to_generate = 2**20
Actually, I already figured it out, the difference is just 2**49)
2**49 / 2**20 = 2**29 keys stored in DB. 2**20 keys generated in search script against 2**29 keys generated in create_database script = 2**49 couples.
I presume that the probability of collision is not low with these numbers.
The script is not optimized, it is only a proof of concept. It needs some work.
Try with
bits_to_store = 96, in this way the probability of collision is lower.
Ok but how you image to work with bigger size of range, the nearest 2**130…? How much ram do you need to generate such equation ?