Version v0.3.32 - Update readme.md some more
This commit is contained in:
137
README.md
137
README.md
@@ -1,48 +1,5 @@
|
||||
# OTP Cipher - One Time Pad Implementation
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Download Pre-Built Binaries
|
||||
|
||||
**[📥 Download Latest Release](https://git.laantungir.net/laantungir/otp/releases)**
|
||||
|
||||
Visit the releases page and download the appropriate binary for your system:
|
||||
- `otp-vX.X.X-linux-x86_64` for Intel/AMD 64-bit systems
|
||||
- `otp-vX.X.X-linux-arm64` for Raspberry Pi and ARM 64-bit systems
|
||||
|
||||
After downloading:
|
||||
```bash
|
||||
# Make executable and run
|
||||
chmod +x otp-v*-linux-x86_64
|
||||
./otp-v*-linux-x86_64
|
||||
```
|
||||
|
||||
**Or use the local build:**
|
||||
```bash
|
||||
# After building from source
|
||||
./build/otp-x86_64 # x86_64 systems
|
||||
./build/otp-arm64 # ARM64 systems
|
||||
```
|
||||
|
||||
### First Steps
|
||||
|
||||
1. **Generate your first pad:**
|
||||
```bash
|
||||
./build/otp-x86_64 generate 1GB
|
||||
```
|
||||
|
||||
2. **Encrypt a message:**
|
||||
```bash
|
||||
./build/otp-x86_64 encrypt
|
||||
# Follow the interactive prompts
|
||||
```
|
||||
|
||||
3. **Decrypt a message:**
|
||||
```bash
|
||||
./build/otp-x86_64 decrypt
|
||||
# Paste the encrypted message
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
A secure one-time pad (OTP) cipher implementation in C.
|
||||
@@ -83,8 +40,6 @@ To address this problem, we can use Nostr to share among devices the place in th
|
||||
One-time pads can be trivially encrypted and decrypted using pencil and paper, making them accessible even without electronic devices.
|
||||
|
||||
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
- **Perfect Security**: Implements true one-time pad encryption with information-theoretic security
|
||||
@@ -99,73 +54,95 @@ One-time pads can be trivially encrypted and decrypted using pencil and paper, m
|
||||
- **Cross-Platform**: Works on Linux and other UNIX-like systems
|
||||
|
||||
|
||||
## Building
|
||||
## Quick Start
|
||||
|
||||
### Download Pre-Built Binaries
|
||||
|
||||
**[Download Current Linux x86](https://git.laantungir.net/laantungir/otp/releases/download/v0.3.31/otp-v0.3.31-linux-x86_64)**
|
||||
|
||||
**[Download Current Raspberry Pi 64](https://git.laantungir.net/laantungir/otp/releases/download/v0.3.31/otp-v0.3.31-linux-arm64)**
|
||||
|
||||
After downloading:
|
||||
```bash
|
||||
# Make executable and run
|
||||
chmod +x otp-v0.3.31-linux-x86_64
|
||||
./otp-v0.3.31-linux-x86_64
|
||||
```
|
||||
|
||||
### First Steps
|
||||
|
||||
1. **Generate your first pad:**
|
||||
```bash
|
||||
./otp-v0.3.31-linux-x86_64 generate 1GB
|
||||
```
|
||||
|
||||
2. **Encrypt a message:**
|
||||
```bash
|
||||
./otp-v0.3.31-linux-x86_64 encrypt
|
||||
# Follow the interactive prompts
|
||||
```
|
||||
|
||||
3. **Decrypt a message:**
|
||||
```bash
|
||||
./otp-v0.3.31-linux-x86_64 decrypt
|
||||
# Paste the encrypted message
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Building from Source
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- GCC compiler
|
||||
- Git (for version tracking)
|
||||
- Make
|
||||
- Optional: ARM64 cross-compiler (`gcc-aarch64-linux-gnu`) for cross-compilation
|
||||
|
||||
### Build Commands
|
||||
|
||||
Use the included build script for automatic versioning and cross-compilation:
|
||||
|
||||
```bash
|
||||
# Build for current architecture (with auto-versioning)
|
||||
./build.sh "commit message"
|
||||
|
||||
# Build commands
|
||||
./build.sh build "commit message" # Build x86_64 and ARM64 (if cross-compiler available)
|
||||
./build.sh clean # Clean build artifacts
|
||||
./build.sh install # Install to system
|
||||
./build.sh uninstall # Remove from system
|
||||
```
|
||||
|
||||
The build script automatically:
|
||||
- Increments patch version (v0.3.24 → v0.3.25)
|
||||
- Creates git commit and tag
|
||||
- Builds for x86_64 and ARM64 (if cross-compiler available)
|
||||
- Outputs to `build/otp-x86_64` and `build/otp-arm64`
|
||||
- Uploads binaries to Gitea releases (if `~/.gitea_token` exists)
|
||||
|
||||
### Traditional Make
|
||||
|
||||
You can also use make directly (without automatic versioning):
|
||||
|
||||
```bash
|
||||
make # Build for current architecture
|
||||
make static # Static linking
|
||||
make clean # Clean artifacts
|
||||
make static # Static linking (standalone binary)
|
||||
make clean # Clean build artifacts
|
||||
make install # Install to /usr/local/bin/otp
|
||||
make uninstall # Remove from system
|
||||
```
|
||||
|
||||
Output: `build/otp-$(ARCH)` (e.g., `build/otp-x86_64`)
|
||||
|
||||
After building, run with:
|
||||
```bash
|
||||
./build/otp-x86_64
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Interactive Mode
|
||||
```bash
|
||||
# If you downloaded the binary:
|
||||
./otp-v0.3.31-linux-x86_64
|
||||
|
||||
# If you built from source:
|
||||
./build/otp-x86_64
|
||||
# or
|
||||
./build/otp-arm64 # On ARM systems
|
||||
```
|
||||
|
||||
### Command Line Mode
|
||||
```bash
|
||||
# Generate a new pad
|
||||
./build/otp-x86_64 generate 1GB
|
||||
./otp-v0.3.31-linux-x86_64 generate 1GB
|
||||
|
||||
# Encrypt text (interactive input)
|
||||
./build/otp-x86_64 encrypt <pad_hash_or_prefix>
|
||||
./otp-v0.3.31-linux-x86_64 encrypt <pad_hash_or_prefix>
|
||||
|
||||
# Decrypt message (interactive input)
|
||||
./build/otp-x86_64 decrypt <pad_hash_or_prefix>
|
||||
./otp-v0.3.31-linux-x86_64 decrypt <pad_hash_or_prefix>
|
||||
|
||||
# List available pads
|
||||
./build/otp-x86_64 list
|
||||
./otp-v0.3.31-linux-x86_64 list
|
||||
```
|
||||
|
||||
## Version System
|
||||
|
||||
Reference in New Issue
Block a user