Skip to main content
Codes & LettersCiphers, scripts, symbols — every code humans write, taken apart.

Vigenère Cipher: Named for a Man Who Didn't Invent It

Codes & Letters

Published
Last substantive revision

CipherSpec card

Name
Vigenère cipher (a repeating-key polyalphabetic cipher)Source: Wikipedia, "Vigenère cipher"
Type
Polyalphabetic substitution: a repeating keyword gives each letter its own Caesar shiftSource: Gaines, Elementary Cryptanalysis (1939), chapter XII
Era
In print from 1553; still taught in a 1916 US Army manualSource: Bellaso, La cifra (1553); Hitt, Manual for the Solution of Military Ciphers (1916)
Inventor or user
First described by Giovan Battista Bellaso (1553); named after Blaise de Vigenère, whose Traicté des chiffres (1586) shows repeating keys and an autokeySource: Wikipedia, "Vigenère cipher" and "Giovan Battista Bellaso"; Bellaso, La cifra (1553); Vigenère, Traicté des chiffres (1586), folios 46–50
Broken
Kasiski's method of repeated stretches, published 1863; William F. Friedman's index of coincidence, 1922Source: Gaines, Elementary Cryptanalysis (1939), chapter XIV and bibliography; Wikipedia, "Kasiski examination" and "Index of coincidence"
Strength against frequency attack
Flattens the letter counts of the whole message; once the keyword length is known, each column is a Caesar shift. In the test on this page, 475 letters gave up the keyword BELLASOSource: this page's test

vigenere-cipher-spec.csv the values on this card, as CSV

Square of 26 shifted alphabets; the column for plain i and the row for key B are outlined and cross at J.
"The square table: plain i under key letter B gives J" by Codes & Letters, CC BY 4.0. Source: https://codesandletters.com/ciphers/vigenere-cipher/. License: https://creativecommons.org/licenses/by/4.0/

The square of 26 shifted alphabets. The plain letter picks the column, the key letter picks the row, and the cipher letter sits where they cross.

In a Vigenère cipher, a keyword written over the message gives each letter its own Caesar shift. The method is named for Blaise de Vigenère. Yet Giovan Battista Bellaso printed a keyword cipher of this kind in Venice in 1553, 33 years before Vigenère's book on ciphers.

Breaking it is a matter of counting. Repeated stretches of ciphertext can give away the length of the keyword, as Friedrich Kasiski showed in print in 1863. So can the index of coincidence, a measure built from letter counts that William F. Friedman published in 1922. Once the length is known, the message splits into columns, and each column is a plain Caesar cipher.

How does the Vigenère cipher work?

Number the letters from A = 0 to Z = 25, then encipher in three steps:

  1. Write the keyword over the message, one key letter per message letter, starting the keyword again each time it runs out.
  2. Add the number of each message letter to the number of the key letter above it.
  3. If the sum is 26 or more, subtract 26. What is left is the number of the cipher letter.

To decipher, subtract the key numbers instead, and add 26 whenever the result falls below 0.

Try it on the opening words of A Tale of Two Cities with the keyword BELLASO. The i of "It" is 8 and the B above it is 1, so the first cipher letter is 9, which is J. The t is 19 and E is 4, giving 23, or X. The w is 22 and L is 11; their sum, 33, is past 25, so 26 comes off and 7 is left, which is H.

Table of the first 14 letters: plain and key numbers added, 26 taken off past 25; i and B give J, t and E give X.
"Enciphering letter by letter with the keyword BELLASO" by Codes & Letters, CC BY 4.0. Source: https://codesandletters.com/ciphers/vigenere-cipher/. License: https://creativecommons.org/licenses/by/4.0/

The first 14 letters of the opening paragraph of A Tale of Two Cities, enciphered with the keyword BELLASO. Each column adds two numbers and subtracts 26 when the sum passes 25.

