Files
pqftpd/README.md
2025-07-21 14:23:21 +00:00

91 lines
2.2 KiB
Markdown

# Post-Quantum FTP (PQ-FTPD)
A simple, secure file transfer utility using post-quantum cryptography for the key exchange. This project features a client-server architecture running inside Docker.
## Features
* **Post-Quantum Security**: Uses the **Kyber768** algorithm from the `liboqs` library to establish a secure channel, protecting against future quantum threats.
* **Containerized Server**: The server runs in a Docker container for easy deployment and dependency management.
* **CLI Interface**: The client provides a simple command-line interface for uploading files.
* **Compression**: Uses `zlib` to compress files before transfer to save bandwidth.
* **Authentication**: Implements a basic username/password authentication scheme.
---
## Prerequisites
### Server (via Docker)
* Docker
* Docker Compose
### Client (Local Machine)
* A C++ compiler (`g++`)
* `make`
* `git`
* `liboqs` installed locally (see build instructions).
* `zlib` (`zlib1g-dev` on Debian/Ubuntu).
---
## How to Run
### 1. Start the Server
From the project's root directory, build and run the server using Docker Compose.
```bash
docker-compose up --build -d
```
* The `-d` flag runs the server in the background.
* To view server logs: `docker-compose logs -f`
* To stop the server: `docker-compose down`
### 2. Build and Run the Client
First, ensure you have the client-side dependencies installed.
```bash
# Install build tools and zlib
sudo apt update
sudo apt install g++ make git zlib1g-dev ninja-build cmake
# Install liboqs
git clone --branch 0.10.2 [https://github.com/open-quantum-safe/liboqs.git](https://github.com/open-quantum-safe/liboqs.git)
cd liboqs
mkdir build && cd build
cmake -GNinja ..
ninja
sudo ninja install
cd ../.. # Go back to project root
```
Now, navigate to the `client` directory and compile the client:
```bash
cd client
make
```
Run the client:
```bash
./bin/client
```
---
## Usage
Once the client is running, you can use the following commands:
* **Upload a file**:
```
> put /path/to/your/local/file.txt
```
* **Exit the client**:
```
> exit
```
Transferred files will appear in the `pq-ftp/server/transfer` directory on the host machine.
---
## License
This project is licensed under the MIT License. See the `LICENSE` file for details.