Metadata-Version: 2.4
Name: slink-terminal
Version: 0.1.0
Summary: Secure terminal-to-terminal communication application
Author: Slink Contributors
License: MIT
Project-URL: Homepage, https://github.com/Usernameissojol/Terminal
Project-URL: Repository, https://github.com/Usernameissojol/Terminal.git
Project-URL: Issues, https://github.com/Usernameissojol/Terminal/issues
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=42.0.0
Requires-Dist: rich>=13.7.0
Requires-Dist: pyyaml>=6.0.1
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: pyinstaller>=6.4.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Dynamic: license-file

# Slink — Secure Terminal-to-Terminal Communication System

Slink is a production-quality, security-first terminal-to-terminal text messaging application written in Python 3.12+. It enables direct peer-to-peer encrypted text communication between two computers with peer authentication, forward secrecy, replay protection, session key rotation, and interactive terminal UX.

---

## Key Features

* **Direct Peer-to-Peer:** Communication flows directly between terminals over TCP. No central server or database required.
* **End-to-End AEAD Encryption:** Authenticated encryption using **ChaCha20-Poly1305** (or **AES-256-GCM**).
* **Identity Signatures:** Long-term **Ed25519** identity keypairs for peer authentication.
* **Forward Secrecy:** Ephemeral **X25519** key agreement for every session.
* **Replay Protection:** Monotonic 64-bit sequence numbers and sliding-window anti-replay filter.
* **Key Rotation:** Automatic periodic session key derivation via **HKDF-SHA256**.
* **Trust-On-First-Use (TOFU):** Formatted identity fingerprints and peer database with security alerts on identity key changes.
* **Interactive Terminal UX:** Clean terminal session view with live message streaming and interactive slash commands (`/help`, `/status`, `/peers`, `/fingerprint`, `/clear`, `/quit`).
* **Cross-Platform:** Windows 10/11, Linux, macOS.

---

## Installation & Setup

### Prerequisites
* Python 3.12+ (or Python 3.14)

### Development Installation
```bash
# Clone or open repository directory
cd d:/Projects/Terminal

# Create virtual environment
python -m venv .venv

# Activate virtual environment
# Windows PowerShell:
.\.venv\Scripts\Activate.ps1

# Install dependencies and editable package
pip install -r requirements.txt
pip install -e .
```

---

## Usage Guide

### 1. Check Local Identity & Fingerprint
```bash
slink identity show
slink identity fingerprint
```

### 2. Start Listener (Computer A)
```bash
# Listen on default port 9000
slink listen

# Listen on custom port with LAN discovery enabled
slink listen --port 9000 --discover
```

### 3. Connect to Listener (Computer B)
```bash
# Connect to peer IP address and port
slink connect 192.168.1.10:9000

# Connect using IPv6 address
slink connect "[2001:db8::10]:9000"
```

### 4. Interactive Chat Session
Once connected, type text messages directly. Use slash commands inside the terminal:
* `/help` — Display list of commands
* `/status` — View current session encryption status and message count
* `/fingerprint` — Show local identity fingerprint
* `/peers` — List trusted peer records
* `/clear` — Clear terminal buffer
* `/quit` — Gracefully terminate encrypted session

### 5. Peer Discovery
```bash
slink discover
```

### 6. Configuration Management
```bash
slink config show
slink config set port 9000
slink config set max-message-size 65536
```

---

## Building Executable for Windows (`slink.exe`)

PyInstaller packaging script is provided in `scripts/build_windows.ps1`.

To build a standalone executable:
```powershell
.\scripts\build_windows.ps1
```
The compiled executable will be generated at `dist\slink.exe`.

---

## Security Model & Limitations

Security depends on:
* Correct implementation of cryptographic primitives (`cryptography` library).
* Verification of peer identity fingerprints upon initial connection.
* Endpoint OS security (protection against malware, keyloggers, and physical theft).

*Disclaimer: Slink does not protect against compromised endpoints, hardware keyloggers, or OS-level memory extraction by administrative malware.*

---

## Running Tests & Benchmarks

```bash
# Run full unit, integration, and security test suite
pytest

# Run performance benchmark
python tests/benchmark.py
```
