Skip to main content

An improved encryption and decryption tool from the Polybius Square.

Project description

Polybius square cipher Pro

Polybius square cipher, also known as chess-board cipher, has the advantage of being simple to understand, but the disadvantage is that the encryption strength is low and it is easy to crack.

Therefore, chessboard ciphers are usually used for some simple encryption scenarios, and are not suitable for situations with high security requirements.

In order to improve its encryption strength, the author made the following improvements:

  1. Key strengthening, the original 5×5 square matrix to 9×9

  2. Insert new random numbers into the encrypted password for interference to prevent the same plaintext from being cracked by word frequency analysis.

  3. Shift encryption, add a random digit from 0 to 9 to the head, and add a number of encrypted ciphertext length and a check code to the tail.

  4. Reverse scrambles, decrypts the newly generated password with the key in reverse order to obtain garbled code

Get start

import polybius_square_pro as psp



inputwords = '...'  # The word you want to encode.



ciphertext = psp.Core.encode(inputwords)

print(ciphertext)



plaintext = psp.Core.decode(ciphertext)

print(plaintext)



# Check

print(inputwords == plaintext)  # True

Feature

  1. The same plaintext output ciphertext is different

  2. Decrypt the text immediately after encryption for easy verification

  3. Pure string replacement interpretation, small calculation and high accuracy

  4. The output ciphertext is highly complex and about twice as long as the plaintext

  5. The key can be customized and there are many kinds of the same character 81! Combination mode

  6. Input plaintext length up to 1000+ characters (more parameters can be used, but not recommended)

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

polybius_square_pro-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: polybius_square_pro-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for polybius_square_pro-1.0.0.tar.gz
Algorithm Hash digest
SHA256 30741ef5e74c95d00615ee6f54b7323f9d05efbceb4ef8a8aa99becab09c0b82
MD5 5c1efa0f8d9dc2088a17c6c4c1e10f19
BLAKE2b-256 ce371b1ca3f6061d4e64c11906468ba9f9ebfbe6b53fcf04296e6380c0293f80

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