An Application for secure email exchange: encryption-decryption with AES in ECB mode, including secure delivery of the secret key with RSA and signature based on EL-GAMAL, using the Hash function SHA-256
There are two ways to run the application : using mvn spring-boot:run or by running the Application class directly from your IDE.
Below are the configuration details to start the project using a spring-boot:run command. Both Eclipse and Intellij IDEA are covered.
- Right click on a project folder and select
Run As-->Maven build... After that a configuration window is opened. - In the window set the value of the Goals field to
spring-boot:run - You can optionally select
Skip testscheckbox - All the other settings can be left to default
Once configurations are set clicking Run will start the application
- On the right side of the window, select Maven --> Plugins-->
spring-boot-->spring-boot:rungoal - Optionally, you can disable tests by clicking on a
Skip Tests modeblue button.
Clicking on the green run button will start the application.
After the application has started, you can view your it at http://localhost:9999/ in your browser.
(You can change the port from application.properties under src/main/resources. ( i.e. src/main/resources/application.properties)
If you want to run the application locally in the production mode, use spring-boot:run -Pproduction command instead.
Project follow the Maven's directory layout structure:
- Under the
srs/main/java/com.packagename.chatare located Application sourcesApplication.javais a runnable Java application class and a starting pointGreetService.javais a Spring service classMainView.javais a default view and entry point of the applicationUser.javais a Model Class of a user
- Under the
srs/main/java/DAOare located Application logic sourcesDAO/AES.javais a service class with implementation of AES algorithm in ECB modeDAO/ElGamalSignatureInstance.javais a service class with implementation of El Gamal algorithm of handling the digital signatureDAO/IRSA.javais an Interface of RSA algorithmDAO/RSAImpl.javais a service class with implementation of RSA algorithm methodsDAO/Utils.javais a service util class for RSAImpl
- Under the
srs/testare located test files src/main/resourcescontains configuration files and static resources- The
frontenddirectory in the root folder contains client-side dependencies and resource files- All CSS styles used by the application are located under the root directory
frontend/styles - Templates would be stored under the
frontend/src
- All CSS styles used by the application are located under the root directory
If you run application from a command line, remember to prepend a mvn to the command.
There are 2 users in the system
user #1: username: Alice , password: 123
user #2: username: Bob , password: 123
After sending the message from Alice to Bob, this is what will be seen on Alice's screen:
After sending the message from Alice to Bob, this is what will be seen on Bob's screen: