https://github.com/killarexe/shift-carry-encryptor
A Simple File Encryptor/Decryptor using Shift Carry Operations with Rust
https://github.com/killarexe/shift-carry-encryptor
encryption encryption-decryption encryptor file-encryption rust
Last synced: about 1 year ago
JSON representation
A Simple File Encryptor/Decryptor using Shift Carry Operations with Rust
- Host: GitHub
- URL: https://github.com/killarexe/shift-carry-encryptor
- Owner: Killarexe
- License: mit
- Archived: true
- Created: 2023-04-29T18:22:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T17:47:08.000Z (over 2 years ago)
- Last Synced: 2025-02-14T22:46:04.495Z (over 1 year ago)
- Topics: encryption, encryption-decryption, encryptor, file-encryption, rust
- Language: Rust
- Homepage:
- Size: 3.57 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shift Carry File Encryptor/Decryptor
I Know this is maybe a stupid idea but i made a encryptor that do shift carry operations on every bytes on the file.
## Usage:
| Input | Direction | Nb of iterations | Output file *(optional)* | Inverse output *(optional, ***false by default***)* |
|-------|-----------|------------------|--------------------------|-----------------------------------------------------|
|**File path** or **String value**| *"left"* or *"right"* | 1-7 | A file path | *"true"* or "false" |
**Warning:**
*If `output_file` is not set then if the input is a file path then it replace it and if it's a string input then it just output it in the console...*
## Tip:
If you want to decrypt a file you need to do the inverse operations to encrypt _(logic)_
Ex:
To encrypt...:
`shift_carry_encryptor foo.txt left 2 bar.txt`
To decrypt...:
`shift_carry_encryptor bar.txt right 2 foo.txt`
## How it works
The **S**hift **C**arry **E**ncryptor*(SCE in short)* have 2 steps of bit manipulation per bytes in the input:
1. Invert the byte **If `Inverse Output` is set to `true` in the arguments!** *(e.g: `0110` -> `1001`)*
2. Shift Carry depending in the direction given *(e.g: Shift carry left 1 -> `1001` -> `0011` | Shift carry right 1 -> `1101` -> `1110`)*