Showing posts with label Warfare Technologies. Show all posts
Showing posts with label Warfare Technologies. Show all posts

Thursday, 27 August 2020

SR-71 : The Blackbird

“Let every nation know, whether it wishes us well or ill, that we shall pay any price, bear any burden, meet any hardship, support any friend, oppose any foe to assure the survival and the success of liberty.”
                               —President John F. Kennedy

The truth is a strange thing. You can try to suppress it, but it will always find its way to the surface, sometimes our little minds cannot comprehend;

"We’re eyeball to eyeball…and I think the other fellow just blinked.”
—Secretary of State, Dean Rusk to NSA, McGeorge Bundy

With tensions rising in the Cold War, the most important thing for both sides was a fail-proof reconnaissance method to collect as much information as possible and maintain as much stealth as possible. By the latter half of the 1950s, the RADARs and anti-aircraft missiles were already integrated into the Air-Defense systems of both the countries, making it very difficult to launch air reconnaissance missions. 

In 1962, a USAF U-2 aircraft was shot down by Russian SAM(Surface to Air Missile) over Soviet territory. Situations like these gave rise to the need for an aircraft capable of out-flying missiles and out-heighten the anti-aircraft artillery and RADAR. This Herculean task was assigned to the Lockheed Martin Corporation’s clandestine division, Skunk Works, headed by a genius Design Engineer, Clarence L. Kelly Johnson.


Design


The initial design proposed a new high speed, high altitude, reconnaissance aircraft, to be capable of avoiding interceptors and missiles, centered on a design propelled by liquid hydrogen. This proved to be impracticable because of considerable fuel consumption. Lockheed then reconfigured the design for conventional fuels. The Central Intelligence Agency (CIA), already flying the Lockheed U-2, issued a production contract for an aircraft designated the A-12. 

The A-12 was designed to cruise at Mach 3.2 and fly well above 18,288 m (60,000 feet).

Titanium Skin

Flying at more than three times the speed of sound generates 316° C (600° F) temperatures on external surfaces due to air drag, which was enough to melt conventional aluminum airframes. The design team chose to make the jet's external skin of the Titanium alloy to which shielded the internal aluminum airframe.

Twin Engines

Two conventional, but very powerful, afterburning turbine engines, named Pratt & Whitney J-58,  propelled this remarkable aircraft. These power plants had to operate across a huge speed envelope in flight, from a takeoff speed of 334 kph (207 mph) to more than 3,540 kph (2,200 mph).

Special Color

The A-12s were to exhibit a low radar profile. This was achieved by carefully shaping the airframe to reflect as little transmitted radar energy (radio waves) as possible, and by application of special(black) paint designed to absorb, rather than reflect, those waves. And this peculiar black color gave rise to its name “The BlackBird”.




These A-12’s were upgraded by adding special reconnaissance equipment and designated as SR-71. The SR-71 was both longer and heavier than the A-12, allowing it to hold more fuel as well as a two-seat cockpit. The SR-71 was introduced to operational service in January 1966. These were very sophisticated crafts and required a lot of preparation. Pilots were trained specifically for this task.

Fun fact: The glass cover on the cockpit used to get so hot that pilots would warm their food by pressing against it.

The SR-71 still holds the world record for flying at a sustained altitude of 85,069 feet and reaching a top speed of 2,193.2 miles per hour, or Mach 3.3. 

SR-71s were decommissioned from active service in 1990. It was last flown by NASA in 1999. Now the remaining of the BlackBirds are enjoying their retirement, resting in museums.

Now answer me this:

“Keeping in mind the fact that SR-71 could easily fool the RADARs, do you think it would still be stealthy if launched today?”

Here are some references for a more detailed read:

1. https://airandspace.si.edu/stories/editorial/setting-records-sr-71-blackbird
2. https://edition.cnn.com/style/article/sr-71-blackbird-spy-plane-design/index.html
3. https://www.lockheedmartin.com/en-us/news/features/history/blackbird.html

Thursday, 18 June 2020

Lorenz : The Missing Piece of History

