Skip to main content

Scytale cipher algorithm cli tool

Project description

Scytale

Just a very simple python script to calculate the scytale-cipher through an cli-wizard.

The projects main purpose is to showcase interesting tooling to build, publish and develop python apps.

Code Status

CI codecov

Code documentation: https://scytale.readthedocs.io

Description

The scytale was used more than 2500 years ago by the Spartans, and is one example of ancient cryptography. A message gets written on a ribbon which is then wrapped around a stick with a certain diameter (the scytale).

Below is a sample encryption of the plain text "prove me wrong!" with a scytale of diameter 3. We write the message around the scytale, and then

|p|r|o|
 - - -
|v|e| |
 - - -
|m|e| |
 - - -
|w|r|o|
 - - -
|n|g|!|

The cipher text is obtained by reading from top to bottom, left to right. In this example, the cipher text is

pvmwnreergo  o!

Setup

Using Nix

To follow this path at least Nix has to be installed (and flakes have to be enabled).

  • nix develop will drop you into a shell containing everything to further hack on the project. Inside the devShell invoking scytale should bring up a prompt.

  • nix run will run the default app of the flake file.

  • nix build will build the default package with the help of poetry2nix

  • default.nix is included to build the package the non-flake way with nix-build.

  • shell.nix contains instructions to provide a non-flake shell via nix-shell.

Without Nix

At least Poetry needs to be installed.

  • poetry run scytale will activate the poetry environment and execute the script held in pyproject.toml. If errors are occurring poetry install (installs the virtual environment and all given requirements)

  • poetry shell (activates and enters the virtual environment)

  • poetry run python -m unittest discover (runs all tests). Alternatively poetry run python -m pytest tests to use pytest for test execution.

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

scytale_cipher-0.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

scytale_cipher-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file scytale_cipher-0.1.2.tar.gz.

File metadata

  • Download URL: scytale_cipher-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.9 Linux/5.15.0-1024-azure

File hashes

Hashes for scytale_cipher-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7a180fa19319a01516ad08a2b41fb71190b49fbe83b6ae363d9abcdef9f69dfa
MD5 8baad1edebc0008ebf716528f2cdad53
BLAKE2b-256 f06b4b81e37f02953007a18a017b94cb76eeeaec35164d2a8b24514267e27aaa

See more details on using hashes here.

File details

Details for the file scytale_cipher-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: scytale_cipher-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.9 Linux/5.15.0-1024-azure

File hashes

Hashes for scytale_cipher-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 327d35e4cb43577eb6997df5c1c20c07035b61e9b9876d197908d8b5946d3938
MD5 3aebab01aa46ce2f2a20a6eed6fb8b35
BLAKE2b-256 cdc374bf232dd40b3e092f3e5b326684c51d86e30cfc3ab17632be9ca1c4e149

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page