This is my understanding so far of the digital signing process that occurs in a blockchain:
To digitally sign a transaction, a user needs to have a private key and a corresponding public key generated from the private key. This public key allows other users to verify the validity of the signature.
Initially, the user creates the message containing the transaction data (e.g. recipient, amount of ethers, nonce, etc...) and applies a cryptographic hash algorithm to the message. This produces a unique value for the message called the "digest".
The user then signs the message using a digital signature algorithm (e.g. ECDSA, Elliptic Curve Digital Signature Algorithm), entering the private key and the previously calculated digest as inputs to the algorithm. The output of ECDSA is composed of two numbers (r, s) which will then be used in the verification process.
The digest, digital signature, and public key are then added to the original message, and the transaction is ready to be sent on the network. Once the transaction is broadcasted on the network, nodes that receive the transaction can verify that the message has not been tampered with by reapplying the hash function to the original message and comparing the resulting digest with the received digest. If the two values are identical, then the message has not been modified.
In addition, nodes verify that the message is authentic by using the digital signature algorithm again, but this time with the public key of the sender. The output will be a boolean value indicating whether the signature is valid or not.
Am I correct in saying that the integrity and authenticity of the messages are separately verified through both the hashing and digital signature algorithms respectively?