| Welcome to Crypto. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Composite Cycles | |
|---|---|
| Topic Started: Nov 3 2009, 02:48 AM (28 Views) | |
| jhll | Nov 3 2009, 02:48 AM Post #1 |
|
Just registered
![]() ![]() ![]()
|
Since cycle analysis is becoming more and more a relevant topic of discussion on this forum, I will elaborate on the analysis found in A Feasible Mechanism for the 1937 Byrne Cryptograph and include a short CPP program which can be used to study composite cycles. In FM1937, I made the point that two short cycles of 26 and 27 steps would have a composite cycle of 702 steps. When a third cycle of 55 steps is added, the resulting composite cycle will be 38,610 steps in length, which is more than sufficient to prevent ciphertext from repeating in Exhibit 1. However, when the cycles are 26, 27, and 52, the situation changes dramatically. This can be analyzed as a cycle of 702 steps (2x13x27) and a second cycle of 52 steps (4x13). In order for a subcycle of this composite cycle to repeat, 52N must equal 702M: 52N = 702M N = (2x13x27)/(4x13) * M N = (27/2)M The smallest value of M which makes N a whole number is M=2. In that case, N = 27, so if the length of a row in Exhibit 1 had been 52, a subcycle of the composite cycle would have begun repeating after 27 rows. This would be 52x27 = 702x2 = 1404 steps. Substituting TextLength = 52 in FM1937.cpp will confirm that a subcycle begins to repeat after 1404 steps. The assumption of this analysis is that all three primary cycles are advancing by just one step per encipherment, so I added the qualifier that this analysis would apply "if there were no other mechanical complexities". However, in the discussion that followed, "mechanical complexities" were in fact added to the design. For one thing the KY disk adds a fourth cycle, which undoubtedly increases the composite cycle, but it also introduces stepping probabilities that are difficult to analyze. jhll /* Program: FM1937.cpp 11-01-09 JAH */ #include <math.h> #include <io.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <windows.h> void main(void) { double S1, S2, TextLength; double cycle1, cycle2, cycle3; double Count, CompositeCycle; BOOL SubcycleRepeats; cycle1 = cycle2 = cycle3 = -1; S1 = 26; S2 = 27; TextLength = 55; CompositeCycle = S1*S2*TextLength; Count = 0; SubcycleRepeats = FALSE; do { cycle1++; cycle2++; cycle3++; Count++; if(cycle1 == S1) cycle1 = 0; if(cycle2 == S2) cycle2 = 0; if(cycle3 == TextLength) cycle3 = 0; if(Count > 1 && Count < CompositeCycle+1 && cycle1 == 0 && cycle2 == 0 && cycle3 == 0) { printf("Composite Cycle : %5.0f ", CompositeCycle); printf("Subcycle Repeats at Step : %5.0f\n", Count); SubcycleRepeats = TRUE; } } while(Count < CompositeCycle+1); if(!SubcycleRepeats) { printf("Composite Cycle : %5.0f ", CompositeCycle); printf("Composite Cycle Repeats at Step : %5.0f", Count); } } |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Chaocipher · Next Topic » |





![]](http://209.85.122.85/static/1/pip_r.png)



7:09 PM Nov 23