A Vigenère cipher differs from a Caesar cipher in the number of shifts. A Caesar cipher moves every letter the same number of places, so a given plain letter always turns into the same cipher letter. Under BELLASO each letter takes the shift of the key letter above it, and the shifts repeat every seven letters. The three t's among the first 14 letters become X, L and T.

Every ciphertext on this page was produced and checked by a program. The same program matches the worked examples in Parker Hitt's 1916 US Army manual and Helen Fouché Gaines's 1939 textbook Elementary Cryptanalysis. It also passes the test cases of the open-source pycipher library. All of them are in the test-vector file under Sources.

Who really invented the Vigenère cipher?

The keyword idea was in print before Vigenère wrote about it. Giovan Battista Bellaso's booklet La cifra came out in Venice in 1553. The Wikipedia entries on the cipher and on Bellaso both credit him with first describing it. In the booklet, the key is a countersign, a few agreed words written over the message letter by letter and begun again whenever they run out.

Printed table of 1553: 11 rows labeled AB to YZ, each pairing two lines of 11 lowercase letters.
Image credit and license (full text)"Bellaso 1553" by Giovan Battista Bellaso — Public domain (page of La cifra del Sig. Giovan Battista Belaso, printed in Venice in 1553, by Giovan Battista Bellaso (born 1505, dead by 1581): public domain in the US as a work published before 1931 and in the EU, where terms run for the life of the author plus 70 years; a faithful photographic reproduction of a two-dimensional printed page adds no new rights in the US (Bridgeman principle) or the EU (DSM Directive Article 14); Commons PD-old) — https://commons.wikimedia.org/wiki/File:Bellaso_1553.JPG

A page of Bellaso's La cifra (Venice, 1553): a table of reciprocal alphabets whose 11 rows are labeled with pairs of key letters, from AB to YZ.

Bellaso's table is not the modern square. Each row serves two key letters. Its alphabet has no j, k or w and treats u and v as one letter, so it has 22 letters, not the 26 of the square at the top of this page. How the Latin alphabet grew from 21 letters to 26 is traced on Latin Alphabet.

Blaise de Vigenère's Traicté des chiffres came out in Paris in 1586, according to the record of the copy at the University of Liège. The 1911 Encyclopaedia Britannica gives 1587. Folios 46 to 50 of the Liège copy show a table of 10 paired alphabets like Bellaso's and a square of 20 shifted alphabets, with a key that runs letter by letter and starts again "de nouveau" (anew).

The same folios go a step further. Starting from a single key letter, D, each letter of the message becomes the key for the next. The scheme is now called an autokey. On folio 50, Vigenère writes that the abbot Trithemius already knew the square table, in his Polygraphia.

Timeline 1518–1939: Trithemius, Bellaso 1553, Vigenère 1586, Kasiski 1863, Carroll 1868, Britannica, Hitt, Friedman, Gaines.
"Who printed what, and when" by Codes & Letters, CC BY 4.0. Source: https://codesandletters.com/ciphers/vigenere-cipher/. License: https://creativecommons.org/licenses/by/4.0/

Dated points from the sources on this page, from Trithemius's Polygraphia (1518) to Gaines's textbook (1939). Markers sit on a scaled axis; the labels are evenly spaced.

The Wikipedia entry on the cipher says the scheme was wrongly credited to Vigenère in the 19th century. By the 20th, the name was in American manuals: Hitt's 1916 manual calls the Larrabee cipher, used between government departments, "the Vigenere cipher of the 17th Century." Gaines in 1939 lists "the Vigenère (1586)" among the earliest ciphers of its kind. Her textbook never mentions Bellaso.

Claims that it could not be broken carry dates too. In 1868, five years after Kasiski published, Lewis Carroll's pamphlet The Alphabet-Cipher said that it would be "impossible for any one, ignorant of the key-word, to decipher the message." The 1911 Britannica still called deciphering such keyword tables "one of the most difficult of tasks." The program behind this page also reproduces Carroll's own example, with the key vigilance, and Vigenère's autokey example with its starting letter D.

