Skip to main content

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

# 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

slink identity show
slink identity fingerprint

2. Start Listener (Computer A)

# 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)

# 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

slink discover

6. Configuration Management

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:

.\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

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

# Run performance benchmark
python tests/benchmark.py

Metadata

Release files for slink-terminal 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slink-terminal 0.1.0
File Size Uploaded
slink_terminal-0.1.0.tar.gz 44.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for slink-terminal 0.1.0
File Interpreter ABI Platform
slink_terminal-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 96.7 kB

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page