If we use the same algorithm to encrypt and sign a message, what can happen if the message is intercepted and read by a third party?

  • It does not matter, as long as it is not a weak or obsolete algorithm being used. – NASAhorse Mar 28 '19 at 9:48
  • 4
    There is no such same algorithm. Only RSA uses the same trapdoor function to implement encryption, decryption, signature, and sign. However, the padding schemes are completely different RSA-OAEP for encryption and RSA-PSS for signature. – kelalaka Mar 28 '19 at 10:02
  • It is okay to use RSA-based signatures and RSA-based encryption, but do not try to use the same key for both algorithms. – Future Security May 7 '19 at 17:58

Although the names of the algorithms are the same, they are actually a little different when used for signing vs when used for encryption. The only thing similarity the two algorithms have is that they both use the same trapdoor permutation, conveniently called RSA. The difference is both in where certain variables come from, and the use of padding, which turns the insecure function into a cryptographically secure and useful algorithm. Encryption often uses RSA-OAEP, whereas signing uses RSA-PSS.

So even if you are using RSA/RSA for encryption and signing, an attacker who intercepts the message will be able to neither decrypt it nor forge valid ciphertext without first obtaining the relevant private key.

| improve this answer | |

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.