The assignment is to add some security to the simple chat system described in hw0. (See -- I said it was going to come back...) The assignment is to encrypt communications between the clients and the server, and to authenticate the logins. The user database on the server will contain a password and an encryption key. The user name (exactly as before) is sent in the clear. When it is recognized, the server uses the stored key to start encrypting all of the traffic. The next line must be the user's password. Take any suitable action on invalid user names or passwords, but document it. Use the block cipher of your choice; you are responsible for selecting -- and justifying the selection of -- a mode of operation. You must devise your own solutions to the length-padding problem, and for the fact that though you're encrypting printable ASCII, the result of an encryption is an arbitrary set of binary bytes, possibly including NULs, newlines, etc. This will affect how you do input! Note that I said "block cipher". This implies a symmetric cipher... If you're using C, use the encryption library routines that are part of OpenSSL. Type 'man EVP_EncryptInit' and proceed from there. (Note: although they don't seem to be documented, as best I can tell there are AES routines in the library. The man page speaks of EVP_des_cbc; I see EVP_aes_128_cbc, for example. If you're using Java, use the library routines in the Java Cryptography Extension, which is a standard part of Java. See http://java.sun.com/products/jce/index-14.html