The Lorenz SZ-40 is an electro-mechanical wheel-based cipher machine for teleprinter signals. It was developed by the Germans and was used during World War II for communication at the highest level. Improvised twice although, it was broken by the code breakers at Bletchley Park in the early 1940s. During the WW II, for teleprinter signals, besides Lorenz, the German army also used the Siemens T-52 Geheimschreiber, the Lorenz SZ-40, and later also the Siemens T-43 one-time pad machine.



The Lorenz SZ - 40/42 was used by the German High Commands for communication at the highest level,  between Hitler and his generals. The machine was called Schlüsselzusatz (SZ) which means Encryption Add-on. It was connected between a teleprinter and the line and was suitable for both online and offline use. 


History


The Lorenz company built the cipher machine based on an additive method for enciphering teleprinter messages invented in 1918 by Gilbert Verman in America. After world war 2, a group of British and US entered Germany with the front-line troops to capture the documents, technology, and personnel of various German signal intelligence organizations and from the captured, they found SZ40 and SZ42 a/b. The design of the machine they found was feasible with teleprinters.

Gilbert at AT&T Bell Labs in 1917, invented a cipher system that used Boolean “exclusive or” function. Vernam’s cipher is a symmetric-key algorithm which produces the essential reciprocity that allows the same machine with the same settings for encryption as well as decryption. Vernam’s idea was to use conventional telegraphy practice with a paper tape of the plaintext combined with the paper tape of the key but generating them was practically difficult, therefore, he invented rotor cipher machines. 


Working


Teleprinters are not based on a 26-alphabet system but are based on 32-symbol Baudot code. The Vernam system enciphered the message by adding to it, character by character, a set of obscuring characters thus producing the enciphered characters which were transmitted to the intended recipient. The simplicity of Vernam's system lay in the fact that the obscuring characters were added in a rather special way (known as modulo-2 addition). Then the same obscuring characters added also by modulo-2 addition to the received enciphered characters, would cancel out the obscuring characters and leave the original message characters which could then be printed. The working of modulo-2 addition is the same as the XOR operation in logic.



For enciphering and deciphering, the transmitter and receiver are set up identically in which there are two components: setting the patterns on cams of the wheel and rotating the wheels for the start of enciphering. The cam settings were changed less frequently initially but it was made more frequent so that the enemies could not intercept them. The wheel settings were sent by 12-letter indicator un-enciphered but in October 1942, it was changed to a book of single-use settings called the QEP book. 
As was normal telegraphy practice, messages were typed to teleprinter with a paper tape perforator. The typical method was to type the encrypted message, contact the receiving operator with an EIN/AUS switch on the SZ machine to connect to the circuit, and then run the tape through the reader. At the receiving end, the operator would connect the SZ machine to the circuit and the output would be printed on the sticky tape. 

Enigma was considered to be an unsolvable machine and Lorenz was more complicated and sophisticated than that. The Lorenz used 12 wheels and 501 pins and the enciphered message was 5-bit punched paper tape where messages often contained thousands of characters and 1.6 quadrillion starting positions were arguably possible according to the reports and sources. 

But the miracle was that Bill Tutte broke the Lorenz system without even seeing the machine ever. 


Code Breaking


Under the leadership of Major Ralph Tester, “Testery” was formed at Bletchley Park. A lot of information was intercepted but there was no headway for deciphering the messages until the Germans committed a fatal mistake. On 30th August 1941, a German operator sent a 4000-long character message and the receiver wasn’t able to get it, so the message was replied with “didn’t get that - send again”. Both receiver and the sender put their machine with the same starting position which was forbidden and the message sent again was 500 characters lesser than the original probably because the sender was saving his fingers. 

The message began with that well known German phrase SPRUCHNUMMER — "message number" in English. The first time the operator keyed in S P R U C H N U M M E R. The second time he keyed in S P R U C H N R and then the rest of the message text. Now NR means the same as NUMMER but it meant that immediately following the N the two texts were different. But the machines were generating the same obscuring sequence, therefore the ciphertexts were different from that point on.

