Given a plaintext of length 20 over the latin alphabet {A, B, . . . , Z} and the RSA key (n, e) with n = 77. Find a way to break up the plaintext into as little as possible blocks of information, each of which can be encrypted by the RSA algorithm using the given key.

My question is,

  1. What are the possibilities for a plaintext (length 20). Is it $26^{20}$ or $26\ nPr\ 20$?

    I think, since we have 26 characters we are in the sense writing as 20 characters, then a permutation should be what is needed since we essentially write all possible ways 26 lengths can be 'expressed' into 20 lengths (permuting).

  2. What is a way to break it up? Taking $log_{77}{P}$ seems like a way. Is there any other way? Even with $log_{77}{P}$, how do I actually proceed to encrypt?


1 Answer 1

  1. 26^20 because we have possible repetitions
  2. RSA Enc is a deterministic algorithm, so encrypting each letter(this is because $n$ has two digits and blocks are constructed by 2 digits ea) gives the same output, hence, a dictionary of each letter with its encryption (26 in total)
  • 4
    $\begingroup$ The answer to 2 is off track. As suggested in the question, we can break the plaintext into $\left\lceil\,\log_{77}(26^{20})\right\rceil$ RSA cryptograms. This is of course very insecure, for several reasons: $n$ is so small; and independently, anyone with the public key can verify a guess of the plaintext. Hint: consider the plaintext as an integer originally in base 26 when expressed as letters, and re-encoded in base 77 for encryption. $\endgroup$
    – fgrieu
    Aug 2, 2022 at 8:17
  • $\begingroup$ I just suggested another way to answer the second question $\endgroup$
    – Don Freecs
    Aug 2, 2022 at 8:41
  • 3
    $\begingroup$ As fgrieu has indicated, you can do this base conversion yourself by multiplying with 26 and then adding the index of the character in the alphabet to the (big) integer - doing this 20 times. The resulting value can be put into base 77 by using divide with remainder (usually a single operation in bigint libraries), doing this $\big\lceil\log_{77}(26) \cdot 20\big\rceil$ times. The reverse is -uh- the reverse of this. $\endgroup$
    – Maarten Bodewes
    Aug 2, 2022 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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