0
$\begingroup$

I'm working on a cryptography problem and went through the long process of decrypting a sent message to get a $27$ digit number.

It then says: Plaintext blocks have $18$ letters and that such an alphabetic block is converted to a decimal string by considering it to be an $18$-digit base-$26$ integer (where $A$ represents $0$, $B$ represents $1$, etc.) and then taking the decimal expansion of this integer. I really have no idea of what this means or how to begin, can someone please just point me in the right direction.

For example, how would the alphabetic plaintext "HELLO" be made into a plaintext message.

$\endgroup$
2
$\begingroup$

In general a base-$n$ number has a value given by the summation of the digits multiplied by $n^k$ where $k$ is their position in the number starting at $0$.

For example, the number $234=2*10^2+3*10^1+4*10^0$ in base-$10$. In base $26$ the number represented by "HELLO" given in your example would be $7|4|11|11|14=7*26^4+4*26^3+11*26^2+11*26^1+15*26^0=3276873$.

$\endgroup$
  • $\begingroup$ so the number I have from decrypting is $p_{1}*26^17+p_{2}*26^16+...+p_{18}*26^0$? Is that I should go about trying to solve this for an alphabetic message? $\endgroup$ – joseph Feb 24 at 20:14
  • $\begingroup$ Yes that seems correct from your description. If you gave the actual plaintext I could help further. $\endgroup$ – Peter Foreman Feb 24 at 20:16
  • $\begingroup$ how would you solve that though considering its one equation with 18 unknowns? $\endgroup$ – joseph Feb 24 at 20:21
  • $\begingroup$ Well its quite easy to convert between different bases by using an online tool. $\endgroup$ – Peter Foreman Feb 24 at 20:27
  • $\begingroup$ I'm trying to get the letters though what other base would I be converting too? $\endgroup$ – joseph Feb 24 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.