Skip to main content

⚜ 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.

Metadata

Release files for ScoutCipher 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ScoutCipher 0.2.0
File Size Uploaded
scoutcipher-0.2.0.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ScoutCipher 0.2.0
File Interpreter ABI Platform
ScoutCipher-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / scoutcipher-0.2.0.tar.gz

Download URL scoutcipher-0.2.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9374caafd8cda1d98a1d945791c56e4469558aeeee3c8c64a48b4b482c1ac236
BLAKE2b-256 checksum
How to use checksums
f037e92592b97a7e1fddcc0e981a2fb1a9cecaa26a6be82342417bcd0080744e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / ScoutCipher-0.2.0-py3-none-any.whl

Download URL ScoutCipher-0.2.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e020a2a20a214a0b8f21d37cd863fa8caa555ef640f3e64cddca9a856069e8a
BLAKE2b-256 checksum
How to use checksums
61d2d16e8d539bcba5884a31ddc21f4dc13ee3a510dced480d63cb65c6b97937
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page