Skip to main content

Hikari Advanced Secure Helix Integration (HASHI) & Variable Helix Encryption (VHE)

Project description

PyHashi: Genomic-Inspired Cryptography Suite

PyHashi is an advanced, high-entropy cryptographic framework designed for secure data transformation and key exchange. The suite utilizes a unique genomic-inspired algorithmic approach combined with state-of-the-art Elliptic Curve Cryptography to provide robust data confidentiality, integrity verification, and secure asynchronous communication.

PyHashi is architected to operate efficiently on Linux-based environments, including Android (via Termux) and Windows Subsystem for Linux (WSL).

For comprehensive technical analysis, whitepapers, and benchmarks, please refer to the official documentation provided by Collepedia Media Agency, a subsidiary of Nanosoft Technologies Agency: www.collepedia.qzz.io/news/hashi

Core Modules

  1. HASHI (Hikari Advanced Secure Helix Integration): A dynamic, variable symmetric encryption engine leveraging ARX (Add-Rotate-XOR) operations combined with a dynamic S-Box driven by genomic sequences (DNA) and a passphrase.
  2. VHE (Variable Helix Encryption): A hybrid asymmetric cryptographic system based on X25519 Elliptic Curves and Ephemeral Diffie-Hellman. It provides both Key Exchange Mechanisms (KEM) and direct Asymmetric Encryption (ECIES).

Prerequisites

PyHashi requires system-level cryptographic primitives to function optimally. Ensure the following dependencies are installed on your Linux-based system:

apt update && apt install libssl-dev libargon2-dev

Installation

Install the package using standard Python distribution methods:

pip install PyHashi

1. HASHI: Symmetric Encryption Usage

PyHashi provides a straightforward interface for standard symmetric data encryption and decryption, utilizing a user-defined key and a genomic-sequence-based bias (DNA).

Initializing and Encrypting

from hashi import Hashi, to_hex

# Initialize with a key and DNA sequence
cipher = Hashi(key="your-secret-key", dna="ATGC...")

# Encrypting data
encrypted_data = cipher.encrypt("Data to be secured")
print(f"Ciphertext (Hex): {to_hex(encrypted_data)}")

Decrypting and Vault Management

# Decrypting data
decrypted_data = cipher.decrypt(encrypted_data)
print(f"Decrypted: {decrypted_data.decode('utf-8')}")

# Storing credentials securely in a local JSON vault
cipher.save_vault("hashi_vault.json")

# Loading credentials directly from the vault
cipher_from_vault = Hashi.from_vault("hashi_vault.json")

2. VHE: Asymmetric Encryption & Key Exchange

The VHE module handles public/private key pairs, allowing secure communication between parties without pre-sharing passwords.

Generating VHE Keypairs

from hashi import VHE, to_hex

vhe = VHE()

# Generate keys for Alice and Bob
alice_keys = vhe.getKeys()
bob_keys = vhe.getKeys()

print(f"Bob's Public Key: {to_hex(bob_keys.public)}")

Scenario A: Secure Key Exchange (Deriving HASHI Credentials)

Used when two parties want to establish a secure shared state over an insecure channel.

# Alice uses Bob's Public Key and her Private Key to compute the shared secret
alice_creds = vhe.getHashiCredentials(peer_pub=bob_keys.public, my_priv=alice_keys.private)

print(f"Derived Shared DNA: {alice_creds.DNA}")
print(f"Derived Shared Passphrase: {alice_creds.passphrase}")

# The derived credentials can now be securely plugged directly into HASHI
secure_session = Hashi(key=alice_creds.passphrase, dna=alice_creds.DNA)

Scenario B: Asymmetric Encryption (ECIES)

Used to encrypt a message directly using the receiver's Public Key. The receiver can decrypt it even if they were offline during transmission.

message = "Top Secret: Operation Kurohane"

# Alice encrypts the message for Bob using ONLY his Public Key
encrypted_payload = vhe.encrypt(receiver_pub=bob_keys.public, plaintext=message)

print(f"Ephemeral Public Key: {to_hex(encrypted_payload.ephemeral_public)}")
print(f"Ciphertext + MAC: {to_hex(encrypted_payload.ciphertext)}")

# Bob decrypts the message using his Private Key and the received Ephemeral Key
decrypted_msg = vhe.decrypt(
    my_priv=bob_keys.private, 
    ephemeral_pub=encrypted_payload.ephemeral_public, 
    ciphertext=encrypted_payload.ciphertext
)

print(f"Bob reads: {decrypted_msg.decode('utf-8')}")

Command Line Interface (CLI)

PyHashi includes a built-in CLI utility for rapid file-based cryptographic operations.

1. Generating Credentials

Generates a random high-entropy key and a biologically valid DNA sequence.

hashi gen

2. Encrypting a File

hashi enc -k "your-secret-key" -d "ATGC..." -i plaintext.txt -o encrypted.bin

3. Decrypting a File

hashi dec -k "your-secret-key" -d "ATGC..." -i encrypted.bin -o decrypted.txt

Technical Specifications

The implementation relies on an underlying architectural state containing multiple internal registers:

  • HASHI Core State: A 16-element dynamic state vector updated via complex ARX operations.
  • Dynamic S-Box: A deterministic substitution box seeded by Argon2 KDF and HMAC.
  • Genomic Entropy: A 32-byte biological sequence (dna_bias) providing continuous mutation to the transformation process.
  • VHE Curve: Utilizes the highly secure X25519 curve for Elliptic-Curve Diffie-Hellman (ECDH) operations.
  • Authentication: Built-in Encrypt-then-MAC architecture ensuring perfect ciphertext integrity.

Compatibility Notice

  • Supported Systems: Linux, Termux (Android), WSL.
  • MacOS Support: Planned for upcoming release cycles.
  • Windows: Not natively supported (WSL is strongly recommended for Windows environments).

PyHashi is developed and maintained by Nanosoft Technologies Agency. All technical auditing and cryptographic reviews are conducted by Collepedia Media Agency.

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

pyhashi-1.2.0.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

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

pyhashi-1.2.0-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file pyhashi-1.2.0.tar.gz.

File metadata

  • Download URL: pyhashi-1.2.0.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pyhashi-1.2.0.tar.gz
Algorithm Hash digest
SHA256 df18d629912c90894a2500c093bbd054f4aebb9a4876ae763e2eca3b791334ef
MD5 836a27a3d475a0b5aa9cac0b7c41a652
BLAKE2b-256 8f0d898041ec0f299d74bb4eed398aa0cc538d1eb147c509de0c44373ff85dbd

See more details on using hashes here.

File details

Details for the file pyhashi-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyhashi-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pyhashi-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5b09f3f9b4211b91d70a33fccf99a18e0ceb69ce086d293d209adab88d6bee1
MD5 1915eb6fb1a3c66e8ec87e2de3e5b209
BLAKE2b-256 76b33b45726716a18bac882021b4e79a7296546accf9a9f72e9bda18f531cb89

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