Search for a tool
Ubchi Cipher

Tool to encrypt / decrypt with the code UBCHI, a key figure consisting of a double transposition used by the Germans during the First World War.

Results

Ubchi Cipher -

Tag(s) : Transposition Cipher

Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Thanks to your feedback and relevant comments, dCode has developed the best 'Ubchi Cipher' tool, so feel free to write! Thank you!

# Ubchi Cipher

This page was modified in July 2021 to take into account the null letters. The previous implementation of Ubchi was incomplete.

## Ubchi Cipher Encoder

### What is Ubchi cipher? (Definition)

Übchi is a double transposition cipher (with the same permutation key) used by the Germans during the First World War.

### How to encrypt using Ubchi cipher?

Ubchi consists of a columnar transposition, the addition of null letters, then a second columnar transposition.

Example: Encrypt SECRET with the key UBER

Step 1 - Write the message in a grid of width N with N the size of the key.

Example: The key UBER has 4 letters so

UBER
SECR
ET

Step 2 - Sort the key alphabetically and swap the columns of the table accordingly

Example:

BERU
ECRS
TE

Step 3 - Read the table in columns from top to bottom and from left to right in order to get a new message

Example: Intermediate message: ETCRSE

Step 4 - Add null letters, any letter. Without this, the encryption is a classical double transposition, the addition of a single letter is enough to obfuscate the transposition method.

Example: Intermediate message: ETCRSEX (letter X added, it is preferable to add common letters to confuse the code breakers)

Step 5 - Repeat steps 1 to 3 a second time, the result is the final encrypted message.

Example: 1bis)

UBER
ETCR
SEX

2bis)
BERU
TCRE
EXS

3bis) Final message TECXRES

### How to decrypt Ubchi cipher?

Decryption begins by determining the form of the grid used during encryption. Count the number of characters in the encrypted message and the permutation key, in order to deduce the number of columns and thus, rows.

Example: Decipher TECXRES (7 letters) with the key UBER (4 letters), knowing there is 1 null letter, the table will have the form

UBER
XXXX
XXX

Step 1 - Sort the key in alphabetical order and fill in the grid in columns with the encrypted message.

Example: The grid fills up

BERU
TCRE
EXS

Step 2 - Swap the columns of the grid to find the letters of the key in the correct order.

Example: The grid is swapped

UBER
ETCR
SEX

Step 3 - Read the grid in lines from left to right then from top to bottom in order to get the message

Example: Intermediate message: ETCRSEX

Step 4 - Remove the null letters (found at the end of the message found)

Example: Intermediate message: ETCRSE (1 letter deleted, the letter X)

Step 5 - Repeat steps 1 to 3 a second time, the result is the original plain message.

Example: 1bis)

BERU
ECRS
TE

2bis)
UBER
SECR
ET

3bis) Original plain message is SECRET

### How to recognize a Ubchi ciphertext?

Any message encrypted by Ubchi is a transposition of the characters of the original message, so the analysis of the frequency of the letters and the index of coincidence are the same as those of the plain message.

The cipher was abandoned by the Germans following an article in the French newspaper Le Matin in November 1914, which praised the success of the decryption by the French. Any reference to German coded messages or to the newspaper Le Matin is a clue.

### How to decipher Ubchi without key?

Attempting permutations by brute force is possible as long as the key is not too large (the number of possible permutations is equal to N! With N the size of the key).

The number of null letters is generally limited to 1 or 2. According to some sources, the number of null letters corresponded to the number of words in the permutation key.

### What are the variants of the Ubchi cipher?

The Ubchi figure could be made more complex by repeating the transposition several times or by performing a double transposition by modifying the key the second time.

### When Ubchi was invented?

The Ubchi cipher was used at the start of the First World War.

The principle of encryption by transposition dates from well before.

## Source code

dCode retains ownership of the online "Ubchi Cipher" tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any "Ubchi Cipher" algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any "Ubchi Cipher" function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for "Ubchi Cipher" will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

## Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!