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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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