The enemy interpreters acknowledged that the twelve letter indicators were the same both the times. John Tiltman at Bletchley Park applied the same additive technique he figured before and this time he was able to get through more than the previous ones because when he tried SPRUCHNUMMER at the start he immediately spotted that the second message was nearly identical to the first. Thus the combined errors of having the machines back to the same start position and the text being rekeyed with just slight differences enabled Tiltman to recover completely both texts. Now Tiltman could add together, character by character, the corresponding cipher and message texts revealing for the first time a long stretch of the obscuring character sequence being generated by this German cipher machine.

John now passed the obscured characters to Bill Tutte and he recognized the bit patterns at a repetition of 41 had some significance and by Jan 1942, the codebreakers had deduced the working principle of the Lorenz machine, using nothing but the recovered keystream from the August 1941 message.


Decryption Machines


Several replica machines were built to aid the attack on Tunny (code word for Lorenz). The first was British Tunny built at Bletchley Park based on reverse engineering techniques and after that family of Robinsons were built but the issue was that the two papers synchronized were relatively slow.

The Colossus computers were developed and built by Tommy Flowers, of the Dollis Hill Post Office Research Station, using algorithms developed by W.T. Tutte and his team of mathematicians. Colossus proved to be efficient and quick against the twelve-rotor Lorenz SZ42 on-line teleprinter cipher machine.

It is after the D-Day landings in 1944, the first Lorenz machine was captured and was shown to the codebreakers of Bletchley Park and they were amazed to see the relatively small mechanical machine of which they had created the electronic equivalent. Lorenz was indeed a miraculous machine that would not have been broken if the mistake would not have been committed. 

In Germany, examples of Lorenz may be seen at the Heinz Nixdorf MuseumsForum, a computer museum in Paderborn and the Deutsches Museum, a museum of science and technology in Munich. Two further Lorenz machines are also displayed at both Bletchley Park and The National Museum of Computing in the United Kingdom. Another example is also on display at the National Cryptologic Museum in the United States.

With this blog, we come to the end of our mini-series “Decrypting World War 2 communication”. We hope you loved all the blogs and find them interesting and scholarly. Do like, share and comment on our blogs and if you want to read something specific, you can suggest them through our email or you can even comment them down!

Happy Reading!

Thursday, 11 June 2020

Fialka - The Soviet’s Unbreakable Code

This blog comes under the mini-series ”Decrypting World War 2 communications”. Though the machine we are talking about today was used during the cold-war era.

The M-125 with code name Fialka was an electromechanical based cipher machine developed after World War 2 during the cold-war era. Both the Soviet Union and United States had extensive nuclear capabilities which weren’t possibly considered to be mere a normal power because it had the capacity to devastate not millions but billions and that’s why an utmost secrecy was an ultimate significance. Enigma was considered to be the most powerful encoded form of communication but it has already been broken by the rival allies by the end of world war 2 and the more secure successor, the Lorenz was also decoded by the British cryptanalysts. Therefore, something more powerful was the requirement.




Fialka was introduced first in 1956 which soon became one of the favorite cipher machines of the Warsaw Pact and some allied nations like Cuba. The original M-125 was succeeded by the M-125-3M in the 1960s and remained in use till the early 1990s. 


History


Fialka means a rather small flower; violet in Russian but contrary to its name, it wasn’t a delicate item but a very powerful machine. M-125 and M-125-3M were the two basic versions of it and “Fialka” word was actually the cipher procedure but since most people called the machine “Fialka”, it became popular with the same. 
Similar to the mechanism to Enigma, the German popular, it also used electromechanical cipher wheels to scramble the actual text. Whenever a user typed any letter, the wiring inside changed and the alternate alphabet was visible and till this, the similarity was present.  

Unlike printing it on a lamp-panel, it directly printed in on a paper-strip and at the same time, it had the capacity to punch the letter in an 5-bit digital code and in addition to that, a paper tape transmitter was also equipped with it to transmit or duplicate a message. The following improvements were made in Fialka regarding the flaws of Enigma: 

10 wheels were indulged into the machine rather than 3 to 4 wheels to complicate more and the adjacent wheels rotated in the opposite direction.
  • The wheel turnovers were more frequent to baffle the enemy.
  • It was possible to change the wheel wiring on the field in case of sudden attack.
  • A single letter can be encoded into itself which was impossible in Enigma.
  • The auxiliary features especially added to make it more powerful were:
  • The use of letters, numbers and punctuation marks.
  • There was a possibility to duplicate a punched-paper tape.
  • It was suitable as a standard teletype machine.
  • It supported both Russian (Cyrillic) and Latin Alphabets which was helpful for all allied nations.


