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.

One thought on “Identifying the primer”

  1. I have since written a Sequence hill-climber along the lines suggested by BION. I’ve discovered some interesting behavior of the primers. Not only are there three equivalent primers that decrypt identically to the original one (with different keys), but a primer consisting of the five digits beginning one spot before or after the original stream will decrypt well enough to read the cipher and so will their equivalents. Thus there are at least twelve primers out of the 99999 possibilities that should provide a solution.

    As for identifying the 10-letter keyword, that can be ambiguous. I’ve found on another Sequence tramp that in addition to the original primer/key combo, there was another primer/key combo that decrypted identically. That other combo had exactly one word that made a valid key, like the original pair. As we have learned from Headlines hats, there can be more than one word with the same hat pattern.

Leave a Reply

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