Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Codava Codec & Password Manager

An experimental custom text codec named Codava, built from scratch in Python, featuring a stealth password manager as a practical use-case demonstration.

How It Works (Architecture)

Unlike standard UTF-8 (where English characters take 1 byte and Russian characters take 2 bytes), Codava is optimized for bilingual text and source code. Every supported character (Cyrillic, Latin, digits, and Python syntax tokens) occupies exactly 1 byte.

To achieve this, each byte (8 bits) is divided into logical bit-flags:

  • Bit 1 (MSB): Language flag (0 for Russian, 1 for English).
  • Bit 2: Case flag (0 for lowercase, 1 for UPPERCASE).
  • Bits 3–8: The exact alphabet position of the character.

Digits, Python syntax (=, :, (, )), and system characters (\n, whitespace) are mapped to a custom compact lookup table special_encoding utilizing free byte spaces without overlapping the alphabet bitmask.

Encryption Effect

Because the codec uses a unique bitwise layout, any file saved with the codava encoding turns into unreadable garbage text if opened via standard Notepad, VS Code, or a web browser. The file can only be properly parsed and decoded by a script running this specific codec.

Getting Started

  1. Clone this repository or download codava.py and password_manager.py into the same directory.
  2. Run the demonstration script:
    python password_manager.py
  3. The script will generate an encrypted password.bin file, write data using the codava encoding, and successfully decode it back to the console.

Usage in Custom Scripts

You can easily drop this codec into any of your own Python projects. Simply import the module at the very beginning of your code:

import codava

# One-liner to write encrypted data
codava.save_secret("my_data.bin", "Secret text 123")

# One-liner to read and decrypt data
text = codava.load_secret("my_data.bin")
print(text)

About

Codec for python

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages