W O R D A B C F G H I J L M N P S T U V X Z A rectangle is defined by the two plaintext characters and the opposite corners define the ciphertext digraph. E X A M P L B C D F G H I J K N O R S T U V W Y Z K E Y W O R D A B C F G H I J L M N P S T U V X Z Using the vertical two-square example given above, we can encrypt the following plaintext: Plaintext: he lp me ob iw an ke no bi Ciphertext: HE DL XW SD JY AN HO TK DG Here is the same two-square written out again but blanking all of the values that aren't used for encrypting the digraph "LP" into "DL" - - - - - L - - D - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L - - P - - - - - - The rectangle rule used to encrypt and decrypt can be seen clearly in this diagram. The method for decrypting is identical to the method for encryption. Just like Playfair (and unlike four-square), there are special circumstances when the two letters in a digraph are in the same column for vertical two-square or in the same row for horizontal two-square. For vertical two-square, a plaintext digraph that ends up with both characters in the same column gives the same digraph in the ciphertext. For horizontal two-square, a plaintext digraph with both characters in the same row gives (by convention) that digraph with the characters reversed in the ciphertext. In cryptography this is referred to as a transparency. (The horizontal version is sometimes called a reverse transparency.) Notice in the above example how the digraphs "HE" and "AN" mapped to themselves. A weakness of two-square is that about 20% of digraphs will be transparencies. E X A M P L B C D F G H I J K N O R S T U V W Y Z K E Y W O R D A B C F G H I J L M N P S T U V X Z Two-square cryptanalysis