Skip to main content

Production-grade NCR3 encryption tool — encrypt, decrypt, and verify files from any terminal.

Project description

ncr-cipher

Production-grade NCR3 encryption tool — a single ncr command available everywhere in the terminal after installation, on Windows, macOS, and Linux.

Installation

pip install ncr-cipher

Or install from source:

pip install -e .

Quick Start

# Generate a key file
ncr --keygen mykey.key

# Encrypt a file
ncr --lock secret.txt --key mykey.key

# Decrypt a file
ncr --unlock secret.txt.ncr3 --key mykey.key

# Verify integrity without decrypting
ncr --verify secret.txt.ncr3 --key mykey.key

# Show file info (no password needed)
ncr --info secret.txt.ncr3

Commands

Command Description
ncr --keygen <keyfile> Generate a new key file
ncr --lock <file> --key <k> Encrypt a file
ncr --unlock <file> --key <k> Decrypt a file
ncr --verify <file> --key <k> Check HMAC without decrypting
ncr --info <file> Show NCR version, IV, block count, file size
ncr --bench Benchmark KDF time + encrypt speed
ncr --test Run internal self-tests
ncr --version Print version

Flags

Flag Description
--out, -o <path> Output path override
--inplace, -i Overwrite the original file
--silent, -s No output except errors
--force, -f Overwrite output without confirmation
--strength <1-5> KDF strength preset (keygen only)

Cipher: NCR3

  • KDF: scrypt with configurable strength (5 presets)
  • Per-byte key mixing: BLAKE2b-derived per-position keys
  • CBC chaining: HMAC-SHA3-256 stream + ciphertext feedback
  • Authentication: HMAC-SHA3-256 over full ciphertext
  • Math core: nCr (binomial coefficient) based encryption mod 2¹²⁷−1

Backwards compatible: can read NCR2 files (read-only).

Requirements

  • Python 3.9+
  • Zero external dependencies — stdlib only

License

MIT

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

ncr_cipher-1.0.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

ncr_cipher-1.0.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file ncr_cipher-1.0.0.tar.gz.

File metadata

  • Download URL: ncr_cipher-1.0.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for ncr_cipher-1.0.0.tar.gz
Algorithm Hash digest
SHA256 08b64796745913593567cf20dff609bcdc04bc4fe409141e2a6a9fd40325e2ca
MD5 0577155d705e94846791d10cff323dec
BLAKE2b-256 80d481b6ea3dff962402bdb76940f622df0f56c4f2b519aad4fa76563c70bd1a

See more details on using hashes here.

File details

Details for the file ncr_cipher-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ncr_cipher-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for ncr_cipher-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7a6497b88cefd3deea18455ddf6290677b18fcffa02f45fb8c4e14aaa04fc27
MD5 87e8661c3ef4acd905b26124958b638f
BLAKE2b-256 ddf994659298257d06f6964d2a5c144003d689b5abea7ab85604f809fcfabffe

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