Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was working on some problem set here and am given the usual prime numbers p, q of the RSA algorithm und am asked for the number of messages that can be encrypted with this particular RSA system that has been given.

My intuitive understanding is to find the number of unique pairs of public key and private key with a given p, q, and then in that sense consequently be able to determine the number of messages that can be encrypted. Would this be a correct interpretation?

Or is there possibly another way of reading off this question? (Apologies for the apparent simplicity of this question but I thought maybe those who are more well versed in this area might have a clearer idea of the question itself.) Thanks.

share|cite|improve this question
up vote 0 down vote accepted

The number of messages that can be encrypted does not depend on the particular public-private key pair. It only depends on $p$ and $q$.

Check in your material for the condition that a message (a number between 1 and $pq$) must satisfy for RSA encryption-decryption to work. Then determine the number of such numbers.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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