Skip to main content

SHEP64 and SHEP72 key generation, encryption, signing, and CLI tooling

Project description

shep32

shep32 packages the SHEP64 and SHEP72 tooling into a PyPI-friendly layout with both a Python API and a console CLI.

What it includes

  • SHEP64 primary key generation
  • SHEP72 extended key generation
  • Text and file encryption/decryption to .sh32
  • Detached body/meta encryption mode
  • Ed25519 public key derivation, signing, and verification
  • Range generation and benchmark commands
  • Interactive CLI mode

Install

pip install shep32

For local development:

pip install -e .

CLI entry points

After installation, both of these commands work:

shep32 --help
shep --help

Open the interactive menu:

shep32 start

Common commands

Generate a fresh random key:

shep32 key

Generate a deterministic key from text:

shep32 hash --text "hello"

Generate a deterministic key from an integer:

shep32 hash --value 12345

Generate an extended SHEP72 key:

shep32 hash --mode 1 --text "hello"

Generate a range:

shep32 range --start 0 --hashes 10

Encrypt text:

shep32 enc --text "secret" --out secret.sh32

Encrypt a file:

shep32 enc --file ./notes.txt

Decrypt a token file with a key file:

shep32 dec --file ./notes.sh32 --keyfile ./notes.pkey

Derive a public key:

shep32 pubkey --keyfile ./notes.pkey

Sign text:

shep32 sign --text "message" --keyfile ./notes.pkey

Verify a signature:

shep32 verify --text "message" --signature <signature> --public-key <publicKey>

Run a benchmark:

shep32 bench --hashes 1000 --compare

Python API

from shep32 import generateKey, encryptData, decryptData, signData, verifySignature

key = generateKey("hello", mode = 0)
cipher, usedKey = encryptData("secret", key)
plain = decryptData(cipher, usedKey)

sig = signData("message", usedKey)
ok = verifySignature("message", sig["signature"], sig["publicKey"])

License

MIT License: https://github.com/andylehti/SHEP32/blob/main/LICENSE

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

shep32-2.60.4.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

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

shep32-2.60.4-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file shep32-2.60.4.tar.gz.

File metadata

  • Download URL: shep32-2.60.4.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for shep32-2.60.4.tar.gz
Algorithm Hash digest
SHA256 8aec75b19fc64736a59e45a03e917f08cb0802837cf91f8fba26f8846ab5beca
MD5 9630fa3c944c654efc8cdb3592ea6bd2
BLAKE2b-256 b6d5702e6263d0d2f4a1421de8511b9970916ab194e864d7f8db2c0f935070cd

See more details on using hashes here.

File details

Details for the file shep32-2.60.4-py3-none-any.whl.

File metadata

  • Download URL: shep32-2.60.4-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for shep32-2.60.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f4502c30ac8995606f8c74297b6b8a8ae7b532636e2cb358c479f3a932e6e081
MD5 416fe0db0383a8174f9906220308575b
BLAKE2b-256 c8b9d6e8d9a08ad3bc9a9071e574d4e906436198221d140d9bf0bc898e2597aa

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