Welcome to PhreakCrypt, a powerful all-in-one Python tool for cryptographic operations with a hacking edge. It supports encryption, decryption, encoding, decoding, hashing, obfuscation, and vector-based encryption for AI embeddings, making it ideal for cybersecurity enthusiasts, developers, and AI practitioners. Whether you're securing sensitive data or protecting AI embeddings for similarity searches, PhreakCrypt has you covered with a sleek, hacker-inspired interface.
- Ensure you have Python 3.7 or later installed.
- Install the required dependencies using pip:
git clone --depth 1 https://github.com/mr0erek/PhreakCrypt.git; cd PhreakCrypt; python -m venv venv; pip3 install -r requirements.txtNote
For Homomorphic Encryption (HE), you need to install PySEAL separately from Microsoft SEAL, as it requires C++ dependencies and is not included by default.
PhreakCrypt uses a command-line interface powered by argparse. Run commands in the format:
python3 pheakcrypt.py <operation> --algorithm <algorithm> --data <data> [options]
encrypt, decrypt, encode, decode, hash, obfuscate, deobfuscate, encrypt_vector, and decrypt_vector. Options vary by operation, such as --algorithm, --encoding, --shift, --key, and --data.
python3 phreakcrypt.py encrypt --algorithm aes --data "Hello, World!"Output
Encrypted: gAAAAABm... (base64-encoded string) Key: b'X9f...==' (Fernet key)
python3 phreakcrypt.py decrypt --algorithm aes --key "X9f...==" --data "gAAAAABm..."Output
Decrypted: Hello, World!
python3 phreakcrypt.py encode --encoding base64 --data "Hello, World!"Output -> Encoded: SGVsbG8sIFdvcmxkIQ==
python3 phreakcrypt.py hash --algorithm sha256 --data "Hello, World!"Output -> Hashed: dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f
Deobfuscate Caesar cipher text with a shift of 3.
python3 phreakcrypt.py obfuscate --shift 3 --data "Hello, World!"Output -> Deobfuscated: Hello, World!
6. Vector Encryption (Property-Preserving Encryption - PPE) Encrypt a vector (e.g., AI embedding) using simulated PPE, preserving relative distances.
python3 phreakcrypt.py decrypt_vector --algorithm ale --key "X9f...==" --data "gAAAAABm..."