Consider that Alice wants to send a digitally signed message to Bob. Mallory might be able to publish his public key under Alice's name and then impersonate Alice to send a message with an apparently valid signature.
But let's assume that Bob already has received Alice's correct public key. Can Mallory still send a fake message with a valid signature using more advanced methods?
Consider the following situation: Bob knows Alice's public key. Alice private key is secret and only known to Alice.
Mallory doesn't have Alice's private key, but he knows her public key.
Alice now sends the signed message "today is my birthday". Mallory wants to change that message to say "tomorrow is my birthday". Mallory and Alice know What is message: "today is my birthday".
Can Mallory find a way to send his fake message without Bob noticing, i.e. with a valid signature.
Could Mallory somehow compare the hash value of "today is my birthday" and the signature generated by Alice and learn from that how to generate a valid signature of "tomorrow is my birthday" under Alice's public key?