This Django project demonstrates the implementation of Rabin encryption for image files. The repository provides a simple web interface to encrypt images using the Rabin encryption algorithm.
Follow the steps below to set up the project on your local machine.
- Python 3.8 or later
- pip (Python package manager)
- Git (to clone the repository)
Open your terminal or command prompt and run:
git clone https://github.com/yasser-rafid/Rabin-Image-Encryption.git
cd Rabin-Image-Encryption
It is recommended to use a virtual environment to manage dependencies. Create and activate a virtual environment:
python -m venv env
# On Windows
.\env\Scripts\activate
# On macOS/Linux
source env/bin/activate
Install the required Python packages listed in the requirements.txt
file:
pip install -r requirements.txt
The project uses SQLite as the default database. Run the following commands to create and apply migrations:
python manage.py migrate
To access the admin panel and manage users, create a superuser:
python manage.py createsuperuser
Follow the prompts to enter a username, email, and password. This will create an admin user.
Start the Django development server to test the application:
python manage.py runserver
Open your web browser and navigate to http://127.0.0.1:8000 to view the application.
- Encrypt images using the Rabin encryption algorithm.
- User Authentication: Users can register, log in, and submit their profile information.
- Admin Panel: Admins can manage users and their profiles.
- Simple and intuitive web interface.
- Can register and log in.
- Can submit their profile information (full name, phone number, city, university, department, graduation year, and personal image).
- After submitting their profile, they see a confirmation message instructing them to visit the university to get their paper.
- Can log in to the admin panel (http://127.0.0.1:8000/admin).
- Can view and manage all user profiles.
- Has access to additional administrative features.
The project uses SQLite as the default database. The database file (db.sqlite3
) is automatically created when you run migrations. It stores:
- User information (regular users and admins).
- User profile data.
- Encrypted and decrypted image metadata.
- Ensure that your Python version matches the required version mentioned in the prerequisites.
- The
db.sqlite3
file is excluded from the repository (via.gitignore
) as it contains local data. - For production, consider using a more robust database like PostgreSQL or MySQL.
Run the following command:
python manage.py createsuperuser
Enter a username, email, and password when prompted.
Log in to the admin panel at http://127.0.0.1:8000/admin using the credentials you just created.
Feature | Regular User | Admin User |
---|---|---|
Registration | Can register and log in | Cannot register; must be created via createsuperuser |
Profile Submission | Can submit profile information | Cannot submit profile information |
Admin Panel Access | No access | Full access to manage users and profiles |
Permissions | Limited to personal profile | Can view and manage all user data |
This project is licensed under the MIT License. This project was developed by Yasser Rafid, Abdullah Saad, and Haider Bassim.