# Tag Info

1

a bit of history Historically, one-time pads written on paper were almost invariably one of two types: "alphabetic" or "decimal". CT-46 is one type of straddling checkerboard encoding -- but CT-46 assumes you are using a decimal one-time pad. Alphabetic ("base 26"): the key pad has groups of 5 alphabetic letters 'A' through 'Z'. Using these pads requires ...

2

Your calculator is correct: $$105-48 = 57 \equiv 5 \pmod{26}.$$ Your Python code, however, calculates 105 - 48 % 26, which Python, due to its operator precedence rules, evaluates as 105 - (48 % 26) = 105 - 22 = 83. To get the correct remainder modulo 26, you need to add parentheses to your Python code so that it reads (105 - 48) % 26 instead. This will ...

3

In modular calculations such as this, the divisor (in your case 26) must be at least the size of your character code space. Your code space is 46 characters, so that is not going to work. Any output of the modular calculation will be less than the divisor, so you will never get 83 for x mod 26, it is not going to happen. For a 46 character code space, 46 is ...

4

This is Cipolla's algorithm, I believe. The integers mod $p$ we call $\mathbf{F}_p$, and since $h^2 -4x$ is a quadratic nonresidue mod $p$, the polynomial $P(Y) := Y^2-(h^2-4x) \in \mathbf{F}_p[Y]$ has no roots. We can then mod out the polynomial ring $\mathbf{F}_p[Y]$ to get $\mathbf{K} := \mathbf{F}_p[Y]/(Y^2-(h^2-4x))$ (which by some algebra we know is ...

Top 50 recent answers are included