Kryha - Procedures


Home Page
Kryha Home Page

Introduction

Using an encryption system requires a set of rules known to the various correspondents. These correspondents must primarily share secret elements, first and foremost the encryption keys.

Usually, when using a cipher machine, there are three types of keys:

  • The base key
    This is the machine itself. In the case of version v1, the wheel(s) used are part of the base key.
  • The day key
    In the case of Kryha, this is the two alphabets used and the wheel used (v1) or the wheel configuration (v2). This key is usually in the form of a table printed on paper and is typically valid for one month.
  • The message key
    In the case of Kryha, this is the starting sector and the initial position of the inner (moving) alphabet. This key is different for each dispatch.

Notes:

  • Moving the wheel before or after encryption, as well as using decryption mode instead of encryption mode, can be part of the message key, the daily key, or even the base key if these conventions are consistently followed.
  • I mentioned the daily key. In fact, depending on the number of messages exchanged, the "daily key" can be valid for several days, or even a week.
  • Typical elements of the daily key (the two alphabets, the wheel configuration, or the wheel selection) can be modified together or at different times.
  • Configuring the starting sector does not require opening the machine. A small window above the beginning of the outer alphabet displays the current sector number.

Furthermore, there are other procedural elements that correspondents must share:

  • Should separators be used for words and phrases? Should specific words be used to conceal the names of people or places? More generally, what rules should be followed when preparing the text before encryption?
  • What should be done in case of a breach? Is a special backup key required? Should the machine and the encryption keys be destroyed if the transmission center is going to be invaded?

Documents available

Two documents are accessible on this site:

  • The original manual for the Kryha machine [link].
  • The procedure used by the Spanish Nationalists [link].

Data compression

Introduction

Marks (cf. Reference) informs us that the 1925 manual suggests using Kryha as a system for code over-encryption and data compression.

Indeed, certain letters (D=12, W=23, N=25, etc.) can encode two digits. Therefore, Kryha can encode numbers from 0 to 25. This allows for a form of compression.

Fixed Alphabet: Letters and numeric groups equivalent

	0(O), 1(K), 2(E), 3(Q), 4(Z), 5(H), 6(S), 7(B), 8(L), 9(V),
	10(I), 11(U), 12(D), 13(Y), 14(M), 15(J), 16(T), 17(P), 18(A), 19(X),
	20(C), 21(R), 22(G), 23(W), 24(F), 25(N)

Example

Consider the following code:
	A = 100, B = 101, C=102, D=103, E=104,…, I=109, J=110,K=111,S=119, …, 
	ARM = 124, …, AT = 247, …, CK = 259, …, DAWN = 666, 
	OUR = 221, …, TA = 228, …, WILL = 753

Consider the following clear text: (25 letters)

	Our armies will attack at dawn. 

Here is the coded text: (11 groups, 33 letters)

	221-124-109-104-119-753-247-228-259-247-666

Equivalent text in Kryha (using the fixed alphabet) : (in whole, 22 letters)

	4(Z)-21(R)-12(D)-4(Z)-10(I)-9(V)-10(I)-4(Z)-7(B)-5(H)-3(Q)
	24(F)-7(B)-22(G)-8(L)-25(N)-9(V)-24(F)-7(B)-6(S)-6(S)-6(S)

Note: if there is a group meaning "Attack at dawn", the compression is obvious.

A notable improvement

In 1941, Allied cryptanalysts faced enemy traffic encrypted by the Kryha (from Spain), whose procedures complicated the breaking of the messages.

The most significant of the changes in enciphering procedure is that which introduces the element of key interruption into the system. At the end of each word, the letter J (appearing with "-" dash on a single tab) is enciphered as a word-separator. After each such plain-text J the operating lever is depressed twice instead of the usual once. Thus, the first letter of the next word instead of being enciphered at the setting it normally would, is enciphered at the one following it.

Note: The methods implemented by the allies to solve the traffic are described by Frode Weierud (link).

Reference

Articles & Books

  • Mensajes secretos, la historia de la criptografia espanola desde sus inicios hasta los anos 50, by José Ramon Soler Fuensanta and Francisco Javier Lopez- Brea Espiau, Editor: tirant lo blanch, 2016.
  • Marks, P. 2011. Operational Use and Cryptanalysis of the Kryha Cipher Machine. Cryptologia 35(2): 114-155.

Web sites

  • Frode Weierud (Editor)
    US National Archives in College Park, MD, in Record Groups 38 and 457. A transcript of a handwritten document describing solution of traffic related to German wartime trade with Spain (RG457, Historic Cryptographic Collection, NR2417) (link).