33 29 a m 22 29 17 16 z g l u 16 a 47 m
23 22 13 m 31 29 m a 41 l l 22 29 a
27 16 f i 16 22 29 m a 47 a 12 o

Warsaw → Cardinal Dietrichstein? · homophonic cipher in figures, at most two symbols per letter · 1627 · key recovered from the ciphertext alone; decoded, not read

“Di Varsouia 24 Xbre 1627”

Cardinal Franz von Dietrichstein
toCardinal Franz von Dietrichstein

24 December 1627 · Österreichisches Staatsarchiv, HHStA, Staatskanzlei Interiora, Chiffrenschlüssel Kt. 14 Fasc. 20 f. 176 · DECODE R1408

Three hundred figure groups and a scatter of letters, with only the dateline in clear; DECODE lists no decipherment · the key was recovered from the ciphertext alone. It is not a hard cipher: a homophonic substitution with at most two symbols per letter, the alphabet in plain order on the figures · every spelled word decrypted, ten word codes glossed from context · 95.2% of the significant tokens have a value; but the unread codes carry the titles, the adverbs and the object of the request, so the letter is decoded, not read (check of 23 October 2026)

Daniel Bourdeau · posted · updated

Method: key recovered from ciphertext-only · Extent: none (key obtained, text not read)

Credits · Satoshi Tomokiyo (transcription)

At a glanceCiphertext-only break · none (key obtained, text not read)

The letter
One page dated “Di Varsouia 24 Xbre 1627”, in Italian. The writer, lately received at Nikolsburg, asks for the canonry of Olmütz promised for a son of the Queen; a docket names Cardinal Dietrichstein as addressee.
Where
ÖStA, HHStA, Staatskanzlei Interiora, Chiffrenschlüssel Kt. 14 Fasc. 20 f. 176; DECODE R1408 (“Non-decrypted”).
The cipher
Figures and letters written without breaks: an alphabet in plain order on the two-figure groups 13–33, letter pairs for consonants, rare groups for syllables, three-figure groups for words.
How it was read
A simulated-annealing solver with a 5-gram Italian model converged on one key from random and seeded starts, an alphabet in plain order it was never told.
What it says
The canonry is still not conferred, “these Majesties” want it, and the writer asks for it to be done or for a prompt answer.
Still open
316 of 332 significant tokens are read (95.2%). Ten word codes and two small groups are glossed from context only; no matching key was found.
Credit
Transcription and first grouping: S. Tomokiyo.

01 The document

DECODE’s public record: one page, cipher, Non-decrypted (no decipherment on file), cipher type Simple substitution, Homophonic substitution, numerical symbol set, inline cleartext, a transcription on file, placeholder dates 1600–1799; images and documents need a login. (The image was fetched and checked on 2 October 2026; see section 06.) Tomokiyo: “The only cleartext at the beginning ‘Di Varsouia 24 Xbre 1627’ indicates the language is Italian … the numbers and letters are written without space in the original manuscript, but I believe my grouping into two- or three-digit groups is fairly straightforward. It is possible that some letters should be grouped (e.g., ‘zg’, ‘pr’, ‘fi’, ‘ll’).” His transcription, joined at those pairs:

33 29 a m 22 29 17 16 zg lu 16 a 47 m 23 22 13 m 31 29 m a 41 ll 22 29 a 27 16 fi 16 22 29
m a 47 a 12 o m 33 29 a m pr 21 17 21 m 29 14 a 14 29 17 16 th 24 18 28 zg 25 a 33
29 m 40 23 29 19 16 m 19 a m 27 13 28 21 22 p 45 26 16 m a 29 14 ll 21 fi 26 29 16 06 a
13 a 20 28 21 24 26 13 a 50 21 zg 21 14 29 24 01 33 13 m 100 m 113 m 09 a 28 16 31 21 22 m 46
23 21 22 29 zg 21 m 28 14 a 17 13 05 29 17 13 26 16 a 19 m 16 31 33 29 32 a 13 lu a 28 14 16 a m
44 31 29 a 123 m 24 28 16 29 m a 23 29 25 31 29 m n a 27 13 28 21 14 19 16 m 29 16 a 03 a 24
13 18 28 26 16 m 29 fi m 160 a 17 16 22 26 21 m 47 m a ll 13 th a 28 16 31 16 14 26 13 m 19
29 a m 120 m 05 m 21 m 151 a 24 26 13 ll 13 a 33 21 24 24 13 a 29 fi a 21 24 50 17 28 26 29
16 06 a 01 154 m 19 21 01 lu 21 22 13 14 16 m a 157 a 20 28 21 24 ll 21 a m 33 13 21 24 26 13 a m 27
16 m 24 26 33 13 ll 16 m 16 23 29 17 29 16 a m 09 m 09 28 16 26 16 m 50 22 28 29 ll 16 zg 21
m 154 m 29 16 a 31 21 a 24 16 14 16 m 43 a m 24 28 18 31 29 17 13 22 42 a 154 a 23 16 m 13 m
28 16 31 21 22 m 23 13 22 m 21 pr 21 26 28 13 22 21 m 160 m a 223 a 159 m 18 22 29 33 13 a 04
a 01 a 19 21 25 14 29 m 45 22 06 m a 24 28 15 29 26 16 m 13 a 33 21 a 15 21 14 29 25 14 13 m 22 29
24 18 16 24 26 13

442 tokens: 295 two-figure groups (36 distinct), 13 three-figure groups (100 113 120 123 151 154 157 159 160 223), 56 m, 52 a, 7 ll, 5 zg, 4 fi, 3 lu, 2 pr, 2 th, and one each of o, p, n.

Three things are visible before any solving. The figures 12 to 33 (30 never occurs) carry 265 of the 308 numeric tokens, and their counts — 35, 35, 29, 27, then 18, 17, 17, 15, 13, 10, 9, 9, 7, 7, 5, 4, 4, 2, 2, 1, 1 — are the counts of a monoalphabetic Italian text of that length (e a i o near thirty each, n l r t s c d from ten to eighteen). The groups 01–09 and 40–50 are too rare to be letters and too evenly rare to be vowel homophones. And the letters a and m, a quarter of everything, cannot be letters: treated as symbols they both anneal to the same vowel, which no Italian text permits, so they are nulls. In the decryption they fall at word ends, the clerk’s habit of dropping one after each word.

02 Recovering the key

  1. 5-gram annealing on the numbers alone (nulls dropped, text split at the three-figure codes, the Italian model built for the Lucca letter): six seeds disagree, but one already reads avere, questa, un caricato, aiuto, subito, bene. Forcing distinct letters on the nineteen frequent figures does not help; at 253 5-grams the model prefers e t r s soup.
  2. A unigram word-segmentation scorer degenerates into di la il di la. Discarded.
  3. 5-gram plus dictionary coverage: the LM score plus one nat for every letter covered by a lexicon word of three letters or more, swaps confined to the frequent figures, free letters for the rare groups. From random keys two seeds of six converge on the same key (−371 and −409); seeded from step 1, all three seeds land on it. At that stage the decryption gave … un caricato d olmi. ad uno gli … suoi figlio hauendo io saputo in corte … uolonta di re … stata messa in esecutione … queste maesta ho stimato oficio … uoto seruitore io le so non suplicare … a uoler fare … prima … subito a me benigna risposta.
  4. Control. The same objective on three shufflings of the ciphertext tops out at −843, −865 and −893 against −371 in the true order.
  5. The alphabet is in order. The converged key puts a b c d e f g h i l m on 13 15 17 19 21 23 25 27 29 31 33 and n o p q r s t u on 14 16 18 20 22 24 26 28. The annealer had no way to know that. It also settles the two figures seen once: 32 is z (the even series runs on u x z) and 12, just below a, is a symbol outside the alphabet.
  6. The rest by context. Each rare symbol was listed with every occurrence and given the one value that fits all of them: zg = r (rico·rdo, Nicolspu·rg, confe·rire, servito·re), lu = d (ricor·do, a·d uno, desi·derano), fi = n (ho·nori, inte·ntione, in), ll = t (al·tri, sta·ta, ques·te, servi·tore), th = l (Nico·lspurg, ta·l), pr = ff (fece, e·ffetuare); 01 si, 05 non (ca·non·icato, non è), 06 ne, 09 de, 40 and 46 con, 41 al, 42 la, 43 di, 44 de, 45 da, 47 che, 50 se. The single o, p, n sit inside otherwise complete words and are taken as nulls or slips of transcription.