Working


It had two electrical components, one at the left and one at the right. All controls were conveniently spread over the body of the machine. After connecting the machine to the Power Supply Unit (PSU), it was switched ON by placing the ON/OFF switch in the БКЛ.-position. When typing a message, a copy holder can conveniently be raised to hold the message form. A ruler holds the form in place and can be used as a pointer by moving it up and down. 





Mode of Operations


 A three-position lever in the large circular “blob”  is used to select the required mode of operation. It is called the MODE selector and is used to select between Coding, Decoding and Plain Text. 

Russian/Latin


The basic Fialka machine supports 30 different characters designed for Russian language and Cyrillic character set. In order to avoid mechanical complexity of the electric wheels, the 30 most frequently used Cyrillic characters are used. These are the following characters:

А Б В Г Д Е Ж З И К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ы Ь Ю Я Й

On each Fialka machine, regardless of the country in which it was used, these 30 characters are always at the same position on the keyboard and on the print head. On the international version of the M-125, it is possible to switch between Russian and Latin. For that, two letters are printed on each key top: a Cyrillic one in green and a Latin one in red. The position of the Latin characters varies per country. Numbers were not present on the keyboard and had to be typed in full word.


Cipher wheels


The M-125  uses 10 cipher wheels which have 30 flat-faced electrical contacts and 30 spring-loaded contacts respectively on both sides. Each of the 10 cipher wheels is wired differently and has the number of pins on the outer rim which controls the stepping of the wheel of its neighbour. The number of pins and their position are different on each wheel. Each of the 10 wheels is identified by a letter of the Russian alphabet which is engraved in its right side. 

In principle, all wheels can make a single step in each key-press, but it's stepping can be inhibited by its controlling wheel. Wheel 2 controls the stepping of wheel 4. If a pin is present at a certain position, it inhibits the stepping of wheel 4. For this reason the pins are also known as 'advance blocking pins'. In the same way, wheel 4 controls the stepping of wheel 6, and so on. For the odd wheels, wheel 9 is the driving one. It controls wheel 7 that in turn controls wheel 5, etc.


Card Reader


The M-125-3 has a card reader that adds an extra layer of permutations to the machine. The card reader is located at the left side of the machine and consists of a drawer that gives access to a 30 x 30 contact matrix. In many respects it can be seen as a non-moving programmable wheel. Lower the metal bar that protects the reader and firmly pull out the drawer that holds the card.
As the Fialka uses a reflector, just like Enigma's Umkehrwalze, the current passes the card reader twice. In practice the punched card was part of the daily key and was changed every 24 hours. It was made of paper that was so thin that it easily got ripped, so that it could not be used twice.


Printer


Unlike the WWII German Enigma machine that presented its output on a panel with 26 lamps, the Fialka can print its output directly on a paper strip that could be used directly in a telegram. In addition, the machine could also punch the message into a standard 5-level teleprinter tape.
The Fialka accepts two paper sizes. In addition to the standard 5-level teleprinter tape, it is also possible to print the text on a narrow 10 mm paper tape.


Tape Reader


The M-125-3 has a fully integrated paper-tape reader that accepts standard 5-level teleprinter tape in the specific Fialka encoding standard. It is located at the front right of the machine and is mechanically coupled to the keyboard. It can be used to play back previously created messages.


Counters


The M-125 has a character counter at the front left that is used to count 5-letter groups. The counter is reset by pressing the large push-button at the front of the machine's base. The rightmost digit (marked with a red border) is used to count the characters and wraps around at five (1-5) whilst the remaining 3 digits are used to count the number of 5-letter groups.


Explanation


Although the circuit diagram of the M-125 is very complex, its operating principle is similar to, but more advanced than, the Enigma cipher that was used by the Third Reich during WWII. The extra complexity was added to circumvent certain cryptographic weaknesses of the Enigma.

