https://github.com/harbingeroffire/res
RES: Randomized Encryption Standard
https://github.com/harbingeroffire/res
Last synced: 3 months ago
JSON representation
RES: Randomized Encryption Standard
- Host: GitHub
- URL: https://github.com/harbingeroffire/res
- Owner: HarbingerOfFire
- License: mit
- Created: 2024-02-09T02:33:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-12T01:50:11.000Z (over 1 year ago)
- Last Synced: 2025-01-13T06:44:24.312Z (4 months ago)
- Language: Python
- Homepage: https://pypi.org/project/REScrypt/
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RES: Randomized Encryption Standard
[](https://opensource.org/licenses/MIT)
## Description
RES is a simple symmetric key encryption algorithm designed to encrypt using randomization. It uses a [hashing algorithm](https://github.com/harbingeroffire/SXH) to generate random numbers from the input key. Then it goes through 3 stages of ciphers before before using key block encryption. This algorithm uses 128, 256, and 512 char blocksizes
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Other Notes](#other-notes)
- [Examples](#examples)
- [License](#license)## Installation
This code is available on PyPI under the name `REScrypt`:
```bash
pip install REScrypt
```## USAGE
Example For encrypting and decrypting using RES:
```python
import REScipher=RES.Cipher("RES-128", b"key")
ciphertext=cipher.encrypt(b"buffer")
plaintext=cipher.decrypt(ciphertext)print("Encrypted: ",ciphertext)
print("Decrypted: ",plaintext)
```## Other Notes
The code also has a built in function to encrypt and decrypt files using `fencrypt()` and `fdecrypt()` as well as outputing the encryption in hexadecimal using `hencrypt()` and `hdecrypt()`. Conviently I also combined them to encrypt and decrypt files with hexadecimal with `hfencrypt()` and `hfdecrypt()`.## License
[MIT License](https://opensource.org/license/mit/), you all know what that is.