Simplified prototype of a client, repeater and server system in which the communications between client-repeater and repeater-server are encrypted and implemented through sockets.
- Open a terminal at root of this project
Caso3-InfraComp/
. - Make sure that you have the project compiled. Use this command for it
find $JAVA_./src/app/ -name '*.java' -exec javac -d ./bin {} +
or your prefered Java workflow. - Execute App.java or use
java -cp ./bin app.App
to run all the components. This will ask you the encryption type for all of the following communications, and will start the desired number of clients, repeater and server. For each client, you will be asked to enter their client ID and message ID that they are requesting. Then, the program will execute different processes to automatically generate all the needed keys for the communication. Finally, you will be able to see the message received by each client followed by a thread indicator.
If you want to individually visualize the components, run the following commands at different terminals:
- Make sure that all the client, server, and repeater keys to be used are generated. If you need to create new keys, follow the instructions at the keys generation section.
- To run the server, please use
java -cp ./bin app.server.Server type
. - To run the repeater, please use
java -cp ./bin app.repeater.Repeater type
. - To run a single client, please use
java -cp ./bin app.client.Client type clientID messageID
.
- Valid encryption types:
SIMETRICO
orASIMETRICO
. The chosen type must be the same one for all the components in an execution. - The clientID is an integer number.
- The messageID is an integer number between 00 and 09.
If you need to generate a new key, run the following commands:
- For symmetric encryption:
java -cp ./bin app.security.Symmetric type [id]
. - For asymmetric encryption:
java -cp ./bin app.security.Asymmetric type [id]
.
- The valid types are
client
,repeater
orserver
. - The
id
is an integer number and is only applicable to client keys.
- MIT license
- Copyright 2021 © Juan Romero & Juan Alegría