PolyCrypt Encryption

© Francisco Ruiz, 2026

About PolyCrypt

PolyCrypt is the "Human Mode" encryption suite featured in Privacy Bar, PassLok, URSA, and KyberLock. It serves as both a secure field cipher and a cryptographic sandbox, allowing users to experiment with manual substitution, transposition, and mathematical additions/subtractions used throughout history.

The 6-Key Architecture

The Encryption Workflow

  1. Entropy Concentration: Keys 1-4 are compressed to ensure maximum security per character.
  2. Keystream Generation: A pseudo-random stream is produced using a lagged Fibonacci generator, which automates substitutions through the Tabula Recta.
  3. Plaintext Hardening: Before encryption, the plaintext is processed with an optional space-preservation "trick" and an optional random "cut" with reversal.
  4. Synthesis & Decryption: The message and keystream are combined to produce ciphertext. Decryption reverses the process by reconstructing the keystream from the seed and undoing the plaintext formatting tricks.

PolyCrypt Manual Instructions

Phase 1: Key Compression (Keys 1-4)

Phase 2: Scrambling the Alphabets (Headers)

Phase 3: Text Preparation (Optional)

Phase 4: Initializing the Work Table (The Seed)

Create a table with 3 rows. The first step is to generate the Seed in Row 1.

  1. Generate the Seed: Combine your Nonce and Key 5 to find the starting letters of Row 1:
    • Find the Nonce letter on Alpha 2 (Left).
    • Move horizontally to the Key 5 letter.
    • Read the resulting Seed letter at the Top (Alpha 1) and write it in Row 1.
  2. Fill Row 1: Write your Plaintext (or Ciphertext) immediately to the right of the Seed in Row 1.
  3. Start Row 2: Write Key 5 at the beginning of Row 2 (directly below the Seed).

Phase 5: Extending the Keystream

Fill the remainder of Row 2 to complete the keystream.

  1. Interval: Calculate the tap distance using the formula: Interval = (seedLength - 1) / (numLetters - 1)
  2. The "Taps": To create a new letter for Row 2, select numLetters from the existing keystream (starting from the Row 1 Seed, then moving into Row 2). These letters must be separated by the Interval distance.
  3. The Lookup: Find the first "tap" letter on the Extreme Top (Alpha 3). Move through the Tabula Recta to find the second "tap," then the third, until all taps are visited.
  4. The Result: Read the final result on the Alpha 4 (Right or Bottom) and write it in the next Row 2 slot.

Phase 6: Encryption & Decryption Lookups

If numLetters is 2, use a simple pair lookup. For higher numbers, use a Serpentine movement through the Tabula Recta.

Phase 7: Transposition & Post-Processing

Tabula Recta

The Tabula Recta grid serves as the core engine for both key preparation and message processing.


  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  
---------------------------------------------------
A | 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 | A
B | 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 A | B
C | C D E F G H I J K L M N O P Q R S T U V W X Y Z A B | C
D | D E F G H I J K L M N O P Q R S T U V W X Y Z A B C | D
E | E F G H I J K L M N O P Q R S T U V W X Y Z A B C D | E
F | F G H I J K L M N O P Q R S T U V W X Y Z A B C D E | F
G | G H I J K L M N O P Q R S T U V W X Y Z A B C D E F | G
H | H I J K L M N O P Q R S T U V W X Y Z A B C D E F G | H
I | I J K L M N O P Q R S T U V W X Y Z A B C D E F G H | I
J | J K L M N O P Q R S T U V W X Y Z A B C D E F G H I | J
K | K L M N O P Q R S T U V W X Y Z A B C D E F G H I J | K
L | L M N O P Q R S T U V W X Y Z A B C D E F G H I J K | L
M | M N O P Q R S T U V W X Y Z A B C D E F G H I J K L | M
N | N O P Q R S T U V W X Y Z A B C D E F G H I J K L M | N
O | O P Q R S T U V W X Y Z A B C D E F G H I J K L M N | O
P | P Q R S T U V W X Y Z A B C D E F G H I J K L M N O | P
Q | Q R S T U V W X Y Z A B C D E F G H I J K L M N O P | Q
R | R S T U V W X Y Z A B C D E F G H I J K L M N O P Q | R
S | S T U V W X Y Z A B C D E F G H I J K L M N O P Q R | S
T | T U V W X Y Z A B C D E F G H I J K L M N O P Q R S | T
U | U V W X Y Z A B C D E F G H I J K L M N O P Q R S T | U
V | V W X Y Z A B C D E F G H I J K L M N O P Q R S T U | V
W | W X Y Z A B C D E F G H I J K L M N O P Q R S T U V | W
X | X Y Z 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 | Y Z 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 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
---------------------------------------------------
  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  

