Giter Club home page Giter Club logo

cybersecurity-assignment's Introduction

Foundations of Cybersecurity assignment

Objective

Create a Client-Sever application that allows for the sending and receiving of signed encrypted messages

Tasks

  • Create an application that generates public-private key pairs for any user. This will act as an automatic sign up for us in this case

  • Create the client application

    • A program users to send messages securely using encryption and authentication.
    • Sends the hashed userid of the agent to the server upon connecting.
    • Receives the number of saved messages from the server and retrieves them.
    • Verifies the server's signature, decrypts the message, and displays it on the screen.
    • Prompts the user to enter the recipient userid, message, and sends them to the server.
    • Generates a signature based on the message, and sends the encrypted content, timestamp, signature, and unhashed sender userid to the server.
    • Prints the date, message, and prompt for the user to enter a new message.
  • Create the server

    • Storage for messages sent by user that are not yet read by their recipients.
    • Listens for incoming connections from clients at the specified port.
    • Handles one client connection at a time.
    • Has its own private key and the public keys of all users.
    • Uses RSA/ECB/PKCS1Padding for encryption and SHA256withRSA for signature generation.
    • Stores messages in memory in encrypted form, ready to be sent to the recipient.
    • Sends saved messages to the client, deletes them from the server, and verifies the signature.
    • Computes the hashed recipient userid for storing and locating saved messages.
    • Re-encrypts the message with the recipient's public key and saves it in memory.
    • Prints the hashed userid of the client, sender and recipient userid, timestamp, and plaintext message contents for marking purposes.

How to use the application

Signing up:

To sign up a user, run java UserSignup. A prompt will appear asking for a username.

Running the application

Note: Your username must be all lowercase

  • The server has to started first after compiling it.
  • To start the server: java Server <Port number>
  • Proceed to start the client: java Client <host> <port>
  • After Logging in the Client can send messages and see if he/she has any message sent to him.

cybersecurity-assignment's People

Contributors

sliimmaa avatar

Watchers

Nicholas Ifeajika avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.