Você está na página 1de 5

The Alberti Cipher is a type of polyalphab etic cipher.

A polyalphabetic cipher is similar to a

1. Substitution , cipher. In som e cases the multiple alphabets are just rotatio ns of the existing the existing alphab et.
This generates an encrypted ciphertext that cannot be solved by simple frequency analysis, because the mapping of plaintext letters to ciphertext letters is one-to-many, which is to say the plaintext letters have different ciphertext corespondents at different places in the text. The Alberti cipher is a particular kind of polyalphabetic cipher, and ope rates as described below.

Encrypting a Message with Alberti Cipher


1. The process of encrypting into the Alberti cipher is simplified by Alberti's discs. On the inner disc was a mark which could be lined up with a letter on the outer disc as a key, so that if you wanted to encrypt or decrypt a message you only needed to know the correct letter to match the mark to. In order to decrypt a message written using Alberti's discs you had to have a matching alphabet on your inner disc. To make matters more complicated the disc could be turned during an encryption so that a different alphabet is used periodically. This was the first instance of the polyalphabetic cipher. When encrypting an interval of rotation can be predetermined by those reading and writing the ciphertext, adding a shift based on the letters in a secret shared keyword. The traditional discs shown below were the only method of using this type of cipher until the 16th century. Below is an example of Alberti's cipher disc. (NOTE: In this diagram, the letters on the outer disc should be uppercase and those on the inner disc should be lowercase. The example given below is based on this representation of the disk. Click here for an image of the actual Alberti cipher disk. )

Alberti's 20 character Latin alphabet can be seen around the outer ring of the discs, the four numbers at the end being, again, used in reference to a codebook containing preselected phrases. Alberti deliberately left numbers off the inner disc so no numbers appeared in the ciphertext, so it contained a scrambled version of the normal Latin alphabet instead of Alberti's. This was a very effective method of concealing the code-numbers, since they blended in with the other garbled words, becoming indestinguishable. The Alberti cipher was not periodic. Each correspondent had a different randomized alphabet in his position. In the 16th century Giovan Battista della Porta used a system of keywords to implement a cipher that can be seen as a variation of the Alberti cipher. One keyword was used to form a permutation of the alphabet, the other keyword was used to specify a sequence for the multiple alphabets to occur in. This technique, which was labeled the 'double cipher' has been more accurately described as polyalphabetic. Porta's permutation technique was based on a 2dimensional table, for an example here's a version of Porta's table based on a 26 character alphabet: Equivalent to the outer disc abcdefghijklmnopqrstuvwx yz 0ALBERTICPHDFGHJKMNOSUVWXYZ 1ZALBERTICPHDFGHJKMNOSUVWXY N 2YZALBERTICPHDFGHJKMNOSUVWX u 3XYZALBERTICPHDFGHJKMNOSUVW m 4 W X Y Z A L B E R T IC P H D F G H J K M N O S U V b 5VWXYZALBERTICPHDFGHJKMNOSU e 6UVWXYZALBERTICPHDFGHJKMNOS r 7SUVWXYZALBERTICPHDFGHJKMNO 8OSUVWXYZALBERTICPHDFGHJKMN o 9NOSUVWXYZALBERTICPHDFGHJKM f 10 M N O S U V W X Y Z A L B E R T I C P H D F G H J K 11 K M N O S U V W X Y Z A L B E R T I C P H D F G H J S 12 J K M N O S U V W X Y Z A L B E R T I C P H D F G H h 13 H J K M N O S U V W X Y Z A L B E R T I C P H D F G i 14 G H J K M N O S U V W X Y Z A L B E R T I C P H D F f 15 F G H J K M N O S U V W X Y Z A L B E R T I C P H D t 16 D F G H J K M N O S U V W X Y Z A L B E R T I C P H s 17 H D F G H J K M N O S U V W X Y Z A L B E R T I C P 18 P H D F G H J K M N O S U V W X Y Z A L B E R T I C 19 C P H D F G H J K M N O S U V W X Y Z A L B E R T I 20 I C P H D F G H J K M N O S U V W X Y Z A L B E R T 21 T I C P H D F G H J K M N O S U V W X Y Z A L B E R 22 R T I C P H D F G H J K M N O S U V W X Y Z A L B E 23 E R T I C P H D F G H J K M N O S U V W X Y Z A L B 24 B E R T I C P H D F G H J K M N O S U V W X Y Z A L 25 L B E R T I C P H D F G H J K M N O S U V W X Y Z A

In this case the uppe rcase-letters correspo nd to the rand omized inner alphabet of the discs, we use ALB ERT ICIPH ER as the keyword to form the alphabet. The top letters correspond to the outer disc, and the numbers on the left represent the indexes of the multiple alphabets, a second keyword is used to denote a sequence of indexes used to select a row for the table. For Porta's type of cipher, the cryptographic key would consist of the permutation given in the first row of the table plus the shift that should be made after each letter of plaintext. Each new shift value, in P orta's method, or each cha racter in the second keywo rd, signifies a new ciphertext alphabet. As an exam ple of this cipher we encrypt the message "this is a test of alb erti" using the tab le abo ve. An Example of Alberti Cipher W e beg in by writing the seco nd keyword , CATW ALK , repeatedly under the plaintext.

