Signing the message is a way of producing a digital signature similar to hand written signature. The digital signature ensures the message was not altered by a 3rd person. As in the above example, Bob sends a message to Alice. Bob uses Alice’s public key to encrypt the message. It is possible, Alice would have shared her public key to more people in addition to Bob ..