I'm trying to create the digital signature by using these parameters and RSA algorithm:

  • p = 645353605880701501120167331073
  • q = 350784310265709643169455170929
  • e = 19
  • message = "G’day mate! As we are using a publicly available free WiFi network, our communication may be intercepted by cyber attackers. Therefore, we need to learn and apply cryptography techniques in our future communications."

I assume that I need to use OpenSSL to create the signature. However, I have no idea why the value of p, q, and e are given... If I use OpenSSL, maybe I don't need to use these values, and we can generate RSA public/private key automatically. Should I use OpenSSL to create a digital signature, or do I need to compute it manually? Are there any other tools that I could use to get the result?

Many thanks.


2 Answers 2


The public modulus $n=pq$ obtained from the question is 198-bit. That size is much too short to be secure.

Also it's too short for the most common standard RSA signature formats RSASSA-PKCS1-v1_5 and RSASSA-PSS, even with a 128-bit hash.

See Dave Thomson's comment for other padding formats that could still be usable.

  • 1
    $\begingroup$ OpenSSL also supports X9.31 padding which can be as little as 2 bytes, and 'no' padding which if you allow (room for at least) one zero byte is effectively 'block type 0' from PKCS1-v1; these would allow a 160-bit hash, of which I believe RIPEMD160 is not broken. These paddings are no longer standard and not secure, but RSA-198 is already broken as you say so additional weakness doesn't really matter. $\endgroup$ Aug 17, 2022 at 2:02

I think you can do that in theory but I'm not sure of the actual specifics on how to do that. It's generally not advised to generate your own P & Q unless you have taken due care in generating them.

  • $\begingroup$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Aug 16, 2022 at 14:40

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.