title: securely authenticate client to server
body: <p>System specs:
  C# client using .NET 3.0. WCF services hosted as windows services on App Servers. MSSql Server 2008R2 DB for data storage.</p>
  
  <p>Hashes of user passwords are stored in the DB for authenticating users. My problem is, I do not know how to securely authenticate the client to the server, using the hash of the client's password. </p>
  
  <p>Having read similar questions on SO, I saw that a challenge-response mechanism was recommended. Could some one give any good coding examples of how this can be done?</p>
  
  <p>Also, if we can securely generate private-public key pair on the server and distribute the public key to all the clients, would using a public key encryption for passing information from the client and server suffice instead of using challenge-response.</p>
  
  <p>EDIT: By Client I meant the user who will be actually using the client machine for logging in.</p>