Let us first consider the above block diagram of the Enigma. It has 26 keys that operate 26 switches. The current from the battery is passed by these keys through the plugboard (German: Steckerbrett) onto a static entry disc (German: Eintrittswalze, or ETW). From the ETW, the current is passed through the cipher wheels until it hits the reflector (German: Umkehrwalze, or UKW). The UKW returns the current back through the wheels, the ETW and the Steckerbrett, after which it arrives at the lamp panel where the lamp of the encoded letter lights up. This is the output.




The operating principle of the M-125 is similar, but the plugboard has been replaced by a card reader that offers a stronger encryption by providing a non-self-reciproke permutation. The keyboard (at the right) is used for the input. It consists of 30 electrical contacts; one for each key. Furthermore, the keys are mechanically encoded into a 5-bit digital code (similar to Baudot). When typing, the current from the 30 contacts is passed to the card reader at the top right.




From the card reader, the current is passed via the static entry disc, through the 10 cipher wheels. After the current arrives at the reflector on the left, it is returned through the 10 wheels, the entry disc and the card reader, until it arrives at the 5-bit encoder (bottom right), where the 30 lines are converted into a 5-bit code (similar to, but different from Baudot) for the printer.


Cracking the Fialka


Cryptanalysis of Fialka was difficult, but not impossible. The ten rotors with 30 character positions each and two ways to slot in the rotor (forwards and backwards) gave a massive number of starting configurations, over 604 quadrillion possibilities! Adding in the later upgrade of a rotor with changeable wirings gives another 403 heptillion, or 403 trillion trillion possibilities. Like in Enigma, the rotors themselves can be rearranged in another ten factorial, or 3.6 million ways. Finally, a day key can be inputted on a punch card that swaps certain letters, functioning like the Enigma’s plugboard. Multiplying, we see that even without the day key, the number of possible starting configurations number in at 8.7 followed by fifty zeroes.

The increasing complexity of electromechanical ciphers using rotor technology had its limitations. Israel captured a machine during the 6 Day War in 1967, and the NSA built a computer to decrypt Fialka traffic fairly easily (Courtois, 2012). The fact was, rotor ciphers became so frequently used that finding a method of cryptanalysis was hardly new territory. Rotor machines and electromechanical ciphers had already begun to reach the end of their usefulness when digital computing delivered the deathblow.


We hope you find this blog insightful and a pleasant read. Please like and share it with your friends and do comment on what more you would like to read!

Thursday, 28 May 2020

Purple - The Japanese Secret

Hello, there fellow readers! We are back with episode 2 of the mini-series “Decrypting World War II communications”. Different countries developed different encoded forms of communication influenced by their language and culture and infused them with technology. Previously, we decoded the most popular cipher machine in Germany, and today, it will be Japan’s.

The “Type B Cipher Machine” or popularly known by “Purple” as coined by the United States, was an encryption machine used by Japanese Foreign Office right from Feb 1939 till the end of World War II, pretty consistent, right?

Purple was called Type B Cipher Machine because it was the successor of a Japanese machine called “Red” from which most of the properties were inherited but with positive modifications to cover the flaws.



97 shiki-obun In-ji-ki or Alphabetical Typerwriter’97 or Purple was important for Japanese to send diplomatic and military messages like the 14-part message, 5000 characters long note sent to the Washington embassy of Japan stating the broken-off negotiations between the United States and Japan which were considered as “The Failed Attempt To Avert The War with Japan, 1941”.


History


In 1937, the Japanese completed the next generation "Type 97 Typewriter". The Ministry of Foreign Affairs machine was the "Type B Cipher Machine", codenamed Purple by United States cryptanalysts.

The chief designer of Purple was Kazuo Tanabe. His engineers were Masaji Yamamoto and Eikichi Suzuki. Eikichi Suzuki suggested the use of a stepping switch instead of the more troublesome half-rotor switch.

Clearly, the Purple machine was more secure than Red, but the Navy did not recognize that Red had already been broken. The Purple machine inherited weakness from the Red machine that six letters of the alphabet were encrypted separately. It differed from Red in that the group of letters was changed and announced every nine days, whereas in Red they were permanently fixed as the Latin vowels 'a', 'e', 'i', 'o', 'u' and 'y'. Thus US Army SIS was able to break the cipher used for the six letters before it was able to break the one used for the 20 others.


