Team M1 Enigma Machine Adithya Attawar (M11) Shilpi Chakrabarti (M12) Zavo Gabriel (M13) Mike Sokolsky (M14). January 30, 2006 Original mechanical design revisited, High-level software simulation, Architecture flowcharts. Status. Finished: Design selections Block diagram for processes - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Finished:Finished: Design selectionsDesign selections Block diagram for processesBlock diagram for processes High-level implementation in CHigh-level implementation in C
26 spring-loaded 26 spring-loaded contacts on each sidecontacts on each side
Set to an arbitrary initial Set to an arbitrary initial position for each position for each messagemessage
Each rotor has unique Each rotor has unique internal wiring to perform internal wiring to perform letter swapsletter swaps
Rightmost rotor steps Rightmost rotor steps one notch with each one notch with each keystroke, the others keystroke, the others every 26, 26every 26, 2622, etc., etc.
Reflector does not move; Reflector does not move; hard-wired; swaps letters hard-wired; swaps letters and ‘reflects’ signal back and ‘reflects’ signal back through rotorsthrough rotors
Manually wired and Manually wired and changed dailychanged daily
Daily settings Daily settings specified in codebooks specified in codebooks given to operatorsgiven to operators
Matched letter pairs Matched letter pairs (A-J, J-A)(A-J, J-A)
Increased number of Increased number of possible machine possible machine configurations by configurations by 26*24*22*… = ~1026*24*22*… = ~101313
Design DecisionsDesign Decisions Revised entire system architectureRevised entire system architecture
Modular design – able to add/revise components Modular design – able to add/revise components without changing basic architecturewithout changing basic architecture
Implement steckerboard, rotors, reflector Implement steckerboard, rotors, reflector using memoriesusing memories Address: (Character + Wheel Position)%26Address: (Character + Wheel Position)%26 Value in cell: New character for next swapValue in cell: New character for next swap Will need to implement a 5-bit modulo-26 adderWill need to implement a 5-bit modulo-26 adder
Serial input of initial rotor settings/orderSerial input of initial rotor settings/order
Steckerboard MemorySteckerboard Memory
26x5-bit cells26x5-bit cells Programmable by user on startupProgrammable by user on startup Stores information about swapsStores information about swaps
newChar = stecker[currentChar]newChar = stecker[currentChar]Swaps Swaps MUST BEMUST BE matched pairsmatched pairs::
If stecker[A] = ‘G’ then stecker[G] = ‘A’If stecker[A] = ‘G’ then stecker[G] = ‘A’
Rotor and Reflector Rotor and Reflector MemoryMemory
Same basic idea as SteckerboardSame basic idea as Steckerboard 8 “rotors”:8 “rotors”:
26x5-bit cells26x5-bit cells Swaps are Swaps are NOTNOT matched pairs matched pairs
1 “reflector”1 “reflector” 26x5-bit cells26x5-bit cells Swaps Swaps MUST BEMUST BE matched pairs matched pairs
Differences:Differences: Not programmable: bits in memory are Not programmable: bits in memory are
permanently set during manufacturingpermanently set during manufacturing Swap pairs unique to each wheelSwap pairs unique to each wheel
Control logic specifies how many “rotors” used, Control logic specifies how many “rotors” used, in what “position,” and in what orderin what “position,” and in what order
if((wheel_pos[wheel_order[7]] = (wheel_pos[wheel_order[7]]+1)%26)==0);if((wheel_pos[wheel_order[7]] = (wheel_pos[wheel_order[7]]+1)%26)==0); //printf("%d %d ",wheel_pos[wheel_order[0]],wheel_pos[wheel_order[1]]);//printf("%d %d ",wheel_pos[wheel_order[0]],wheel_pos[wheel_order[1]]); if(use_stecker) // initial stecker useif(use_stecker) // initial stecker use c_reg = stecker[c_reg];c_reg = stecker[c_reg]; for(i=0;i<num_wheels;i++) { // step through wheelsfor(i=0;i<num_wheels;i++) { // step through wheels c_reg = wheel_settings[wheel_order[i]][(c_reg+wheel_pos[wheel_order[i]])%26];c_reg = wheel_settings[wheel_order[i]][(c_reg+wheel_pos[wheel_order[i]])%26]; if(DEBUG)if(DEBUG) printf("%c ",(char)(c_reg+97));printf("%c ",(char)(c_reg+97)); }} if(reflect){ // if we're reflecting, which it looks like you have to do for it to workif(reflect){ // if we're reflecting, which it looks like you have to do for it to work c_reg = reflector[c_reg]; // look up new value in reflectorc_reg = reflector[c_reg]; // look up new value in reflector if(DEBUG)if(DEBUG) printf("%c ",(char)(c_reg+97));printf("%c ",(char)(c_reg+97)); for(i=num_wheels-1;i>=0;i--){ // now go through backwards, find the location in the wheel that holdsfor(i=num_wheels-1;i>=0;i--){ // now go through backwards, find the location in the wheel that holds j=0;j=0;
// the value of c_reg, and // the value of c_reg, and save the location into c_regsave the location into c_reg
Fully simulates an Enigma with up to Fully simulates an Enigma with up to 8 rotors, a reflector, and a 8 rotors, a reflector, and a steckerboardsteckerboard
cmu-163055:~/Documents/Programs/Enigma mvs$ ./enigmahelloworld (Input string from user)xoserrykrb (Encoded output)cmu-163055:~/Documents/Programs/Enigma mvs$ ./enigmaxoserrykrb (Input string – the encoded text back in)helloworld (Output – encrypt and decrypt are the same)
Problems & QuestionsProblems & Questions
How to make it more secure?How to make it more secure? Variable rotor increments?Variable rotor increments?
Must be some function of input character to Must be some function of input character to preserve symmetrical encrypt/decryptpreserve symmetrical encrypt/decrypt
Otherwise you lose your message!Otherwise you lose your message!