Score:1

Substitution Cipher

nc flag

For the Substitution Cipher, for functions such as $$f(x) = x^k \pmod{26}$$ or $$f(x) = x^k + k \pmod{26}$$ (functions that consist of x^k), why do the values of k=5 or k=7 or k > 10 have one-to-one mapping? I know 5 and 7 are relatively prime to 26, however, what about 3 or 9? Also why do it map when k > 10?

Score:2
sa flag

The map $x\mapsto x+a ~\pmod n$ is a permutation for any constant $a$.

The map $x\mapsto x^k \pmod n$ is a permutation if and only if )$\gcd(k,\phi(n))=1,$ as pointed out in the other answer.

So $x\mapsto x^k+k\pmod n$ is also a permutation.

Score:1
vu flag

Unlike $k\cdot x$, $x^k$ works in the multiplicative group rather than additive group.

So (by Fermat's little theorem IIRC) you need to factor 26, subtract 1 from each factors, then multiply them back together (like RSA). which means $k$ must be coprime to 12.

By this logic, 3 and 9 obviously don't work; and it's probably because you've not tried every $k>10$ to determine validity.

I sit in a Tesla and translated this thread with Ai:

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.