Working


The System overview mentioned below is based on the replicate of the original one because the original was made sure never to be found. Find the reference to the overview here, Cryptoanalysis of Purple - presented by Barjol Lami, Gledis Kallco, Nicholas Guo, Sean Shi.


Elements of the Purple machine




Type B cipher machine has three main elements: input plugboard, permutation switches, and output plugboard.


Input Plugboard


It consists of two parts - the internal and the external alphabets. The external alphabet is the input from the user and each external letter was mapped manually to one of the internal alphabets so that every permutation of mapping would be valid. The internal alphabets were used in the encryption. They were further categorized as sixes and twenties; the vowels and the consonants respectively and each internal letter were encrypted in either a vowel or a consonant. This was actually a step of improvement because in Type A Cipher Machine, “like mapped to like” which made it easy to recognize.


Switches


After a letter goes through the input plugboard, it can be encrypted in two varied ways depending on whether it maps to one of the sixes (the vowels) or one the twenties (the consonants). Sixes get permuted through a switch called the sixes switch. It has 25 possible positions, which means 25 possible permutations of the sixes out of 6! = 720 that is the total space of permutations. The twenties have bigger space of possible permutations. They get permuted through 3 consecutive switches called twenties switches, each of which has 25 possible positions. Combined, 3 twenties rotors can produce 253 possible permutations for the twenties. Every time a letter gets encrypted by the machine, the sixes switch and one of the twenties switches will change the position. By doing this the machine generates a new alphabet permutation for the next letter to be encrypted.


Output Plugboard


The switches permute the input of the internal alphabet of input plugboard to the internal alphabets of output plugboard. From the internal alphabet of the output plugboard, letters then map to the output typewriter through the same identical mapping as the input plugboard.


Stepping Switches


The machine only uses the rotors to change the permutation alphabet for each letter. Each of the positions of the switches does a unique permutation of its respective input space. The permutation by each of the positions is created in a manner such that no two of the 3125 permutations from the twenties are the same.

The twenties switch advance based on the label they have. Each of them can get labeled as ”fast”, ”middle” and ”slow” so that gives 6 different possible labelings. Based on their names, the ”fast” switch will advance more quickly than the ”middle” one, which will advance more frequently than the ”slow” one. More precisely, the ”slow” switch advances every time the sixes reach position 24 and the ”middle” switch is at position 25. The ”middle” switch advances every time the sixes switch is at position 25 and the ”fast” switch is at position 25 and the ”fast” switch moves every other time.
If we analyze the structure of the machine, we see that there are 253 possible starting positions for the twenties switches. In addition, are 6 different ways we can label them as ”fast”, ”middle” and ”slow”. There also 25 different starting positions for the sixes.

Considering also the 26! possible permutations of the alphabet that depends on the wiring the user decides to use in the plugboard, in total we get: 6 •253 •25•26! ≈ 9.45∗1032 possible keys.


An Example


Here, we can see the encryption of a letter that is mapped to one of the sixes. On the left, there’s the input plugboard. In our case, it takes K as external input from Typewriter and outputs U as internal input. On the right of the figure we see the output plugboard which gets E from the internal output and outputs S. In the middle, the sixes switch permutes letter U depending on the permutation in position 3 of the 25-position switch and outputs E. For the Typewriter, this is equivalent to encrypting K to S, due to the plugboards.





How the US cracked Purple?


The Japanese built the machine based on its previous version Red, where the 6 vowels were permuted within themselves and used the same separation for the internal plugboard. They added the permutation from the external alphabet to the internal plugboard, but that turned out to not add complete security to the fact that these 6 letters are treated separately, especially since Americans had previous messages from Red and knew about the 6-20 split.



In 1939, cryptography expert William Friedman was chosen by the U.S. Army to work on breaking the Purple cipher. Fortunately, in eighteen months, he was able to make some progress before this, and, using his incomplete work, other members of his team were able to make continued progress. A precise chunk of the code was broken, and even though a Purple Machine had never been seen by American codebreakers, eight functional replicas of the Machine were created. Eventually, Purple Machine’s method of encryption was completely discovered. In time, Lt. Francis A. Raven discovered a pattern being used by the Japanese in their daily keys. He noticed that each month was broken into three ten-day

segments in which a pattern was discerned. With the final touches made to the puzzle by Lt. Raven, the Purple cipher was effectively broken and Japanese secrets were exposed.

Purple was considered to be a pretty wonderful cipher machine that displayed the advancement of technology with purpose. But every problem has a solution because we are humans. Somewhere in olden days, far away communication was impossible but with need, an invention was born. The US army utilized this decoding and broke a multitude of Japanese secret messages, even some containing the plans for the attack on Pearl Harbor which could have been used to prepare. However, as history reveals, not all of these were used to their full potential.

We hope you find this article insightful. Our sole motto is to elevate your knowledge in cryptography and who knows someone among you can invent the amazing cipher machine which can be called as the next unbreakable. Do like and share it and stay tuned till next Thursday. We will be back!

Thursday, 21 May 2020

Enigma - The Once Unbreakable

“Sometimes it’s the people no one imagines anything of who do the things no one can imagine.” - Alan Turing

We all are well introduced with world wars from our history classes that our dear world survived and still stand with its head held up high. During World War II, Germany with the hope of winning for the second time employed an encryption device to protect commercial, military, and diplomatic conversions which were known as “Engima”.

Enigma has an electromechanical rotor mechanism that scrambles 26 letters of English alphabets. When the plain text was entered in, the lit-up letters are the encoded ciphertext. Entering ciphertext transforms it back into readable plaintext. The rotor mechanism changes the electrical connections between the keys and the lights with each keypress. 

History


The German engineer Arthur Scherbius by the end of World War I invented an encryption device by 1918 and finished marketing it under brand name “Enigma” by 1923. The early models were being in the application by the 1920s adopted by several countries and mostly by Nazi Germany before WW II. Several different models inspired from it were made but the most complex was the German one. Many people know that when invented by the Germans, the information was first leaked to the French, and the first reconstruction was created by the Pole before it was offered to Britain's codebreakers as a way of deciphering German signals traffic during World War Two. As a result of the information gained through this device, it has been claimed, hostilities between Germany and the Allied forces were curtailed by two years.


How Does It Work?


Enigma allowed the operator to type in a message and scramble it with three to five notched wheels or say rotors that were fitted inside which displayed different letters of the alphabets. The receiver needed to know the exact settings of these rotors to reconstitute the coded text. Over the years the basic machine became more complicated, as German code experts added plugs with electronic circuits.
The more interesting thing about Enigma was the setting of the rotor which made it more complex. Each month, Enigma operators received codebooks that specified which settings the machine would use each day. Every morning the code would change.

The following setting example has been referenced from https://brilliant.org/:

For example, one day, the codebook may list the settings described in the day-key below:


1. Plugboard settings: A/L – P/R – T/D – B/W – K/F – O/Y


A plugboard similar to an old-fashioned telephone switchboard has ten wires, each wire having two ends that can be plugged into a slot. Each plug wire can connect two letters to be a pair (by plugging one end of the wire to one letter’s slot and the other end to another letter). The two letters in a pair will swap over, so if “A” is connected to “Z,” “A” becomes “Z” and “Z” becomes “A.” This provides an extra level of scrambling for the military.

To implement this day-key first you would have to swap the letters A and L by connecting them on the plugboard, swap P and R by connecting them on the plugboard, and then the same with the other letter pairs listed above. Essentially, one end of a cable would be plugged into the "A" slot and the other end would be plugged into the L slot. Before any further scrambling happens by the rotors, this adds a first layer of scrambling where the letters connected by the cable are encoded as each other. For example, if I were to encode the message “APPLE” after connecting only the "A" to the "L", this would be encoded as “LPPAE”.


2. Rotor (or scrambler) arrangement: 2 — 3 —1


The Enigma machines came with several different rotors, each rotor providing a different encoding scheme. To encode a message, the Enigma machines took three rotors at a time, one in each of three slots. Each different combination of rotors would produce a different encoding scheme. Note: most military Enigma machines had three-rotor slots though some had more.

