Trying to get my head around digital signatures and hit a slight block. The book I am using gives the following information
- Device A hashes a message to create a message digest
- Device A encrypts the digest with device A's private key to create a signature
- Device A adds the signature to the message Device A encrypts the whole message (including the signature) using device B's public key
- Device A sends the message to device B
- Device B decrypts the message with device B's private key
- Device B splits the signature off of the message
- Device B decrypts the signature using device A's public key to get the message digest
- Device B hashes the message to get a message digest
- If the message digest device B created is the same as the one decrpyted, the message has not been tampered with
All fine, but how does device B know what hashing algorithm was used to create the message digest?