03 The key

131517192123252729313314161820222426283032
abcdefghilmnopqrstu[x]z
2729729744359101335521717151801
llthzglufipr01050609404142434445464750a m
tlrdnffsinonnedeconalladidedaconchesenulls
7253424233111112133108

Third rows: occurrences. Not identified: 12 (an honorific subject, V.S.?), 03 (an adverb), 04 (a conjunction), and the word codes 100 113 120 123 151 154 157 159 160 223. The doubled ll, zg, th and the rest are not digraphs of the plaintext; they are the key’s alternates for t r l d n f, the consonants a clerk most wants to vary.

04 Decipherment

Mi ricordo che, fra li altri honori che [120] mi fece in Nicolspurg, mi confido d’hauer dato intentione a questa Serenissima [100] [113] de uoler conferire un canonicato d’Olmiz ad uno de li [123] suoi figli; hauendo io [03] saputo in [160] corte che tal uolontà di [120] non è [151] stata messa in essecutione, sì [154] desiderano [157] queste Maestà, ho stimato oficio de deuoto seruitore, [154] io le sono, di suplicarla, [154] fo, a uoler far effetuare [160] [223] [159], prima [04] si degni darne subito a me benigna risposta.
I recall that, among the other honours [Your Lordship] did me at Nikolsburg, I am confident I gave this Most Serene [Queen] to understand that [you] would confer a canonry of Olmütz on one of [her] sons. Having [since] learned at [this] court that that intention of [yours] has not [yet] been carried out, as these Majesties desire, I have judged it the duty of a devoted servant, such as I am to her, to beg you, as I do, to see [this …] carried into effect, [or] first to deign to give me at once a kind answer about it.

05 Context

Nikolsburg (Mikulov) was the seat of Cardinal Franz von Dietrichstein, Bishop of Olmütz from 1599 to 1636 and governor of Moravia, in whose gift a canonry of Olmütz lay. The Queen of Poland in December 1627 was Constance of Austria, Ferdinand II’s sister; her younger sons were being provided with benefices in exactly these years: Charles Ferdinand was Bishop of Breslau from 1625, John Albert Bishop of Ermland from 1621. The letter therefore reads as an Italian-writing agent’s reminder to Dietrichstein, not to the Emperor: he had carried the Cardinal’s promise from Nikolsburg to Warsaw (or, reading mi confidò, had heard there from the Cardinal that he had given it to the Queen himself), the promise has not been kept, King and Queen are waiting, and he would like either the canonry or an answer. That would also explain why the piece sits in the Chiffrenschlüssel series rather than in a correspondence: it was filed with its key. None of this is in the cipher. Neither sender nor addressee is named in the enciphered text. The image, checked on 2 October 2026, carries one more clue: a faint docket at the foot of the page reads … Card. Dietrichstein, which at the foot of an Italian letter names the addressee and confirms the inference above. The sender is still unnamed.

06 The image, the sibling and the key records (2 October 2026)

The R1408 image, the three images of the next record R1409 (f. 178) with DECODE’s transcription of it, the three images of R1410, and the fifteen key records of the fascicle, R1392–R1406 (45 images, eight with DECODE transcriptions), were fetched with the project’s DECODE login. The archive’s notice on the record allows publication only with its permission, so no image is reproduced here.

