Let's say that Alice wants to send an encrypted message that only Bob can read, and confirms that Alice is the person who wrote this message.
What is the procedure to follow?
When I see the digital signature process, I always see that the message is transferred "clear" to the recipient (so that Bob can chop the document on his side and compare it to the hash received by Alice), but the encrypted part (with Alice The private key) is always the hash.
What happens when we also want to encrypt the message to a specific person? Will there be a "second encryption" process, in which the message will be encrypted by Bob's public key?
Just an example to confirm:
Alice produces a digital signature: creates a hash of the document and encrypts it using its private key.
Alice encrypts the message itself: takes the document and encrypts it using Bob's public key (thus, he is the only one able to decrypt it using his private key).
key). (I guess if the document is large, it can take a long time
finish the process, no?)