Skip to main content

Cryptography tool based on RSA and AES

Project description

NyxCrypta

Version Python License

NyxCrypta is a Python cryptography library that combines asymmetric RSA encryption and symmetric AES encryption to secure your data efficiently and easily.

Features

  • 🔒 Hybrid encryption: Combines AES-256 and RSA (2048 to 4096 bits)
  • 🎯 Configurable security levels: Standard, High, and Paranoid
  • 🔑 Key management: Simple generation and use of RSA key pairs
  • 📚 Intuitive command-line interface
  • 🛡️ Proactive security: integrated file and permissions checks

Installation

pip install NyxCrypta

Quick guide

1. Key generation

nyxcrypta keygen -o ./keys -p "my_strong_password"

This command generates a pair of RSA keys and saves them in the specified folder.

2. File encryption

nyxcrypta encrypt -i secret.txt -o encrypted.nyx -k ./keys/public_key.pem

3. File decryption

nyxcrypta decrypt -i encrypted.nyx -o decrypted.txt -k ./keys/private_key.pem -p "my_strong_password"

4. Data encryption

nyxcrypta encryptdata -d "my data" -k ./keys/public_key.pem

5. Data decryption

nyxcrypta decryptdata -d "006bd6203029" -k ./keys/private_key.pem -p "my_stong_password"

Security levels

NyxCrypta offers three levels of security:

  1. STANDARD (default) :

    • RSA 2048 bits
    • SHA-256 for OAEP padding
  2. HIGH :

    • RSA 3072 bits
    • SHA-256 for OAEP padding
  3. PARANOID:

    • RSA 4096 bits
    • SHA-256 for OAEP padding

The security level is selected via the --securitylevel option:

nyxcrypta --securitylevel 2 encrypt -i secret.txt -o encrypted.nyx -k ./keys/public_key.pem

Technical implementation

  • Use of AES-256 in CBC mode for symmetrical encryption
  • AES key encryption with RSA-OAEP
  • Secure generation of IV (Initialization Vector) for each operation
  • Automatic data padding management

Best security practices

  1. Key management :

    • Store private keys securely
    • Limit access to key files
  2. File selection:

    • Always check input and output file paths
    • Make sure you have the necessary permissions
  3. Security level :

    • The STANDARD level is sufficient for most uses.
    • Use higher levels for specific needs

Python example

from nyxcrypta import NyxCrypta, SecurityLevel

# initialization
nx = NyxCrypta(SecurityLevel.HIGH)
password = "my_strong_password"

# Keys generation
nx.save_keys("./keys", password)

# Encryption & Decryption
nx.encrypt_file("secret.txt", "encrypted.nyx", "./keys/public_key.pem")
nx.decrypt_file("encrypted.nyx", "decrypted.txt", "./keys/private_key.pem", password)
nx.encrypt_data("données secrètes".encode("utf-8"), "./keys/public_key.pem")
nx.decrypt_data(bytes.fromhex("023gna5donnéescryptées"), "./keys/private_key.pem", password)

Dependencies

  • cryptography>=3.3.2
  • argon2-cffi>=20.1.0
  • cffi>=1.0.0

License

NyxCrypta is distributed under the MIT license. See the LICENSE file for more details.

Authors

Division of Cyber Anarchy (DCA)

Contact : malic1tus@proton.me nyxcrypta@proton.me calypt0sis@proton.me viral0x@proton.me

Github : https://github.com/Division-of-Cyber-Anarchy/


Simplicity is the ultimate sophistication. - Leonardo da Vinci

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

nyxcrypta-1.3.3.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

nyxcrypta-1.3.3-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file nyxcrypta-1.3.3.tar.gz.

File metadata

  • Download URL: nyxcrypta-1.3.3.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for nyxcrypta-1.3.3.tar.gz
Algorithm Hash digest
SHA256 36257ee16184b9bb25229bc9d39010301120505695bbc4ebf20d38d86429e214
MD5 8c8f0c123369ae0d5b4eb92cca01704c
BLAKE2b-256 958494571a32eddd77da10383e621182c62e6ff574283c8e2d0688c6d600b4ac

See more details on using hashes here.

File details

Details for the file nyxcrypta-1.3.3-py3-none-any.whl.

File metadata

  • Download URL: nyxcrypta-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for nyxcrypta-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5cf0728786ac37fb3761778f5a229bc3a32bd7e717f6b4090d3a6f04f04a1667
MD5 4c64c7a1811641c53637ef868b7df83d
BLAKE2b-256 d7579fa83ab7c29f8a9f683ec012e8b59d1dd5dbbc862b1d3b57502241c6f687

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