Variable-Length Numerical Code in Austrian Archives

In the sixteenth to nineteenth centuries, the most commonly used ciphers employed number groups to represent letters, syllables, and words (though the exact timing of their adoption varied). The present article presents some undeciphered numerical ciphers mainly from the Austrian archives, with a particular focus on a kind where the number groups are of variable length and written continuously without breaks. For such ciphers, separating the continuous stream of digits into number groups is the first step of deciphering, for which there are various schemes to guide the separation, as I described in "Variable-Length Symbols in Italian Numerical Ciphers" (though sometimes, there appears to be no particular rule for such separation, as noted in the section "Miscellaneous" therein). More elaborate schemes for such variable-length code are documented in the Austrian archives.


Table of Contents:

DECODE R2159 (Non-decrypted, Italian (the language of the cleartext))

DECODE R1408 (Non-decrypted, Italian)

DECODE R2179 (Non-decrypted, Italian)

Adam Starhemberg (1758) (Non-decrypted, German)

Instructions for Continuously Written Figure Codes in Austria

1. DECODE R2217 (Fixed Length)

2. DECODE R2212 (False Thousands Digit)

3. DECODE R2190 (False Thousands Digit) [1780]

4. DECODE R2207 (Fixed Difference between Digits)

5. DECODE R2202 (Fixed Number of Subgroups)

6. DECODE R2197 (Constraint for First Two Digits) [1781]

7. DECODE R2188 (Fixed Length with Redundant Ones Digit)

DECODE R2159

(ÖStA_HHStA, Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.18-19)

This is from Fra Giovannni di Lucca to the Emperor (Ferdinand III), 30 May 1644. In Italian.

The number groups may consist of one or two digits, but there is no difficulty in identifying individual groups because the groups are delimited by dots. The ciphertext can be deciphered to read: "Al principe di trenti...." (Someone versed in Italian would be able to complete the decryption.)

3 11 26 21 17 17 6 15 26 1 8 17 19 21 9 14 19
15 25 3 14 15 3 11 13 15 12 26 1 8 17 21 18 6 13 14 18 2 14 12 13 8 18 6 10 1 15 11 22 25
21 6 18 14 13 14 11 17 8 15 9 3 15 23 22 13 1 5 9 21 18 21 15 25 13 11 19 3 32 7 6 18
14 22 21 9 8 17 11 25 15 19 7 19 3 21 9 4 15 19 13 2 14 18 17 11 26 21 17 17 6 15
26 1 8 15 4 18 2 13 8 3 14 17 9 7 22 11 17 8 3 21 13 8 23 12 17 11 15 3 6 18 19
9 6 10 15 7 22 12 3 17 8 1 21 13 9 25 18 17 6 13 17 23 17 3 19 25 9 11 7 22
1 21 3 9 11 15 12 26 7 21 3 22 13 21 7 6 10 7 17 18 17 5 3 6 15 9 26 3 6 7
5 17 14 6 10 7 17 18 17 11 10 3 4 17 10 25 12 17 11 15 9 19 13 18 23 15 17
22 18

DECODE R1408

(ÖStA_HHStA, Staatskanzlei Interiora, Chiffrenschlüssel, Kt.14. Fasc.20. f.176)

The only cleartext at the beginning "Di Varsouia 24 Xbre 1627" (From Warsaw, 24 December 1627) indicates the language is Italian.

