Skip to main content

ScoutCipher is a Python package for encrypting and decrypting messages using different encryption methods using scout codes.

Project description

⚜ Scout Cipher ⚜

License: MIT Python Version

About Scout Cipher ⛺ 🌙 🎒 🔦

In “Scout” part of the scouting technique is to decrypt and encrypt messages, usually used in a game called “Mafeking Siege” or “Treasure hunt”.

In addition to Morse code, there are other codes in this library that are quite curious.

Cheer up and contribute more of your scout group's codes!

Handshake with left hand!

Be ready ⚜️

Features 🗝️

  • 6+ Cipher Methods: Morse, Keyword, Reverse and more.
  • Simple API: Intuitive classes for each cipher (Morse(), Murcielago(), etc.).
  • MIT Licensed: Free for personal and commercial use.

Installation 💻

pip install ScoutCipher

Usage 🚀

Morse code encryption:

Common Morse code where each letter is separated by / and words by //.

from ScoutCipher import MorseCipher

cipher = MorseCipher()
encrypted_message = cipher.encrypt("Be ready") # Output: "-..././/.-././.-/-../-.--"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Be ready"

Reverse encryption:

Just read each word backwards:

Example: “Be ready” using the code would be “eb ydaer”.

from ScoutCipher import ReverseCipher

cipher = ReverseCipher()
encrypted_message = cipher.encrypt("Scout") # Output: "tuocs"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"

Keyword encryption:

We write the normal alphabet, and under it we write the keyword alphabet.

The key alphabet starts with the keyword without repeating letters
and then we write the normal alphabet omitting the letters of the keyword.

Example with the word “Batman” as the keyword:

Then, each letter of the normal alphabet corresponds to the letter of the coded alphabet below it.

Normal Alphabet: A B C D E F G H I J K L M N Ñ O P Q R S T U V W X Y Z
Code Alphabet:   B A T M N C D E F G H I J K L Ñ O P Q R S U V W X Y Z
from ScoutCipher import KeywordCipher

cipher = KeywordCipher("batman")
encrypted_message = cipher.encrypt("Scout")# Output: "RTÑUS"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"

Inverted alphabet encryption

In this key, each letter of the key is translated by another letter, like this:

A FOR Z
B FOR Y
C FOR X

And so on.
Example:

A B C D E F G H I J K L M N Ñ O P Q R S T U V W X Y Z
Z Y X W V U T S R Q P O Ñ N M L K J I H G F E D C B A
from ScoutCipher import BackwardCipher

cipher = BackwardCipher()
encrypted_message = cipher.encrypt("Scout") # Output: "Hxlfg"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"

Grid encryption

The grid is a 3x3 matrix of letters, and each letter is assigned a code based on its position in the matrix ("row-column" format).

It is a mostly visual code where a table is used to encrypt or decrypt the code.

       ║       ║
 A B C ║ D E F ║ G H I
═══════╬═══════╬═══════
 J K L ║ M N Ñ ║ O P Q
═══════╬═══════╬═══════
 R S T ║ U V W ║ X Y Z
       ║       ║

Example: S is 3 in the row and 2 in the column

from ScoutCipher import GridCipher

cipher = GridCipher()
encrypted_message = cipher.encrypt("Scout") # Output: "32 13 27 34 33"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"

Murcielago encryption

The word bat (“Murcielago” in Spanish) is used where each letter of the word is assigned a number.

The rest of the letters remain the same

M u r c i e l a g o  
0 1 2 3 4 5 6 7 8 9
from ScoutCipher import MurcielagoCipher

cipher = MurcielagoCipher()
encrypted_message = cipher.encrypt("Scout") # Ouput: "s391t"
descrypted_message = cipher.decrypt(encrypted_message) # Output: "Scout"

Contributing 🤝

We welcome contributions to ScoutCipher! If you want to add more ciphers, fix bugs, or improve documentation, feel free to fork the repository and submit a pull request.

  1. Fork the project.
  2. Create a branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -am 'Add new cipher').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License 📜

This project is licensed under the MIT license. See the LICENSE file for more details.

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

scoutcipher-0.2.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

ScoutCipher-0.2.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file scoutcipher-0.2.0.tar.gz.

File metadata

  • Download URL: scoutcipher-0.2.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for scoutcipher-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9374caafd8cda1d98a1d945791c56e4469558aeeee3c8c64a48b4b482c1ac236
MD5 a6e7d51e0b32e644c1ae4ef0b9cb2b41
BLAKE2b-256 f037e92592b97a7e1fddcc0e981a2fb1a9cecaa26a6be82342417bcd0080744e

See more details on using hashes here.

File details

Details for the file ScoutCipher-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ScoutCipher-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for ScoutCipher-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e020a2a20a214a0b8f21d37cd863fa8caa555ef640f3e64cddca9a856069e8a
MD5 d6c204be5fab3d2aeccd597ce030f7a4
BLAKE2b-256 61d2d16e8d539bcba5884a31ddc21f4dc13ee3a510dced480d63cb65c6b97937

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