Why don't letter counts give the key away?

Across the 2,056,552 letters of the three English novels counted on Letter Frequency, e makes up 12.52%, about one letter in eight, and z only 0.09%. A Caesar shift of 3 slides that whole pattern three places along, so h now holds the 12.52%. Cryptography teaching calls that uneven profile a frequency fingerprint. It survives a cipher that always swaps each letter for one fixed letter, as long as the message is long.

Encipher the same letters with BELLASO and the pattern smears. A plain e becomes f, i, p, e, w or s, depending on where it falls under the keyword. The tallest cipher letter, s, reaches only 7.64%, and the rarest, k, still has 1.71%. By this page's count, the tallest bar is 4.5 times the shortest, against about 144 times in the novels as written.

Bar charts: e tops English at 12.52%; a Caesar shift moves the peak to h; keyword BELLASO flattens it, tallest s at 7.64%.
"Letter counts: a Caesar shift moves them, a keyword flattens them" by Codes & Letters, CC BY 4.0. Source: https://codesandletters.com/ciphers/vigenere-cipher/. License: https://creativecommons.org/licenses/by/4.0/

The same 2,056,552 letters three ways: as written, after a Caesar shift of 3, and after the keyword BELLASO. The shift moves the profile; the keyword flattens it.

The same English counts come back on the Morse code page, set against the length of each letter's signal.

Illustration: a hand reaching for a folded letter sealed with plain red wax on a desk with a quill and inkwellGenerated illustration
Illustration: Codes & Letters. Generated schematic image — not a photograph or historical record. Reuse: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), to the extent any copyright exists in this image.

A writer's desk of the 1500s, when Bellaso printed his keyword cipher. Under the keyword BELLASO, a plain e can become f, i, p, e, w or s.

How do you decrypt a Vigenère cipher without the key?

Vigenère ciphertext can be read without the key in four steps:

  1. Find the keyword's length, from repeated stretches of ciphertext or from the index of coincidence.
  2. Write the ciphertext in that many columns, so every letter in a column was shifted by the same key letter.
  3. Solve each column as a Caesar cipher, comparing its 26 letter counts with ordinary English, as on the Caesar cipher page.
  4. Read the keyword off the columns and subtract it to recover the message.

The opening paragraph of A Tale of Two Cities says "it was the" ten times. When two of them fall under the same part of the keyword, they come out the same. In the 475-letter ciphertext, AHXEDEHW turns up four times, 63, 21 and 91 letters apart, all multiples of 7. Of the 26 pairs of matching stretches three or more letters long, 22 sit a multiple of 7 apart; the other 4 pair up different plain letters by chance.

Ruler: repeat AHXEDEHW at 20, 83, 104 and 195, gaps 63, 21, 91; bar chart: 7 divides 22 of 26 gaps.
"Repeats in the ciphertext sit a multiple of 7 letters apart" by Codes & Letters, CC BY 4.0. Source: https://codesandletters.com/ciphers/vigenere-cipher/. License: https://creativecommons.org/licenses/by/4.0/

Repeats in the 475-letter ciphertext. Top: the stretch AHXEDEHW at four positions, each gap a multiple of 7. Bottom: across 26 pairs of repeats, 7 divides 22 of the gaps.

Gaines writes that such ciphers had been "regarded as entirely safe" before the 1860s. She dates the change to 1863, when "Major F. W. Kasiski, a German cryptanalyst, was so indiscreet as to publish certain of his observations." Her textbook also shows Edwin Lindquist's tabulation for tallying each gap's prime factors.

The Wikipedia entry on the cipher says Charles Babbage broke a variant of it as early as 1854 but did not publish his work, and that studies of his notes suggest he was using Kasiski's method as early as 1846. In 1864, Babbage wrote that he was inclined to think deciphering "an affair of time, ingenuity, and patience" and described having an English dictionary copied into separate lists by word length. This site's position is that codebreaking runs on tables and counting of this kind, not on solitary inspiration.