this is a test of alberti CATW AL K CATW AL KCATWAL


No w replace the letters in the keyword with their num ber equivalents, where A= 0, B=1, C=2 and so on.

t--h--i--s i--s a t--e--s--t o--f a--l--b--e--r--t--i 2 0 19 22 0 11 10 2 0 19 22 0 11 10 2 0 19 22 0 11


Next the character corresponding to the coordinates, defined by the plaintext character and the index shift value, (i.e. (t,2) = N, (h,0) = C, etc.)

this is a test of alberti NCKW PC M NRZX JU MHLFVSX


The message is obviously unrecognizable. Also it should be noted that frequency analysis is useless since, noncorresponding letters h and s , and t and i have bo th been reassigned to matching letters C and X , respectively. Decrypting a M essage with the Alberti Cipher To decrypt a sec ret message, write out the encryp ted characters with their corresponding shifts.

N--C--K--W P--C M N--R--Z--X J--U M--H--L--F--V--S--X c--a--t--w a--l k c--a--t--w a--l k--c--a--t--w--a--l 2 0 19 22 0 11 10 2 0 19 22 0 11 10 2 0 19 22 0 11
Now you could look up the plaintext characters in a table like the one above, only with the plaintext and permutation alpha bets switched, to get the original message.

this is a test of alberti

Implementation of the Alberti Cipher W e have implemented a version of Alberti'd cipher as a part of HcryptoJ API, using the classes AlbertiEngine.java, which handles substitutions, and AlbertiKey.java, which utilizes the keywords. The computer implements the cipher first by forming a plaintext-alphabet, and then a ciphertext-alphabet, which is based on a keyword. In the table above the keyword was ALB ERT ICIPHE R (with the repeated characters drop ped), so the a lphabet was formed w ith those chara cters and then the rem aining charac ters in the alphab et are adde d alphabetically. A se cond keyw ord is used to create the period and se quence o f shifts, for instanc e:

Key2 = CATWALK Cycle = CATWAL KC ATWALK Message = Encode Me Please


The key is wrapped until the message is filled, then the corresponding numerical value of the letter within the plaintext (a=0, b=1, c=2 . . .) is used to encode the characters in the message, taking the index of the plaintext, adding the shift value taken from the second key, modulo 26, and then leaving a the index of a ciphertext character. Again, this is simplified by the com puter into two arrays containing the alphab ets, where eac h character is listed in its alpha betical orde r, and given a numb er, corresponding to that orde r, which is the index. This pro cess is simplified to the mathematical algorithm

(PlaintextCharacterIndex+Shift)%26 = CiphertextCharacterIndex
The pro cess wo rks a lot like add ition, whe re the charac ters rep resent numb ers in a m od 2 6 num ber set.

ENCODE ME PLEASE + CATWAL KC ATWALK -------------------------------BHHOXS BB KOPACU

Recognizing Polyalphabetic Ciphers The Alberti Cipher and all its relations, the polyalphabetic ciphers, are distinguished by their effect on letter frequencies. Assuming the language being de alt with is English, then the letter 'E' would no rmally be the mo st frequent letter, or in a mono-alphabetic cipher some other letter would be assigned the same frequency as 'E'. With a polyalphabetic cipher this does not occur. A letter may repeat and mean two different things, or never occur, even though when decrypted it is the most frequent letter in the writing. This invulnerability to frequency analysis is what caused Alberti to call his cipher unbreakable, and is the reason nearly all modern encryption is based on this method.

Analysis of Polyalphabetic Ciphers What if you don't have the key to a polyalphabetic cipher, how hard would it be to decipher a message? In general, polyalphabetic ciphers become more co mplex and harder to decipher the more frequent the shift change become s. Since the shift change is one of m any facto rs that co mplicate solving a polyalphabetic cryp togram, a system for solving the cryp togram mu st be develo ped that works aro und the changing shift. Jean-G uillaume-Hu bertVictor-Fra ncois-Alexandre-Auguste Kerckhoffs' metho d for so lving po lyalphabetic ciphers, published in 188 1 in his La C ryptographie militaire , required that multiple messages encrypted with the same key be used in conjunctio n, to form mo noalpha betic ciphers.

123456... Message1 U L A K M H . . . Message2 I O W E Q V . . . Message3 B X Z E F N . . . ...

The cryptograms are stacked on top of eachother, and the columns form monoalphabetic ciphers, which can be solved through many means, including frequency analysis. In the above example 'U', 'I' and 'B' represent one monoalphab et set. This method beco mes easier when more messages are used. Kerckhoffs made a huge advancement in cryptology, since the previous method for solving polyalphabetic ciphers had restrictions on the type and length of the key, which meant long and elabo rate keys were nearly impossible to decrypt in this fashion. T his is to say, ev en if you have many messages using the same key, you still need to decipher a seperate monoalphabetic cipher for every chara cter in any message you decid e to decrypt. Polyalphab etic ciphers suc h as the o ne de velop ed by Alberti represent the backbone of modern encryption, and gave rise to such marvels as the enigma machine, and have come a long way from the Renaissance Man's "unbreakable cipher."

Você também pode gostar