While reading this page about Public-Private key encryption, I asked myself a question about digital signature:
Alice wants to sign a message for Bob; she uses her private key to sign the message. Bob receives it and uses Alice's public key to generate the signature and checks that it's the same as the one that Alice attached to the message.
If I'm a pirate, I can intercept Alice message, and use Alice's public key to generate the signature too, no? If I'm right, it means that I can change Alice message, uses Alice's public key to generate the new signature and send this one to Bob, instead of the original one, no ?
There must be something wrong in this logic, but I don't see where...