Step 1. Tabula preparation

The straight alphabet is used if a box is left empty for keys 1 through 4.

Key 1 (top substitution)

Key 2 (left substitution)

Key 3 (top of top substitution)

Key 4 (right and bottom substitution)

Key 5 & Seeding Options

Key 5 serves as the foundation for your keystream. If this field is left blank, the system defaults to using Key 1.

Key 5 (seed)

 Use Key 5 as Seed     Use Key 5 as Mask for Random Seed     Use Nonce

Nonce/Seed

If you are using a nonce or seed, enter it here, or click the button to make a random one. Seeds should be random always, but nonces only need to be different across messages.

 

Key 6 (transposition)

Phase 1: Key Compression & Mixed Alphabets

This initial step prepares Keys 1–4 by concentrating their entropy into 25-letter strings.

Compressed Key 1 -> Mixed Alphabet 1

Compressed Key 2 -> Mixed Alphabet 2

Compressed Key 3 -> Mixed Alphabet 3

Compressed Key 4 -> Mixed Alphabet 4

Alphabet Generation & Placement

Compressed keys are transformed into Scrambled Alphabets to serve as unique Tabula Recta headers.

Scrambling Logic

  1. Unique Sequence: Write the letters of the compressed key in the order they appear.
  2. Duplicate Handling: If a letter is already used, replace it with the first available letter preceding it in the standard alphabet (wrapping from A to Z if necessary).
  3. Final Fill: Complete the alphabet by writing all remaining unused letters in reverse alphabetical order.

Tabula Recta Placement

Operation Settings

     Encrypt     Decrypt

Letters used to make keystream:  

 

Step 2. Plaintext preparation

Plaintext / Ciphertext

 Do cut    Preserve spaces

Text Processing & Hardening

Before the main encryption or decryption occurs, the text can be processed to obscure its structure and linguistic patterns.

Encryption: Optional Hardening

Decryption: Preliminary Steps

Processed Plaintext / Ciphertext

 

Step 3. Encryption / Decryption

In order to obtain the ciphertext we generate the table below, following the instructions at the top of this page. The top row is the input, the middle row the keystream, the bottom row the output.

Work table

Information about output randomness will appear here

 

Step 4. Encrypted Ciphertext / Decrypted Plaintext

Transposition & Final Recovery

If Key 6 is provided, a final layer of security is applied through a columnar transposition, followed by specific recovery steps during decryption.

Key 6: Columnar Transposition

  1. Generate Permutation: Write Key 6 and assign a numerical order to its letters based on the alphabet (e.g., A=1, B=2). If letters are repeated, assign numbers from right to left.
  2. The Grid: Write the ciphertext in rows of the same length as Key 6.
  3. Readout:
    • Alphabetical Key: Read the letters out column-by-column in the order of the numbers assigned ($1, 2, 3 \dots$).
    • Numeric Key: If Key 6 is a number, simply write the text in rows of that length and read out columns from left to right.
  4. Formatting: The final output is split into five-letter codegroups for standard transmission.

Decryption: Restoring the Plaintext

Raw Ciphertext / Plaintext

Formatted Output

 

Bonus: error correction

Manual encryption is prone to human error. While some mistakes—such as errors in key compression or transposition—are difficult to recover from, PolyCrypt includes tools to help identify and fix common keystream errors during decryption.

Types of Errors

Using the Correction Tools

To fix a cascading keystream error during decryption, follow these steps:

  1. Identify the Spot: In the Formatted Output box, click or select the first character that appears to be incorrect.
  2. Cycle Values (Next): Click the Next button. This intentionally adds a value (1-26) to the keystream at that position. Continue clicking until the decrypted text immediately following that spot becomes readable.
  3. Commit Progress (Save): Once the text is fixed, click Save to lock in that correction. If more gibberish appears further down, repeat the process from Step 1.
  4. Undo (Back): If you cannot fix the text after trying all 26 values, the error likely occurred earlier in the message. Click Back to remove the last saved correction and try again from a different starting point.

The Error Display Box at the bottom tracks the specific adjustments being applied to your session.