The following is my transcription. (It should be noted that 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").)

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

DECODE R2179

(ÖStA_HHStA, Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.54)

I think the beginning up to the symbol 🜨 is trivially parsed as "21 33 65 36 68 41 65 16 19" but I have difficulty in consistently breaking the rest into groups.

(Center dots which seem to separate digits are transcribed as "." There are also lower dots (not transcribed), of which some may separate digit groups and others, placed under a particular digit, may also have some meaning in parsing (see another article). Dots above appear to be simply a part of the digit 1.)

Letters "a r e" are written above the last groups "36 51 38". This may be plaintext, but this kind of note is occasionally just a trace of unsuccessful hypothesis.

213365366841651619🜨34316403313285645407470376152331336648920896951
2137625145551920.7.986.7.9552234533469492728153491365113166314745815
342929402714A631413701836684168628153466583686523868973464
X221986223437887452709641535136221969883433156840.7.9633719
3641338816B2251454019702720528796415363558664331916372233
914582157418161434528863342133.7.921376251332215346692.7.958
1589382734.7965331652284551651228645551556365138
Dopo haver letto 9^bre Il. l'compiaccis di straciarlo [*My reading of this cleartext line is dubious.]

Adam Starhemberg (1758)

A letter partly in cipher from Georg Adam Starhemberg (Wikipedia) was kindly provided by Alxandre Pillon. This letter is from "Georg Graf und Herr von Starhemberg", Paris, 23 May 1758. Georg Adam Starhemberg was an Imperial envoy in Paris and worked with Count Kaunitz to bring about the rapprochment between Austria and France in 1756.

The cleartext part is in German.

Again, figures are written without break and parsing them into cipher groups is not trivial. In my transcription below, breaking into groups is mine and may be wrong, though it seems certain that 310-314 form groups of three digits. (On line 7 on the verso, there is a large space after "31". At least this instance may not be grouped with the following digit.)

Punctuations may be irrelevant because ignoring them yields more consistent parsing. Linebreaks may also be irrelevant. (For example, look for where "31" is followed by a punctuation or a linebreak.)

It will be seen the figures 310-314 are very frequent. There are several schemes for continuously written figures in Austrian codes (see the next section), but such code-based scheme cannot explain this high frequency of the five symbols. It seems more natural to assume they represent letters, e.g., vowels.

(In my transcription, ^_ indicates an overbar, ^' and ^" indicate a prime and a double prime above a digit, respectively. There may be some digits missing on the right side of the image I have.)
88 33 11 59, 312 17 312 14 69 314, 20 310 78 310 47, 311 26 95 313 8,2 311 09 312 26 310 33 314 52 31
2, 65 310 47 314 43 311 9,1 313 06 310 78 99 310 80 31,2 6 88^" 54 00 8 312, 11 311, 09 310 99 312 26 310, 05 310 19 310 33 8 313
34 312 23 311 1,3 311 8 10 170 313 12 312 93 310 75, 310 27 311 68 22 310 99 314 66 311 36, 312 11 314 08 312 28 8 312 62 311 4,
9 314 38 66 313 64 311 21 311 15 3;11 58 313 48 311 22 310 8 43 14 33 314 43 310 33 312 71 310, 79 313 15 8 62 69 312 87 300 7
3 313 99 99, 313 18 8 311 15 311 69 311 19 311 64 312 62 314 08 310 78 312 10 311 16 314 28 311: 70 312 10 313 83 310 89 312; 113 13 82 300 0
0 312 93 314 71 313 06 73 11 97, 33 13 94 313 80 312 163 10 58 310 89 8, 311 71 312 63 01 312 40 62 311 63 312 93 310 36 313 18 311 84 313 72 31
1 68 313 50 311 21 314 90 69 01 311 06 312 08 312 28 8 311 15 310 75 313 59 62, 310 41 313 33 21 313 03 313 18 310 61 312 22 314 47 312, 14 11
(verso)
9 313 28 8 95 313 46 31,0 00 311 69 95 310 04 311 84 87^_ 6 311 62 313 01 87^, 000 313 84 310 4,2 312 38 8 313 25 314 66 53
0 314 00 314 60 31;1 8 38 310 10 312 72 310 57 310 87 312 86 31,1 17 314 98 310 16 312 28 8 311 57 00 313 06 314 6,0 313 15 3
33 311 26 312, 72 312 10 311 82 74 312 38 311 62 313 008 312 64 313 77 314 48 312 18 312 99 02 310, 143 10 10 314 03 6
3 312 18 312 99 312; 86 310 06 313 34 310 313 11 26 310 75 312 25 312 91 315 00 314, 49 41 310 89 99 84^" 112 311 42 311 5
7 310 313 11 83 8 313 34 312 78 44 313 45 312 08 313, 61 09 314 37 314 66 313 65 312 39 314 05 310 34 312 59 14 311 51 5
4 313 29 310, 91 313 04 55 312 38 312 01 314 56 312 74 06 313 07 26 41 44 312 10 311 44 94 314, 58 314 08 310 1
66 60 04. 43 12 80 312 10 313 89 311 57 311 67 31 39 7 312 72 41 310 73 315 00 314 49 313 4,2 313 30 311 51 310 33 31[2]
46 312 82 314 7,5 55 09 8 9^_7 11 30 000 8 310 89 310 57 310 8;7 312 86 311 17 314 98 310 16 313 34 311 57 312 80 312 10 314 5[51]
4 313 07 99 314 48 313 20 310 90 313 00, 88 312 10 310 70 94 314 57 312 22 313 42 8 9^_9 314 27 312 40 311 13 62
11 59 53 11 54 312 47 8,8 314 43 312 64 311 30 52 312 7 28 311 01 311 68 314 13 8 314 29 313 18, 314 2 46 9 311 30 312 9
3 313 25 310 62 62 311, 54 311 12 311 15 8 312 71 311 27 313 42 310 58 313 91 314 06 313 14 90 312 57 8 31,3 94 311 58 311 16 3
10 85 30 000 310. 47 8 314 66 311 36 8 314 43 314 92 312 18 311 70 312 10 8 312 63, 70 311 06 310 99 99 312 71 311 1,9 313 [1]
5 312 62 314 47 310 60 8 312 47 31,
2 10 31:3 94 314 84 8 314 13 312 40 311, 84 315 00 310 58 313 26 314 51 314 62 3[10]
89 311 84 8 312 63 8 83.

Instructions for Continuously Written Figure Codes in Austria

Some instructions for continuously written figure codes are found in ÖStA_HHStA (Österreichisches Staatsarchiv, Haus-, Hof- und Staatsarchiv). The following is solely based on the examples (illustrating parsing and deciphering of ciphertext) given in the instructions and the accompanying code tables. Further insights may be obtained by those who can read the text of the instructions.

Some of the examples show that linebreaks in the ciphertext can be irrelevant (though it is possible that some clerks chose not to take the liberty of writing a number group across a linebreak).

Some of the code tables include entries such as "1780", "1781", which seem to indicate when the code was prepared. Despite the variety of the parsing schemes, the similarity of the vocabulary of the code indicates these are all from ca. 1780.

1. DECODE R2217 (Fixed Length)

(ÖStA_HHStA Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.168-171)

114427445904402432269345222424539864713470
1422404004231414240084197024177502243473589
31427941472377355242317682704131912325907
337344954222794

This is parsed as follows.

114 427 445 904 402 432 269 345 222 424 539 864 713 470 142 240 400 423 141 424 008 419 702 417 750 224 347 358 931 427 941 472 377 355 242 317 682 704 131 912 325 907 337 344 954 222 794

This is a simple case of fixed length code numbers. (In the example, code numbers beginning with an odd number is marked "erz" instead of plaintext words. This may be because the first page of the code only includes numbers beginning with an even number. One may speculate the second page was not at hand when the instructions were drafted.)

The code used is R2215=R2216. There is a code group "ind: clav: 2" for indicating the key (419).

2. DECODE R2212 (False Thousands Digit)

(ÖStA_HHStA Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.156-159)

272451489442301663799092237527744115
6996642779024277144231342744412431
7722322313494442222723465707414322
2999329965595123212

This is parsed as follows.

272 451 489 4423 016 637 9909 2237 527 744 1156 9966 427 790 242 7714 423 134 274 4412 431 7722 322 313 494 4422 2272 346 570 741 432 2299 932 9965 595 123 212

This is variable-length with code numbers with three or four digits. In parsing the ciphertext by units of three digits, when the first two numbers are the same, four digits are grouped into one code number. However, the repeated second digit is dropped for table lookup. In this example, after reading "272", "451", "489", the next group is "4423", but it is read as "423". That is, the ciphertext is parsed as if consisting of three- and four-digit code numbers, but the code actually consists of only three digits.

The code used is R2210=R2211.

There is an entry for "america" (690). While this per se cannot allow specific dating, the similarity of the vocabulary with codes below indicate this was around 1780.

3. DECODE R2190 (False Thousands Digit) [1780]

(ÖStA_HHStA Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.98-101)

421324996944240245530119695311232340246829562242
8051980090279337411409794234407474223622327242922
21703671257144029173369224343377153376104

This is parsed as follows.

421 324 9969 4424 024 5530 1196 953 1123 234 024 682 956 2242 805 198 0090 279 3374 1140 979 423 4407 474 2236 2232 724 292 2217 036 712 571 4402 917 3369 2243 433 7715 3376 104

For four-digit groups, the thousands digit and the hundreds digit are always the same (as with R2212 above).

The code used is R2191=R2192.

There is a code group "indicans clavim 2" (279) for indicating the key.

The vocabulary (877 for "1780"; 811 for "1700") indicates when the code was prepared.

4. DECODE R2207 (Fixed Difference between Digits)

(ÖStA_HHStA Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.144-147)

12233429344737290591138242023402878623
30737267183764544207

This is parsed as follows.

1223 3429 3447 3(4)72 9059 1(2)13 8(9)24 2(3)02 3402 8(9)78 6(7)23 3(4)07 3(4)72 6718 3(4)76 4544 2(3)07

Here, the digits in the parentheses are not in the ciphertext. How can a decipherer know this? The answer is found in the structure of the code, which contains code numbers 0100-9099, in which the hundreds digit is always the thousands digit plus one (e.g., in 3402, 4=3+1). (The addition is cyclic, so 9+1=0.)

In parsing the ciphertext in units of three digits, when the next two digits do not meet this relation, the decipherer should insert a hundreds digit, which should be the thousands digit plus one.

(In encoding, the clerk can omit the hundreds place from time to time, but omission should not be made when the hundreds digit and the tens digit are the same. For example, for "5640", "6" can be safely omitted, but for "5660", if "6" in the hundreds place is omitted, the decipherer would not notice the omission because the remaining "560" satisfies the constraint for four-digit numbers: 6=5+1. A similar problem is addressed by reserving some numbers in R2197 below.)

The code used is R2205=R2206.

5. DECODE R2202 (Fixed Number of Subgroups)

(ÖStA_HHStA Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.132-135)

3.4.2.91.244.5.40.23.71.4.20.22.704.5.
50.4.7.40.60.10.100.2.28.21.4.37.422.1.

Instead of this, the illustrated example is the following. (I already inserted space.)

...
3.4.2. 9.2.5. 4.2.7. 4.2.2. 7.5.5. 4.7.4.
6.10.10. 2.2.2. 4.3.4. 1.8.9. 7.9.9. 4.4.1.
3.4.4. 7.3.4. 419. 6.4.2. 4.10.1. 4.7.3. 2.2.9.
3.7.4. 3.5.2. 9.3.7. 3.3.3. 2.2.4. 2.7.4.
9.10.9. 5.1.9. 1.4.1.

That is, the ciphertext looks as if the cipher consists of single-digit or two-digit numbers, but actually the decipherer needs to take three of those subgroups delimited by dots to form a cipher symbol.

Numbers such as "4.10.1." or "6.10.10." are not to be read as four- or five-digit groups "4101" or "61010". The code groups are arranged by these subgroups in the code table. That is, in the column for 4, the sequence is: 4.1.1., 4.1.2., ..., 4.9.10., 4.10.1, ..., 4.10.10.

The code used is R2200=R2201.

The entry "9.5.1." is for "1700" and "10.5.9." is for "178". The latter seems to provide for the years in the 1780s.

6. DECODE R2197 (Constraint for First Two Digits) [1781]

(ÖStA_HHStA Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.116-119)

103720233272036971177322095202423479322374121023323413425452
4224270334121290294273652322467724377224629099743229
947

This is parsed as follows.

1037 2023 327 2036 971 177 322 095 2024 2347 932 2374 1210 2332 3413 425 4524 224 270 334 1212 9029 427 365 232 246 7724 377 2246 290 9974 322 9947

This may be considered as an extension of DECODE R2207 (Fixed Difference between Digits) above. That is, the code numbers have more variety than R2207 but the constraints for the first two digits allow the decipherer to know whether three or four digits should be taken for parsing.

While the code table consists of four-digit code numbers, the first two digits satisfy one of the following constraints:

(i) the first and second pages have the hundreds digit equal to 0;

(ii) the third and fourth pages have the thousands digit equal to the hundreds digit (leaving blank where the tens digit is also the same, which appears to address the issue of requiring a special care when encoding, mentioned for R2207 above); and

(iii) the fifth and sixth pages have the hundreds digit equal to the thousands digit plus one.

When the first two digits do not match any of the patterns A:0, A:A, or A:(A+1), three digits ABC are read instead of four. Since the code table does not provide for three-digit code groups, a digit needs to be inserted to form a four-digit symbol conforming to one of the constraints.

For the first six instances, 0 is inserted in the hundreds place to conform to the constraint (i). For example, "095" is padded to "0095", which reads "courier".

The next instance 425 is padded according to (iii) to become 4525, which reads "coma" (this word occurs also in 2073 and 7741 in the code table). 427 is turned into 4427 according to (ii), which reads "in". I have not identified the rule to switch which constraint to apply for padding.

Apart from this, this code is faulty because of the alternative constraints, for multiple constraints yield the same code number! For example, 0095 occurs on the first page (for "courier") and the third page (for "li"), because "00" satisfies both constraints (i) and (ii). The number 9032 occurs on the second page and the sixth page, because "90" satisfies both (i) and (iii) (9+1=0).

The code used is R2194=R2193. The vocabulary (0069, 9028, 9948 for "america"; 2069, 6710, and 8870 for "1781"; 4480, 6778, and 8090 for "1700") suggests this was prepared at the time of the American Revolutionary War.

The example message includes code groups for "ind: clav: 2" and "ind: clav: 3" for indicating the key.

7. DECODE R2188 (Fixed Length with Redundant Ones Digit)

(ÖStA_HHStA Staatskanzlei Interiora, Chiffrenschlüssel, Kt.20. Fasc.27. f.93-94)

5505618404713738787925757890907790193709232023278953
27562754988263556351091189841897189090895727573774666
0000926583547694315

This is parsed as follows.

5505 6184 0471 3738 7879 2575 7890 9077 9019 3709 2320 2327 8953[This is rendered "8957" in the illustration of decoding, but both means the same thing, as noted below.]
2756 2754 9882 6355 6351 0911 8984 1897 1890 9089 5727 5737 7466 6000 0926 5835 4769 4315

All the code numbers consist of four digits, so there is no problem in parsing.

Let us denote the four-digit code numbers as ABCD (where A is the thousands digit etc.). The code numbers are arranged in the code table in the order of: those with B=A, followed by those with B=A+1, B=A+2, B=A+3, B=A+4, B=A+5, B=A+6, B=A+7, B=A+8, and B=A+9. (Again, the addition is cyclic.) Although the words in the code table are in alphabetical order, this special arrangement of numbers introduces some irregularity in the correspondence between the words and numbers.

Thus, the code number has no redundancy in terms of parsing and omission of a digit is not allowed. However, code numbers different only in the ones digit mean the same word. For example, the numbers 1010-1019 all mean "vor".

The code used is R2185=R2186.

DECODE

Héder, M ; Megyesi, B. The DECODE Database of Historical Ciphers and Keys: Version 2. In: Dahlke, C; Megyesi, B (eds.) Proceedings of the 5th International Conference on Historical Cryptology HistoCrypt 2022. Linkoping, Sweden : LiU E-Press (2022) pp. 111-114. , 4 p. [pdf]

Megyesi Beáta, Esslinger Bernhard, Fornés Alicia, Kopal Nils, Láng Benedek, Lasry George, Leeuw Karl de, Pettersson Eva, Wacker Arno, Waldispühl Michelle. Decryption of historical manuscripts: the DECRYPT project. CRYPTOLOGIA 44 : 6 pp. 545-559. , 15 p. (2020) [link]

Megyesi, B., Blomqvist, N., and Pettersson, E. (2019) The DECODE Database: Collection of Historical Ciphers and Keys. In Proceedings of the 2nd International Conference on Historical Cryptology. HistoCrypt 2019, June 23-25, 2019, Mons, Belgium. NEALT Proceedings Series 37, Linköping Electronic Press. [pdf]



©2025 S.Tomokiyo
First posted on 15 September 2025. Last modified on 18 September 2025.
Cryptiana: Articles on Historical Cryptography
inserted by FC2 system