How does the index of coincidence find the keyword length?

The index of coincidence is the chance that two letters drawn from a text, without putting the first one back, are the same letter. To compute it, multiply each letter's count n by n − 1, add up the 26 results, and divide by N × (N − 1), where N is the number of letters. William F. Friedman's paper on it, Riverbank Publication No. 22, came out in 1922, according to the bibliography in Gaines's textbook.

By this page's count, the three English novels score 0.0654, and letters drawn evenly at random score 1/26, or 0.0385. A Caesar shift leaves the novels at 0.0654, while the keyword BELLASO pulls them down to 0.0438. Split a Vigenère ciphertext into the right number of columns, though, and each column is back to a single shift, so its score rises again.

Bar chart: average column index of coincidence by guessed key length 1 to 15; 7 (0.0739) and 14 (0.0762) stand out.
"Splitting the ciphertext into 7 columns brings back English-like counts" by Codes & Letters, CC BY 4.0. Source: https://codesandletters.com/ciphers/vigenere-cipher/. License: https://creativecommons.org/licenses/by/4.0/

Average index of coincidence of the columns for each guessed keyword length, 1 to 15. Only 7 and 14 rise above the dashed line for the English novels.

For the Dickens ciphertext, guesses of 1 to 15 letters give column averages between 0.0436 and 0.0495, except at 7 (0.0739) and its double, 14 (0.0762). Both sit near the 0.0741 that the same paragraph scores before enciphering, and above the novels' 0.0654.

With the length set at 7, each column holds 67 or 68 letters. The chi-squared test from the Caesar cipher page then scores all 26 shifts of each column against the novels' counts. The best shifts spell B, E, L, L, A, S and O. In every column, the runner-up's score is at least 3.7 times the winner's.

The column tests lean on English letter counts; the German and French counts are tabled on Letter Frequency.

Sources

  1. 1

    Blaise de Vigenère, Traicté des chiffres, ou secretes manieres d'escrire (Paris: Abel L'Angelier, 1586), University of Liège Library copy R03777B, digitized in DONum.

    https://hdl.handle.net/2268.1/9711 (catalogue record; folios 46 to 50)

  2. 2

    Giovan Battista Bellaso, La cifra del Sig. Giovan Battista Belaso (Venice, 1553), Biblioteca Nazionale Centrale di Firenze copy, digitized in the Museo Galileo Digital Library.

    https://bibdig.museogalileo.it/Teca/Viewer?an=000000976325 (title page and pages 5–8)

  3. 3

    Giovan Battista Bellaso, La cifra del Sig. Giovan Battista Belaso (Venice, 1553), table of reciprocal alphabets; reproduction on Wikimedia Commons, "Bellaso 1553.JPG".

    https://commons.wikimedia.org/wiki/File:Bellaso_1553.JPG (the reproduced table and its file record)

  4. 4

    Lewis Carroll, The Alphabet-Cipher (pamphlet, 1868), Wikisource transcription.

    https://en.wikisource.org/wiki/The_Alphabet-Cipher_(1868) (full text)

  5. 5

    Charles Babbage, Passages from the Life of a Philosopher (London: Longman, Green, Longman, Roberts, & Green, 1864), chapter XVIII, "Picking Locks and Deciphering"; Project Gutenberg eBook #57532.

    https://www.gutenberg.org/ebooks/57532 (chapter XVIII, the section on deciphering)

  6. 6

    Parker Hitt, Manual for the Solution of Military Ciphers (Fort Leavenworth, Kans.: Press of the Army Service Schools, 1916), chapter VII; Project Gutenberg eBook #48871.

    https://www.gutenberg.org/ebooks/48871 (chapter VII)

  7. 7

    Dickens, Charles. A Tale of Two Cities. Project Gutenberg eBook #98, https://www.gutenberg.org/ebooks/98 (text file retrieved via the gutenberg.pglaf.org mirror, 2026-10-16).

    https://www.gutenberg.org/ebooks/98 (full text, as cut on the Letter Frequency page)

  8. 8

    Austen, Jane. Pride and Prejudice. Project Gutenberg eBook #1342, https://www.gutenberg.org/ebooks/1342 (text file retrieved via the gutenberg.pglaf.org mirror, 2026-10-16).

    https://www.gutenberg.org/ebooks/1342 (full text, as cut on the Letter Frequency page)

  9. 9

    Melville, Herman. Moby-Dick; or, The Whale. Project Gutenberg eBook #2701, https://www.gutenberg.org/ebooks/2701 (text file retrieved via the gutenberg.pglaf.org mirror, 2026-10-16).

    https://www.gutenberg.org/ebooks/2701 (full text, as cut on the Letter Frequency page)

  10. 10

    James Lyons, pycipher 0.5.1, tests/test_vigenere.py (commit 8f1d7cf, 2016), MIT License.

    https://github.com/jameslyons/pycipher/blob/8f1d7cf3cba4e12171e27d9ce723ad890194de19/tests/test_vigenere.py (test file and license)

  11. 11

    Helen Fouché Gaines, Elementary Cryptanalysis (American Photographic Publishing Co., 1939), chapters XII, XIV and XVI and the bibliography by W. D. Witt; Project Gutenberg eBook #75074.

    https://www.gutenberg.org/ebooks/75074 (chapters XII, XIV and XVI; bibliography)

  12. 12

    John Eglington Bailey, "Cryptography," Encyclopaedia Britannica, 11th ed., vol. 7 (Cambridge: Cambridge University Press, 1911); Wikisource transcription.

    https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Cryptography (full article)

  13. 13

    Wikipedia, "Vigenère cipher," revision of 2026-09-18.

    https://en.wikipedia.org/w/index.php?title=Vigen%C3%A8re_cipher&oldid=1375565192 (full article)

  14. 14

    Wikipedia, "Giovan Battista Bellaso," revision of 2026-03-29.

    https://en.wikipedia.org/w/index.php?title=Giovan_Battista_Bellaso&oldid=1346056274 (full article)

  15. 15

    Wikipedia, "Kasiski examination," revision of 2025-11-17.

    https://en.wikipedia.org/w/index.php?title=Kasiski_examination&oldid=1322610888 (full article)

  16. 16

    Wikipedia, "Index of coincidence," revision of 2025-08-31.

    https://en.wikipedia.org/w/index.php?title=Index_of_coincidence&oldid=1308818959 (full article)

Download the data: worked example, 475 letters (CSV) · repeated stretches (CSV) · index of coincidence (CSV) · key recovery by column (CSV) · letter shares, three ways (CSV) · test vectors (CSV) (Data: pycipher 0.5.1 test vectors by James Lyons (https://github.com/jameslyons/pycipher, commit 8f1d7cf3cba4e12171e27d9ce723ad890194de19), MIT License, Copyright (C) 2013 James Lyons, retrieved 2026-10-16) · timeline with sources (CSV)

Corrections

No corrections yet. Report an error through the corrections address in the page footer; every change is logged here as YYYY-MM-DD — what changed and why.

Decode next:

  • Letter Frequency: e is about one letter in eight in the English counts each column of a Vigenère message is held against, and close to one in six in German.
  • Latin Alphabet: how 21 letters became the 26 that fill the square at the top of this page.

Cite this page

Codes & Letters. “Vigenère Cipher: Named for a Man Who Didn't Invent It.” Codes & Letters. Published 2026-10-16. Last substantive revision 2026-10-16. https://codesandletters.com/ciphers/vigenere-cipher/. Accessed [the date you read it].