Kerrious47

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

README

Kerrious47

File Encryption and Decryption Tool Built with Argon2 and Chacha20-poly1305

Description

This project is a file encryption and decryption tool built using Go. It combines Argon2, a secure key derivation function, with ChaCha20-Poly1305, an authenticated encryption algorithm. This combination ensures both the confidentiality and integrity of your data.

  • Password-Based Encryption: Uses Argon2 to securely derive encryption keys from a password.
  • Authenticated Encryption: Employs ChaCha20-Poly1305 to encrypt files, providing both encryption and integrity checks.
  • Recursive Directory Traversal: Encrypts or decrypts files in current directory and all its subdirectories.
  • Symmetric Directory Structure: Maintains separate directories for encrypted and decrypted files, preserving original structure.
  • Simple CLI Interface: Easy to use command-line interface for encryption and decryption operations.
  • Chunk-Based Processing: Handles large files efficiently by processing them in chunks rather than loading entire files into memory.
  • Versioned File Format: Uses versioned file headers for forward compatibility.
  • Concurrent Processing: Utilizes multiple cores for faster encryption/decryption of multiple files.
  • Operation Statistics: Provides detailed operation statistics upon completion.

Installation

Clone the Repository

git clone https://github.com/Kaiser-Zheng/Kerrious47.git
cd Kerrious47

Build the Project

go build -o kerrious47 main.go

Usage

Encrypting Files

To encrypt files in current directory:

./kerrious47 -e /path/to/directory

The program creates an encrypted_files directory next to the executable, with the following structure:

./kerrious47
└── encrypted_files/
    ├── folder1/          # Named after encrypted directory
    │   └── [preserved structure]
    └── folder2/
        └── [preserved structure]
Decrypting Files

To decrypt previously encrypted files:

./kerrious47 -d /path/to/directory

The program creates a decrypted_files directory next to the executable, with the following structure:

./kerrious47
├── encrypted_files/
│   └── [preserved structure]
└── decrypted_files/
    ├── folder1/         # Named after decrypted directory
    │   └── [preserved structure]
    └── folder2/
        └── [preserved structure]

Directory Structure

The tool maintains a symmetric directory structure:

  • Encrypted files are stored in encrypted_files/[original_directory_name]/
  • Decrypted files are stored in decrypted_files/[original_directory_name]/
  • Both directories preserve the original file hierarchy
  • Encrypted files are preserved after decryption, allowing for multiple decryption runs

Security Consideration

  • Password Strength: Ensure that you use a strong and unique password for encryption to maximize security.
  • Backup: Always keep a backup of your original files before encrypting them.
  • Compatibility: Only files encrypted by this tool can be decrypted with it.
  • File Management: Since encrypted files are preserved after decryption, remember to manually clean up encrypted files when they're no longer needed.

Contributing

Contributions are welcome! Feel free to submit a pull request or open an issue if you have any suggestions or improvements.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