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.