# How can the Enigma's plugboard settings be found with partially known plaintext?

I don't quite understand the procedure described on wikipedia, is there a generalized procedure you can follow to rule out a pairing on the plugboard?

For example, let's say the cipher text is

XOIWN LUKLV FPHZH VMWPX GLIEV NZTTC EKYEB QJP

And the known plaintext is

ATTACKATDAWN

What would i have to do to find out the original wiring on the plugboard, or which possibilities can we rule out?

There is a much better explanation available. See Graham Ellsbury's page here for full details, and a summary below:

Intuitively, what one does first is to drag the crib (known plaintext) accross the ciphertext and rule out relative positions which map a plaintext letter to itself in the ciphertext (since it is known that the Enigma mapping has no fixed points).

Afterwards, for each hypothesized setting that is compatible with the plaintext ciphertext pair, one iterates the enigma machine according to the setting, until one gets a contradiction, for example, say that in the hypothesised setting X maps to Z. But after a number of iterations, X then maps to G. This rules out the initial hypothesized setting.

This requires automation of the process of checking all these settings in parallel, and that's where the bombe mechanism comes in.

I have condensed the example from that page below:

Example After the crib dragging, there is the possibility that

RWIVTYRESXBFOGKUHQBAISE

is the encryption of

WETTERVORHERSAGEBISKAYA

(since there is no letter mapping to itself in this shift of the crib with respect to the ciphertext), for one of the 60 rotor orders, 17576 rotor positions, 676 Ringstellung positions and 150,000,000,000,000 stecker swappings.

One still needs to find out which setting.

Now numbering the positions, we obtain the table

12345678901234567890123
RWIVTYRESXBFOGKUHQBAISE
WETTERVORHERSAGEBISKAYA

where the number above X and H is 10, that above B and K is 20, etc.

This means we can derive a relationship graph

So, if the crib is correctly matched with the ciphertext, we know that some setting of the Enigma will encode R as W and W as R in a particular position which we will call position 1, the Enigma rotor(s) step and then in the next position, which we call position 2, it will encode W as E and E as W, then the rotor(s) step and then in the next position which we call position 3, it will encode I as T and T as I, and so on.

The linked page then goes through a fully detailed argument as to how the setting hypothesis can be verified or ruled out. This would have been done with the Bombes eventually, though Turing et al worked through this procedure by hand as well.