To accomplish the configuration above, place rotor #2 in the 1st slot of the enigma, rotor #3 in the 2nd slot, and rotor #1 in the 3rd slot.

3. Rotor orientations: D – K –P
 

On each rotor, there is an alphabet along the rim, so the operator can set in a particular orientation. For this example, the operator would turn the rotor in slot 1 so that D is displayed, rotate the second slot so that K is displayed, and rotate the third slot so that P is displayed.

Each of the three rotors will display a number or letter (the rotors in the image above have letters), and when the rotors turn, a new set of three numbers/letters appears. With the initial set of three numbers/letters (meaning the numbers/letters on the sender’s machine when they began to type the message), a message recipient can decode the message by setting their (identical) Enigma machine to the initial settings of the sender’s Enigma machine. Each rotor has 26 numbers/letters on it. An Enigma machine takes three rotors at a time, and the Germans could interchange rotors, choosing from a set of five, resulting in thousands of possible configurations. For example, one configuration of rotors could be rotor #5 in slot one, rotor #2 in slot two, and rotor #1 in slot three.

In the first slot, there are 5 rotors to pick from, in the second there are 4 rotors to pick from, and in the third slot there are 3 rotors to pick from. So there are 5* 4* 3 = 60 ways to configure the five rotors.

There are 26 starting positions for each rotor, so there are 26×26×26=17,576 choices for initial configurations of the rotors’ numbers/letters.

The features above describe the components of commercial Enigma machines, but military-grade machines have additional features, such as a plugboard, which allows for even more configuration possibilities. Since there are 26 letters in the alphabet, there are 26! ways to arrange the letters, but the plugboard can only make 10 pairs, so there are 20 letters involved with the pairings, and 6 leftovers that must be divided out.

 Furthermore, there are 10 pairs of letters, and it does not matter what order the pairs are in, so divide also by 10! and the order of the letters in the pair does not matter. The resulting number of combinations yielded by the plugboard is as follows = 150,738,274,937,250. Therefore, there are 158,962,555,217,826,360,000 total number of ways to set a military-grade Enigma machine.


How was the Enigma decrypted by Britishers?


Alan Turing played a key role in decrypting the Enigma which resulted in the Germans’  defeat. He along with a colleague Gordon Welchman created a machine named “Bombe”.This device helped to significantly reduce the work of the code-breakers. From mid-1940, German Air Force signals were being read at Bletchley and the intelligence gained from them was helping the war effort.

After all the efforts made by the polish, the Germans added two more rotors which complicated the recognition of messages by them. Therefore, on 26 and 27 July 1939, in Pyry near Warsaw, the Poles initiated French and British military intelligence representatives into their Enigma-decryption techniques and equipment, including Zygalski sheets and the cryptologic bomb, and promised each delegation a Polish-reconstructed Enigma. The demonstration represented a vital basis for the later British continuation and effort.

In September 1939, British Military Mission 4, which included Colin Gubbins and Vera Atkins, went to Poland to evacuate code-breakers Gwido Langer, Marian Rejewski, Jerzy Różycki, and Henryk Zygalski out of the country with their replica Enigma machines. The Poles were taken across the border into Atkins' native Romania, at the time a neutral country where some of them were interned. Atkins arranged for their release and onward travel to Western Europe to advise the French and British, who at the time were still unable to decrypt German messages.

Gordon Welchman, who became head of Hut 6 at Bletchley Park, has written: "Hut 6 Ultra would never have gotten off the ground if we had not learned from the Poles, in the nick of time, the details both of the German military version of the commercial Enigma machine, and of the operating procedures that were in use.

During the war, British cryptologists decrypted a vast number of messages enciphered on Enigma. The intelligence gleaned from this source, codenamed "Ultra" by the British, was a substantial aid to the Allied war effort.

Though Enigma had some cryptographic weaknesses, in practice it was German procedural mistakes, failure to systematically introduce changes in encipherment procedures, and Allied capture of key tables and hardware that, during the war, enabled Allied cryptologists to succeed and "turned the tide" in the Allies' favor.

Stay Tuned for the upcoming blogs included in the five-blog mini-series “Decrypting World War II communications”.