Encrypted terminal chat written in java.
The entire project is available for all personal or educational purposes. If this project helped you, mark this repository with a star. If you want to contribute, I'm open to your pull requests. Feel free to contact me on j.cerny.zdar@gmail.com.
- Communication between server and client is encrypted by RSA.
- Passwords are saved as SHA hashes.
- Password are hashed with randomized salt
Project is written in Java 1.8 using Maven as dependency management.
Used libraries:
- JUnit - for testing
- Google Guava - as hashing utility
If you do not have maven already installed on your system you can install by:
- On arch based systems:
sudo pacman -S maven
- On debian based systems:
sudo apt install maven
If you are using other operating system than mentioned above visit official maven install documentation.
When you have maven installed just run maven package
in project directory.
All compiled files will appear in target directory.
You can run it from your IDE or just using the terminal:
java -jar server.jar authenticationFile port
Example:
java -jar target/server.jar Authentication.txt 4444
The authenticationFile
can be any text file which server can use to store registered
accounts. Make sure server has rights for reading and writing to this file.
clients
- print list of connected clientskick
(nickname of the user to be kicked) - kick specific connected clientbroadcast
(message) - send message to all connected clientshelp
- print list of server console commands
You can run it from your IDE to, but in IntelliJ IDEA, password input is not hidden and appears as normal test input. You can of course execute it from the terminal:
java -jar client.jar ipAddressOfServer port
Example:
java -jar target/client.jar localhost 4444
:clients
- prints list of connected clients@nickname
- send private message only to tagged user