A cryptographic system implementing a variation of the one-time pad with an expanded character set and salt insertion mechanism.
Absoluta is a symmetric encryption system that achieves perfect secrecy through a combination of large ciphertext alphabet, random salt insertion, and XOR masking. The system provides billions to hundreds of trillions of possible combinations per source character, depending on the chosen cipher alphabet.
- Seed: 32 hexadecimal characters (128 bits of entropy)
- Salt probability: 3-digit value (000-999) controlling salt insertion frequency
- Position weights: Three digits (0-3) determining salt placement probabilities
- Cipher alphabet: Unicode character set loaded from external file (supports multiple alphabets)
For each source character:
- Convert source character to its index in the source alphabet (0-94 for ASCII)
- Generate random Y value from cipher alphabet
- Determine salt presence based on probability parameter
- If salt is present:
- Select salt position using cyclic weight algorithm
- Generate random salt value
- Construct triplet [salt, X, Y] in determined order
- If no salt:
- Construct pair [X, Y]
- Convert all indices to cipher alphabet symbols
The system uses a cyclic selection algorithm with configurable weights:
- Weight 0: 0% chance
- Weight 1: 33% chance
- Weight 2: 66% chance
- Weight 3: 99% chance
Positions are checked cyclically (left -> middle -> right -> repeat) until selection occurs.
After the main encryption, an XOR mask is applied:
- Generate mask of same length as intermediate ciphertext using separate RNG seeded with key
- XOR each ciphertext symbol index with corresponding mask value
- Convert resulting indices back to cipher alphabet symbols
This ensures avalanche effect: changing one bit in the seed completely alters the final ciphertext.
The system supports multiple cipher alphabets stored in the alphabets\ folder:
- alphabet1635.txt: 1,635 unique Unicode characters
- alphabet5483.txt: 5,483 unique Unicode characters
- alphabet40326.txt: 40,326 unique Unicode characters
The program automatically:
- Scans the
alphabets\folder for all.txtfiles - Counts the real number of characters in each file
- Displays the actual size in the interface
- Loads the selected alphabet on demand
The table below shows the number of possible combinations for different plaintext lengths with each alphabet.
| Alphabet | Real Size | 1 Char | 10 Chars | 100 Chars | 1000 Chars |
|---|---|---|---|---|---|
| alphabet1635.txt | 1,635 | ~4.37×10⁹ | ~10⁹⁶ | ~10⁹⁶⁰ | ~10⁹⁶⁰⁰ |
| alphabet5483.txt | 5,483 | ~4.95×10¹¹ | ~10¹¹⁷ | ~10¹¹⁷⁰ | ~10¹¹⁷⁰⁰ |
| alphabet40326.txt | 40,326 | ~1.97×10¹⁴ | ~10¹⁴² | ~10¹⁴²⁰ | ~10¹⁴²⁰⁰ |
- Seed: 2¹²⁸ possible values
- Salt probability: 1000 variations
- Position weights: 64 variations
- Total keys: approximately 2¹⁴⁴ ≈ 2.2×10⁴³
- Full avalanche effect through XOR masking
- Resistance to frequency analysis due to multiple representations per character
- No deterministic relationship between plaintext and ciphertext
- Mathematical perfect secrecy when key is truly random and used once
- Larger alphabets exponentially increase security
- Python 3.8 and higher interpreter
- At least one cipher alphabet file in
alphabets\directory - Basically, all you need to do to run the program is place the
alphabets\folder andabsoluta.pyfile in the same directory
- Execute
absoluta.pywith any Python 3.8 and higher interpreter - Select source alphabet (ASCII, Russian, or Mathematical)
- Enter text in the input field
- Select a cipher alphabet from the dropdown (the program shows the real character count)
- Configure key parameters:
- Seed (32 hex characters, can be generated automatically)
- Salt probability (000-999)
- Position weights (0-3 for each position)
- Select mode (Encrypt or Decrypt)
- Click "Execute"
- Results appear in the output field
The system validates all parameters before encryption or decryption and provides clear error messages for invalid inputs.
To add your own cipher alphabet:
- Create a
.txtfile with your desired Unicode characters - Place it in the
alphabets\folder - The program will automatically detect it on next launch
- The real character count will be displayed in the dropdown menu
The program supports any UTF-8 or UTF-8-BOM encoded text file with Unicode characters.