-1

while encrypting the plaintext in an affine cipher we encrypt the alphabets with a=0,b=1,c=2,......z=25 and then use the modulo of 26. Can we instead use to encrypt the plaintext with a=1,b=2,c=3,....,z=26 and then use modulo of 27?

shadow kh
  • 101
  • 3

1 Answers1

1

No, you need to have a corresponding value for the letter $0$.

Usual affine cipher schemes have the form $(a * x + b)$ $mod$ $k$

Let's say $a = 3$ and $b = 6$.

If we would encrypt the letter $g$:

$(3 * 7 + 6)$ $mod$ $27 = 0$

You wouldn't have a corresponding letter for the value $0$, since your alphabet starts at $1$. You could even get the same value for two letters:

$g = (3 * 7 + 6)$ $mod$ $27 = 0$

And

$p = (3 * 16 + 6)$ $mod$ $27 = 0$

Edit: $a$ & $m$ aren't allowed to be multiplicatives of each other.

AleksanderCH
  • 6,435
  • 10
  • 29
  • 62