The image corrects the transcription twice. Tomokiyo’s line 2 a 12 o m is the code group 120, written 1-2-0 exactly as on line 8 (this clerk’s 0 and o are one shape): the hapax 12 and the stray null o disappear, and [120] now has two contexts, fra li altri honori che [120] mi fece in Nicolspurg and tal uolontà di [120], both the addressee’s title. On line 10, where his transcription has a double space between 26 and 33, stands a 29 (i): stimato, not stmato. Seerenissima (50 21 zg) is as enciphered. The null a (tall stem) and the figure 2 (flat base) are distinct shapes, so 03 and 04 are two-figure groups and not codes 203 and 204; the single p and n stand inside complete words as written. With these corrections the letter has 442 tokens, 110 nulls and 332 significant tokens, of which 16 are unread (ten codes in 14 occurrences, and 03 and 04): 316 of 332, 95.2% (decode.py; -t gives Tomokiyo’s text as filed). Italian is the best language for the read words.

R1409 is not in this key. It is a different system: dot-separated figures with long underlined runs, 1,328 tokens in DECODE’s transcription, mostly two-figure groups 12–37 with about seventy three-figure groups 101–195 and no letter nulls. The R1408 alphabet turns it into ulauraqtobnqtaucnoau…, −5.05 per character under the Italian model against −2.38 for R1408’s own figures, and it ranks 67th of 500 random keys over the same figures; Latin, German, French and Spanish give the same. A ciphertext-only attempt on R1409 (homophonic letters, then letters or pairs for every symbol, in Italian and German, with a shuffled control) did not converge, and R1409 stays outside this target.

No key record fits. None of R1392–R1406 has an ordered numeric alphabet on 13–33 with letter nulls and codes 100–223: R1392 is German (1592); R1393, R1394, R1396, R1397, R1399 and R1400 are French keys of the Henri IV years; R1395 and R1405 Latin graphic-sign keys for the Turkish court; R1398 French; R1402 a Cyphra in Moscoviam; R1403 a Polish key in graphic signs; R1404 an alphabet sheet; R1406 a German place-name nomenclator; R1401 a graphic-sign letter; R1410 a German letter with inserted code numbers. None glosses an open code.

What stays open. The word codes [100] [113] [123] [151] [154]×3 [157] [159] [160]×2 [223] and [120]×2 are glossed from context, not read: there is no sibling in this key in the fascicle and no matching key, and the Dietrichstein family archive at Brno, where the received letter, a decipherment or the key would be, is not online. 03 and 04 occur once each (glossed poi, però) and are too short to fix. The sender is not named.

07 Method and files

  1. Ciphertext from Tomokiyo’s article, pairs joined as he suggests; counts and IC checked (targets/warsaw/ct.txt).
  2. 5-gram annealers on the numbers, with and without the letters as symbols (targets/warsaw/solve.py, solve2.py).
  3. Lexicon from the Italian corpus and the word-segmentation scorer (targets/warsaw/wordsolve.py).
  4. The 5-gram + coverage annealer that converged, with the shuffled controls (targets/warsaw/combo.py).
  5. Final key and decoder, with the two image corrections (targets/warsaw/decode.py, plaintext.txt).
  6. R1409 against the R1408 key and 500 random keys, and the failed annealing runs on it (targets/warsaw/r1409_test.py, r1409_ct.txt, r1409_solve.py, r1409_solve2.py).

Checked: token counts, convergence from random and seeded starts, three shuffled controls, the alphabet order, every occurrence of every rare symbol against its value, word-level Italian throughout, the manuscript image, the neighbouring record R1409 and the fascicle’s key records (2 October 2026). Not checked: the sender, the word codes. The addressee in §05 is an inference from the content, now supported by the docket.

Full texts

The transcription and the decryption of every document on this page, so that the reading can be used and checked. Short files are shown here; all are in the repository.

R1408, HHStA Chiffrenschlüssel Kt. 14 Fasc. 20 f. 176, 'Di Varsouia 24 Xbre 1627' decoded, not read

An Italian letter written from Warsaw on 24 Dec 1627, most likely to Cardinal Franz von Dietrichstein, Bishop of Olmütz (an inference; nothing names sender or addressee): the promised Olmütz canonry for one of the sons of the Polish royal couple has not yet been given; 'these Majesties' want it, and the writer asks that it be done or that he have a prompt answer.

A mechanical decode with holes in most sentences: shown so that the transcription and the key can be checked and improved, not as a reading.

Transcription

ct.txt

33 29 a m 22 29 17 16 z g l u 16 a 47 m 23 22 13 m 31 29 m a 41 l l 22 29 a 27 16 f i 16 22 29
m a 47 a 12 o m 33 29 a m p r 21 17 21 m 29 14 a 14 29 17 16 t h 24 18 28 z g 25 a 33
29 m 40 23 29 19 16 m 19 a m 27 13 28 21 22 p 45 26 16 m a 29 14 l l 21 f i 26 29 16 06 a
13 a 20 28 21 24 26 13 a 50 21 z g 21 14 29 24 01 33 13 m 100 m 113 m 09 a 28 16 31 21 22 m 46
23 21 22 29 z g 21 m 28 14 a 17 13 05 29 17 13 26 16 a 19 m 16 31 33 29 32 a 13 l u a 28 14 16 a m
44 31 29 a 123 m 24 28 16 29 m a 23 29 25 31 29 m n a 27 13 28 21 14 19 16 m 29 16 a 03 a 24
13 18 28 26 16 m 29 f i m 160 a 17 16 22 26 21 m 47 m a l l 13 t h a 28 16 31 16 14 26 13 m 19
29 a m 120 m 05 m 21 m 151 a 24 26 13 l l 13 a 33 21 24 24 13 a 29 f i a 21 24 50 17 28 26 29
16 06 a 01 154 m 19 21 01 l u 21 22 13 14 16 m a 157 a 20 28 21 24 l l 21 a m 33 13 21 24 26 13 a m 27
16 m 24 26  33 13 l l 16 m 16 23 29 17 29 16 a m 09 m 09 28 16 26 16 m 50 22 28 29 l l 16 z g 21
m 154 m 29 16 a 31 21 a 24 16 14 16 m 43 a m 24 28 18 31 29 17 13 22 42 a 154 a 23 16 m 13 m
28 16 31 21 22 m 23 13 22 m 21 p r 21 26 28 13 22 21 m 160 m a 223 a 159 m 18 22 29 33 13 a 04
a 01 a 19 21 25 14 29 m 45 22 06 m a 24 28 15 29 26 16 m 13 a 33 21 a 15 21 14 29 25 14 13 m 22 29
24 18 16 24 26 13
Decryption

plaintext.txt

DECODE R1408 - Di Varsouia 24 Xbre 1627 - reading of 2026-09-16 from Tomokiyo's transcription (variable2.htm)

Image check, 2 Oct 2026 (DECODE image IMG_R1408_I6588_P1.png): Tomokiyo's line 2 'a 12 o' is the code group
120 (written 1-2-0 as on line 8), so the old {12} is [120]; line 10 has a 29 (i) he left as a gap: 'stimato'.
'Seerenissima' is as enciphered (50 21 zg). decode.py applies both corrections; -t gives Tomokiyo's text as filed.

Raw decode (nulls a m dropped; letter pairs, syllables and codes substituted; codes in brackets):

miricordochefralialtrihonoriche [120] miffeceinnicolspurgmiconfidodhauerdatointentioneaquestaseerenissima
[100] [113] deuolerconferireuncanonicatodolmizadunodeli [123] suoifiglihauendoio{03}saputoin [160] corteche
taluolontadi [120] none [151] statamessainessecutionesi [154] desiderano [157] questemaestahostimatooficio
dedeuotoseruitore [154] iolesonodisuplicarla [154] foauolerfareffetuare [160] [223] [159] prima{04}sidegni
darnesubitoamebenignarisposta

