Your requirement is not clear to me.
1) Does the .NET side already exist or are you going to write it?
2) It is relatively easy to create a shared secret between two parties using Diffe-Hellman key
exchange (
http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange ). The difficulty is in proving that each end of the connection is who they say they are. What are the requirements for this authentication?
3) Encrypting passwords is usually not a good idea but much depends on why you are doing it. Why are you encrypting the password? What is the purpose of the password?
The industry standard for secure communication between two parties is SSL/TLS (
http://en.wikipedia.org/wiki/Transport_Layer_Security ) which provides for both secure communication and authentication. SSL/TLS is available for both
Java and .NET . Data transfer through an SSL/TLS channel is encrypted so there is normally no need for explicit encryption of the password.