If Alice requests something to bob, then Alice sends her public key and Bob encrypts message by using Alice's key.
Bob uses his private key and hash function to make a signature. After finishing this procedure, Bob sends encrypted message with signature.
At last, Alice decrypts message and put it in hash function and she compares output with decrypts signature.
This is what I understood about transaction.
But When transaction is waiting in memory If someone changes a content of signature by using bob's public key How miner know it is wrong signature?
To compare message with signature, miner needs Alice's private key. But miner doesn't have.
Is there other way to compare signature with encrypted message?