Home computickets Line decryption encrypted vertical permutation method

Line decryption encrypted vertical permutation method

Author

Date

Category

There is a very old cipher by vertical permutation (“Column Method”), but I have a problem in the message decryption. Can someone tell how to decrypt these messages (what method to set columns)? I do not know how to find out the real length of the column. Only the encryption method is told in the literature, and if the decoding is, only for a fully completed table, in the case of the text from the example, it will give an incorrect answer. Example:

c r y p t o
1 4 6 3 5 2
H e l l o w
O R L D // Ciper HowlDeroll

Answer 1, Authority 100%

Key here 1 4 6 3 5 2 , its length 6, so that we know that the encryption length 10 includes four columns in length 2 and 2 incomplete column length 1. In addition, the key implicitly contains a rearrangement table (as an index)

K 1 4 6 3 5 2 2
 Length L 2 2 2 2 1 1
 Index i 1 2 3 4 5 6
 1: HO 2: W 3: LD 4: ER 5: O 6: LL

So for the K-th part of the input line, we find the element K in the key, its index i, the length of the part l [i], and write to the i-th column of the output table L [i] characters.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions