This repository contains a simple Java project demonstrating a secure server implementation using Bouncy Castle for cryptographic operations and a Certificate Authority (CA) for secure communication.
- Server implementation with secure communication.
- CA certificate generation and management.
- Key pair generation and secure storage.
- Java Development Kit (JDK) installed (version 20 or higher).
- MySQL Server (xampp)
-
Clone the repository to your local machine:
https://github.com/Hayan47/Information-Security.git
-
Run the server
-
Run the CA
-
Run the client
To set up the MySQL server on port 3306 using XAMPP:
- Make sure XAMPP is installed and MySQL is started.
- Open a MySQL client, such as phpMyAdmin.
- Copy and paste the following SQL statements into the SQL query editor.
- Execute the SQL statements.
CREATE DATABASE IF NOT EXISTS iss1;
USE iss1;
CREATE TABLE IF NOT EXISTS user (
name VARCHAR(20),
password TEXT(50),
number INT,
role ENUM('student', 'doctor')
);
CREATE TABLE IF NOT EXISTS message (
name VARCHAR(20),
message TEXT(100)
);
CREATE TABLE IF NOT EXISTS marks (
student_name VARCHAR(20),
marks TEXT(100),
id INT AUTO_INCREMENT PRIMARY KEY,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
- Update the keystore password in the code to match your security requirements.
- Modify the CA's subject distinguished name and other parameters in
CertificateGenerator
based on your use case. - Customize the server logic in the
Server
class as needed for your application.
- Bouncy Castle Library: https://www.bouncycastle.org/