112 lines
4.7 KiB
Markdown
112 lines
4.7 KiB
Markdown
# PCS - P7MJ's enCryption System A-3-ii "Terminal"
|
|
|
|
## 🔤 Introduction
|
|
|
|
PCS is a secure and lightweight Python utility designed to encrypt and decrypt any type of file that can be read in binary. Virtually every file can be encrypted and decrypted, including archives, pictures, movies, code, and programs.
|
|
|
|
It is the standard encryption program for [BUGPy-mOS](https://git.wholeworldcoding.com/wholeworldcoding/BUGPy-mOS) (implemented as the FDEA launcher and encryption "ant"). An implementation derived from the older A-2-i is included in BUGPy as an utility.
|
|
|
|
This version features total extension freedom. You can now not only encrypt `.zip` files, but any type of file readable in binary. Additionally, there are no longer any limits regarding the names and extensions of the archives and the keyfiles generated.
|
|
|
|
A-3-ii, is compatible both ways with A-2-i, provided that you follow A-2-i's strict filename extension protocols. A-3-ii and A-2-i are compatible with A-1-i if you do not use keyfiles while encrypting.
|
|
|
|
PCS is tested on **Debian Trixie** only. It should work on other Linux distributions, Windows, and Mac, but it is not tested or guaranteed.
|
|
|
|
## 🧩 Features
|
|
|
|
- Uses `PBKDF2HMAC` with **480,000 iterations** to make your password strong, cryptographically.
|
|
|
|
- Generates a unique 16-byte random salt for every encryption process, protecting against rainbow table attacks.
|
|
|
|
- Salts can be stored directly inside the encrypted file, or outside the file as a key, providing versatility and security.
|
|
|
|
- Fernet ensures that if the file is corrupted, tampered with, or an attempt to decrypt it has a wrong password, the program will refuse to decrypt rather than producing corrupt data.
|
|
|
|
- Removal of original files, including keyfiles, is supported after encryption or decryption.
|
|
|
|
> [!TIP]
|
|
> The security of the archive depends on your password! Since there is no limit to your password length, or complexity, ensure your password has >9 chars and includes symbols and numbers. This makes it impractical for attackers to brute-force your password in time.
|
|
|
|
## 🛠️ Installation and Dependencies
|
|
|
|
PCS requires Python 3.x and the `cryptography` library.
|
|
|
|
1. **Clone this repository** or download a release from the [Releases](https://git.wholeworldcoding.com/p7mj/PCS/releases) page.
|
|
2. **Install the dependency:**
|
|
```bash
|
|
pip install cryptography
|
|
```
|
|
|
|
## 🧑💻 Usage
|
|
|
|
Navigate to the folder and run:
|
|
|
|
```
|
|
python3 pcs-a-3-ii-terminal.py
|
|
```
|
|
|
|
You will be greeted by a prompt:
|
|
|
|
```
|
|
[PCS]
|
|
```
|
|
|
|
Command Usage:
|
|
|
|
`encrypt unencrypted_name [encrypted_name] password [use_key] [keyfile_name] [delete_original]`
|
|
|
|
`decrypt encrypted_name [unencrypted_name] password [use_key] [keyfile_name] [delete_original]`
|
|
|
|
Examples:
|
|
|
|
**`encrypt README.md README.md.p7c_enc hello!26 0 0 0`**
|
|
|
|
- Encrypts `README.md` into `README.md.p7c_enc` using password `hello!26` without using keyfiles or deleting original files
|
|
|
|
**`decrypt README.md.p7c_enc README.md hello!26 0 0 0`**
|
|
|
|
- Decrypts `README.md.p7c_enc` into `README.md` using password `hello!26` without using keyfiles or deleting original files
|
|
|
|
**`encrypt archive.zip archive.zip.p7c_enc hello!na 1 archive_key.p7c_key 1`**
|
|
|
|
- Encrypts `archive.zip` into `archive.zip.p7c_enc` with password `hello!na` and creating keyfile `archive_key.p7c_key`. Deletes the original file (`archive.zip`) after encryption.
|
|
|
|
**`decrypt archive.zip.p7c_enc archive.zip hello!na 1 archive_key.p7c_key 1`**
|
|
|
|
- Decrypts `archive.zip.p7c_enc` into `archive.zip` with password `hello!na` and using `archive_key.p7c_key` as the keyfile. Deletes `archive_zip.p7c_enc` and `archive_key.p7c_key` after decryption.
|
|
|
|
|
|
|
|
All parameters in square brackets (`[]`) are optional, but you must put something in there.
|
|
|
|
If you wish to leave them blank, please type one of `None`, `0`, `no`, `No`, `False` in their place. If you wish to set use_key or delete_original to True, please type one of `True`, `1`
|
|
- `yes`
|
|
- `Yes`
|
|
- `exists`
|
|
- `Exists`
|
|
in their place.
|
|
|
|
> [!TIP]
|
|
> Typing `help` lists all commands and their usage!
|
|
|
|
## ⁉️ FAQ
|
|
|
|
### It says file not found!
|
|
|
|
- Make sure your file is in the same directory as the script, and that you run the script from the folder it is in.
|
|
|
|
### It's so hard to use compared to the A-2-i!
|
|
|
|
- I wanted to get rid of the ambiguous prompts that were very unstandardized. If you are OK with lack of total extension and filename freedom and are ok with the quirks, go use A-2-i.
|
|
|
|
### Will you make a GUI?
|
|
|
|
- No. I might make one someday but the chances are very, very low, since I don't see the point in it. However, if you are interested and have the skills (or know how to vibe code), you can absolutely clone this and make one yourself.
|
|
|
|
## 🏅 Credits
|
|
|
|
P7MJ Original.
|
|
|
|
> [!TIP]
|
|
> Feel free to contribute! This project is FOSS.
|