Skip to main content

Encryption/decryption tool

Project description

DualKey - Encryption/Decryption Tool

DualKey License

DualKey is a simple command-line tool for encrypting and decrypting sensitive text using a user-defined encryption key and offset.


Features

  • ✅ Encrypts text using a custom encryption key and offset
  • ✅ Decrypts encrypted text back to its original form
  • ✅ Simple command-line interface with input validation
  • ✅ ANSI color formatting for better readability
  • ✅ Cross-platform support (Linux, macOS, Windows)

Installation

Using Python (Recommended)

Ensure you have Python 3.11+ installed, then install the tool using pip:

pip install dualkey

Using Homebrew

brew install dualkey

Usage

  1. Running the tool After installation, run the following command:
dualkey

You will be prompted to enter an encryption key and offset.

1. Encryption Example

Enter encryption key (4-digit number): 1234
Enter offset value (4 to 6 digit number): 56789
Do you want to (E)ncrypt or (D)ecrypt? e
Enter text to encrypt (max 300 characters): hello world

Output:

Encrypted Text: 71547 67845 76483 76483 80185 -17301 90057 80185 83887 76483 66611

2. Decryption Example

Enter encryption key (4-digit number): 1234
Enter offset value (4 to 6 digit number): 56789
Do you want to (E)ncrypt or (D)ecrypt? d
Enter the encrypted text to decrypt: 71547 67845 76483 76483 80185 -17301 90057 

Output:

Decrypted Text: hello world

3. How It Works

The tool uses a simple formula to encrypt each character of the input:

Encrypted character = (ASCII value * key) - offset

To decrypt, it reverses the formula:

Original ASCII = (Encrypted value + offset) // key

Example Use Cases

  • Higher security when sending or storing sensitive content digitally
  • Encrypting personal notes
  • Quick encryption for sensitive data on the go
  • Security Notice

⚠ This tool does not provide cryptographic security. It is a simple educational utility and should not be used for high-security applications. Always rely on industry-standard encryption methods for sensitive data.

Development

Clone the repository

git clone https://github.com/ilovespectra/dual.key.git
cd dualkey

Install dependencies

pip install -r requirements.txt

Run the tool locally

python dualkey.py

Contributing

Contributions are welcome! To contribute:

  • Fork the repository
  • Create a feature branch (git checkout -b feature-name)
  • Commit your changes (git commit -m 'Add feature')
  • Push to your branch (git push origin feature-name)
  • Create a Pull Request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions, suggestions, or issues, feel free to open an issue on GitHub or reach out via email:

📧 denverhnt@gmail.com
🐙 GitHub: @ilovespectra

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dualkey-1.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dualkey-1.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file dualkey-1.1.1.tar.gz.

File metadata

  • Download URL: dualkey-1.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for dualkey-1.1.1.tar.gz
Algorithm Hash digest
SHA256 5bd17f2335503492aa40918f74207c4ca51b639eeb86d1f29a2fee33aea19abc
MD5 95da4df5789283810e60eb9fcf7f8ef9
BLAKE2b-256 460bc15966773e99856c07fb1a2f80f9472abf3d3507fbb0c004fd664f632732

See more details on using hashes here.

File details

Details for the file dualkey-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: dualkey-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for dualkey-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e141c69624c97be47d135e334c74e05215179b0e23f66550904d001b1eba867e
MD5 98d1f5c70404f1ae2be9443a101cb1bb
BLAKE2b-256 65b02ff7fb4ec1c93d0c6f0c98aab76f6f76044821b8d222b06f2a1f2d37a712

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page