If I were to post on a forum (with potentially malicious administrators) my public RSA key and a small string of text that was signed with the corresponding private key, could someone with access to both of these files precisely change the output of the decryption of the signed data without factoring the given modulus and reverse engineering the private key used to sign the data?
2 Answers
A malicious forum administrator cannot forge the signed text in such a way that it will look like it comes from your key pair.
However, a malicious forum administrator can replace both your public key and signed text, with his own public key and signed text, and display it to the person(s) you're communicating with, while still showing you your own public key and signed text so you don't notice the replacement.
Forum post is not a good way to distribute trust, especially if your life depends on it.
Yep, as Lie Ryan says, a forum admin (or any other adversary) cannot edit a signature (or the data that was signed) created using your private key, and have the signature still verify, unless the adversary has your private key too. Having your public key doesn't help. In fact, the entire point of the public key is that you distribute it to everybody; without it, they cannot verify a signature you created (or encrypt a message for you).
As techraf's comment implies, if it were possible to undetectably tamper with signed data given only the signer's public key, that would break the entire concept of asymmetric digital signatures. Having my public key doesn't let you tamper with my signed data (without breaking the signature, I mean) any more than it lets you decrypt messages that were encrypted to me. This is not unique to RSA, either; it's the general format of all asymmetric (also called public-key) signing schemes.