Identifying the primer

My program to identify the primer is dependent on repeated digits at the crib location. Thus it depends on knowing the crib location. The process is to increment every 5-digit primer from 1 to 99999, extend the full primer until the digits cover the crib location, then take the segment of the primer where the crib is located and call that primer2. In the preceding con, the crib is 14 letters long. I test each primer2 first for three-digit triplets and search to see if the corresponding crib letters appear as a sequence in the ct. For example, if the primer2 were 19692055125063, my program would first test the three 5’s. The corresponding crib letters for the 5’s triplet would be MOT for the crip “TOPOFAMOUNTAIN”. If MOT does not appear in the ct, then that primer cannot be correct. If it does, I give the primer a score of 5 points. Then I do the same with 2-digit doubles, like the 1, 6, 9 and 0. Those corresponding crib letters form digraphs. If any of those digraphs don’t appear in the ct, again the primer is rejected. If they do, 1 point is given for each such pair. Once all primers have been tested and a score given to each one that isn’t rejected, those are then ordered by score and decryption attempted with the highest-scoring primers first. The process could be extended to 4- or 5-digit groups, but the crib would have to be quite long in most cases.

In the preceding con, there was only one 4-primer group that outscored the correct group. I tested this method on the same con with a shorter crib (12 letters) without a triplet in the corresponding primer2 and the correct primer appeared in the highest-scoring 200 primers. If the crib were to occur over a sequence without many triplets or doubles, this method would not be effective. If the crib were long enough, one would not need to know its location in advance because there would probably be only one 4-primer group and crib location that would work.

Leave a Reply

Your email address will not be published. Required fields are marked *