Skip to content
NitzanBarEitanPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

PhotosApp

PhotosApp is a secure client‑server photo management application that supports user authentication, album‑based access control, encrypted communication, and facial recognition. It includes a graphical interface for desktop clients and an optional Android client via submodule.

Features

  • User Management
    Signup, login, and per‑album access control with role‑based permissions.

  • Facial Recognition
    Automatically detects and compares faces using face_recognition.

  • Encrypted Communication
    All traffic is encrypted using hybrid RSA‑AES encryption.

  • Graphical Interface
    A modern GUI built with customtkinter for uploading, viewing, and searching photos.

  • Modular Architecture
    Includes optional Android client via Git submodule.

Repository Structure

PhotosApp/
├── AndroidApp/               # Android client (Git submodule)
├── authentication.py         # User authentication (SQLite + JWT)
├── basic_client.py           # Client logic for communicating with server
├── basic_server.py           # Server-side request handling
├── main.py                   # Windows GUI client (CustomTkinter)
├── requirements.txt          # Python dependencies
├── server_library_manager.py # Face recognition and photo metadata
├── socket_app_utils.py       # Encrypted socket communication
├── .gitignore
├── .gitmodules
└── README.md

Setup Instructions

1. Install Requirements

Ensure you have Python 3.8+ installed, then run:

pip install -r requirements.txt

If requirements.txt is missing or incomplete, install manually:

pip install face_recognition pillow customtkinter pycryptodome

Note:
face_recognition requires dlib, which may need CMake and Visual Studio Build Tools on Windows.

2. Generate RSA Keys (Manually)

Before running the server and client, generate and place your own keys:

openssl genrsa -out private_RSA_key.pem 2048
openssl rsa -in private_RSA_key.pem -pubout -out public_RSA_key.pem

These files should not be committed to version control.

3. Run the Server

python basic_server.py

The server will:

  • Listen on port 6000
  • Create an albums/ folder to store uploaded photos and metadata

4. Run the Client

python main.py

Use the interface to:

  • Sign up / Log in
  • Create albums
  • Upload or retrieve photos
  • Search for faces
  • View photo gallery

Programmatic API Example

You can also use basic_client.py for scripted access:

from basic_client import signup, login, create_album, upload_photo

token = signup("user", "password123", is_admin=True)
token = login("user", "password123")
create_album(token, "vacation2025")
upload_photo(token, "vacation2025", "photos/image.jpg")

Android Submodule

This repository includes an Android client located in the AndroidApp/ subdirectory. To initialize it:

git submodule update --init --recursive

Then open the project in Android Studio.

Security Details

  • Passwords hashed using SHA256 + salt
  • JWT tokens for session management
  • AES encryption with per-session keys exchanged via RSA
  • All communication performed over encrypted sockets

Notes

  • .pem key files must be present locally for encryption but kept out of version control

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages