The world's first cryptomachine

Mr Gripenstierna's cryptomachine

According to Bengt Beckman the worlds first cryptomachine was Swedish. It was invented by a Fredrik Gripenstierna and presented to king Gustaf III in 1786.
No copy of the original machine exists today, but a record in the National Archives has survived, and allows us to make a reconstruction.

Since my Internet site first appeared, I've had the pleasure of getting to know Mr Beckman personally. He graciously gave me copies of material he had found in the National Archives, and below is a sketch made by Mr Gripenstierna himself, showing a few sample texts and their representation in crypto.

 The machine, called in 18th century Swedish: "Chiffre-Machinen", consisted of 57 wheels mounted on a common shaft. These wheels were housed in an oblong cylinder. On half of the circumference of each wheel, the normal ordered alphabet was engraved, and on the other half numbers between 0 and 99 were likewise engraved, but in mixed order, with each of the 57 wheels having their own mixed sequence. On one side, along the length of the cylinder, was a slot wide enough to allow one letterposition of all the 57 wheels to be seen, and on the opposite side a similar slot allowed a row of 57 figures to show themselves.

This picture shows a modern reconstruction (made by Crypto AG?) of the apparatus with one of the slots visible.

Two persons were to operate the apparatus. When encrypting, one turns the wheels till a row of cleartext is visible through the slot on the letterside of the cylinder, and the other reads off the cryptogram through the slot on the figureside. When decrypting, the opposite operation is used. One turns the wheels on the figureside till the received cryptogram is visible through the slot, ant the other can then read the cleartext through the slot on the letterside. The inventor alerts us to the security benefits of this arrangement. The authorized official gets to operate the letterside, and his unauthorized accomplice, who operates the figureside, only gets to see encrypted text.

 A maximum of 57 letters can be encrypted at a time, but a row needn't be a full row of 57 characters. It is obvious that the last row entered into the machine may be shorter than 57 characters, and in that case one only writes down as many cryptogroups as there are cleartext letters in the last row. But, mr Gripenstierna, who obviously was a very good cryptographer, had also provided means of varying the starting position of a row. Above the first ten wheels, ten codenumbers were engraved on the cylinder, thus making it possible to index each of the first ten wheels. It follows that a row could start in one of ten positions, and this position was given by the codenumber, which had to be added to the row of copied down figures in the dispatch to be sent. As a further complication to a would-be codebreaker, with zero-knowledge of the machines working, the cryptogram in fact reflected the cleartext in backwards fashion and the last figure on a row gave the startingposition.


Qbasic simulation of "Chiffre-Machinen" to download

I have provided a Qbasic simulation program of mr Gripenstiernas machine, which the interested crypto-surfer can download. Since it is not possible to reconstruct fully the 57 figureseries the wheels actually used, I have made them up, as well as the codenumbers giving the startingpositions.
I have given the program the name "Griffin" in tribute to mr Gripenstierna, whose name happens to translate to "Griffin-star".

GRIFFIN.ZIP


Excellent book to read if you know your Swedish

Bengt Beckman, retired cryptologist of the Swedish signal intelligence organization (FRA), has recently published an excellent book describing Swedish cryptologic activities during World War II. The books main focus is on the breaking and reading of the German teletype ciphermachine, known as the "Geheimschreiber", by the Swedes during WWII, but a number of other systems are discussed in quite a detail. One of them is mr Gripenstiernas invention, and I have chiefly depended on mr Beckmans book when describing "Chiffre-Machinen".

 If you are genuinly interested in things cryptologic, his book belongs in your collection.

Bengt Beckman
Svenska kryptobedrifter
Albert Bonniers Förlag, 1996
ISBN 91-0-056229-7


© Torbjörn Andersson.Torbjörn Andersson Fecit