Score:2

Mathematical definition of scytale

tl flag

Most cryptographers know the scytale. It is that cipher where you roll a leather strip around a rod and then write text on it. For encryption you roll it off the stick and for decryption you roll it back on the stick. It can be visualized like that (from Wikipedia):

   |   |   |   |   |   |  |
   | I | a | m | h | u |  |
 __| r | t | v | e | r |__|
|  | y | b | a | d | l |
|  | y | h | e | l | p |
|  |   |   |   |   |   |

Now I was wondering how to formulate that mathematically correct. I tried some stuff, but I could not find a function (as for example with Caesar: $c_i = m_i + k \mod 26$), that represented the cipher correctly. Can someone help me?

Daniel S avatar
ru flag
In your example (which is 20 letters long, with 5 letters to a row), if we write $p_0$ for the first character, then the map is $c_i=p_{5i\mod{19}}$ for $0\le i\le 18$ and $c_{19}=p_{19}$.
Score:4
sa flag

The modern term is interleaving, i.e., read in by row, read out by column.

Let the plaintext be $[x(0),\ldots,x(mn-1)]$ where $m$ is the number of rows and $n$ is the number of columns, with padding if necessary to get a plaintext length that is a rectangular number of the form $mn$.

The index $k$ for $x(k)$ can be decomposed as $k=im+j$ with $0\leq i \leq n-1$ and $0\leq j \leq n-1.$ Note that $i=k\pmod n$ and $j=k\pmod m.$

Then the ciphertext is $[y(0),\ldots,y(mn-1)]$ where $y(k)=y(im+j)=x(jn+i).$

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.