private key and message digest generation is correct