These protect against somebody who would like to generate two messages with the same hash output. Uses of Diffie Hellman Algorithm. Digital signature: The RSA algorithm uses the public key to encrypt and the private key to decrypt in the encryption/decryption process. The preservation of e ciency and security in the ECDSA is important. Generate a random per-message value k where 1