Word-divided, spelling as enciphered:

Mi ricordo che, fra li altri honori che [120] mi f(f)ece in Nicolspurg, mi confido d'hauer dato intentione a
questa Se(e)renissima [100] [113] de uoler conferire un canonicato d'Olmiz ad uno de li [123] suoi figli;
hauendo io {03} saputo in [160] corte che tal uolonta di [120] non e [151] stata messa in essecutione, si
[154] desiderano [157] queste Maesta, ho stimato oficio de deuoto seruitore, [154] io le sono, di
suplicarla, [154] fo, a uoler far effetuare [160] [223] [159], prima {04} si degni darne subito a me
benigna risposta.

Codes and unread groups (glosses are inferences from context, not readings):
  [100] [113]  after "questa Serenissima"          -> the Queen (Regina) + a second title word?
  [123]        "ad uno de li [123] suoi figli"      -> Serenissimi?
  [160]        "in [160] corte", "effetuare [160]"  -> questa (fits both places)
  [120] x2     "honori che [120] mi fece", "tal uolonta di [120]" -> the addressee's title (V.S. Ill.ma);
               the docket at the foot of the page names Card. Dietrichstein
  [151]        "non e [151] stata"                  -> ancora?
  [154] x3     "si [154] desiderano", "[154] io le sono", "suplicarla [154] fo" -> come (fits all three)
  [157]        "desiderano [157] queste Maesta"     -> adverb (sommamente? ambedue?)
  [223] [159]  "effetuare [160] [223] [159]"        -> object of the request (questa ... sua ... gratia/promessa?)
  {03}         "hauendo io {03} saputo"             -> adverb (poi? gia? hora?)
  {04}         "prima {04} si degni"                -> conjunction (o? et?)

English (working translation):
I recall that, among the other honours that [Your Lordship] did me at Nikolsburg, I am confident I gave this
Most Serene [Queen] to understand that [you] would confer a canonry of Olmütz on one of [her] sons. Having
[since] learned at [this] court that that intention of [Your Lordship's] has not [yet] been carried out, as
these Majesties desire, I have judged it the duty of a devoted servant, such as I am to her, to beg you, as I
do, to see [this ...] carried into effect, [or] first to deign to give me at once a kind answer about it.

Alternative for the first sentence (30 Sept 2026; the cipher has no accents, so "mi confido" may be "mi confidò",
passato remoto, see NOTES section 3):
I recall that, among the other honours [Your Lordship] did me at Nikolsburg, [you] confided to me that [you] had
given this Most Serene [Queen] to understand that [you] would confer a canonry of Olmütz on one of [her] sons.

Continuous conjectural reading (30 Sept 2026; every bracketed word grade I, inferred from context, not read;
{03} = poi and {04} = pero are new glosses; [157] left open; see NOTES section 3a for the alphabetical-order test):
Mi ricordo che, fra li altri honori che [V.S. Ill.ma] mi fece in Nicolspurg, mi confido d'hauer dato intentione a
questa Serenissima [Regina ...] de uoler conferire un canonicato d'Olmiz ad uno de li [Serenissimi] suoi figli;
hauendo io [poi] saputo in [questa] corte che tal uolonta di [V.S. Ill.ma] non e [ancora] stata messa in
essecutione, si [come] desiderano [...] queste Maesta, ho stimato oficio de deuoto seruitore, [come] io le
sono, di suplicarla, [come] fo, a uoler far effetuare [questa] [sua] [promessa], prima [pero] si degni darne
subito a me benigna risposta.
English: ... to beg you, as I do, to have [this] [promise] [of yours] carried out, [but] first to deign to give
me at once a kind answer.

Key: decode.py

08 Sources

Analysis scripts and the ciphertext are in the repository (targets/warsaw/).