Lunaris Workflow

Visual Guide to Understanding the Encryption Process

Process Overview

Input Text

"Hello"

Character Mapping

H→+! e→.= l→/= l→/= o→_.

Master Key Layer

Optional XOR encryption

Final Output

Encrypted ciphertext
Key Features

Two-Layer Security: Character substitution + optional master key encryption

Unicode Support: Any character can be encrypted using hex encoding

Salt-Based: Each encryption uses a unique random salt for enhanced security

Character Mapping System

How Character Substitution Works

Each character in the input is replaced with a unique 2-symbol combination using these 8 special characters: ./_-+=!~

H
+!
Uppercase H maps to +!
e
.=
Lowercase e maps to .=
5
..
Number 5 maps to ..
[U20AC]
Unicode char uses hex

Complete Character Set Examples

Category Characters Example Mapping Pattern
Lowercase a-z a → ./ Uses . / _ - symbols
Uppercase A-Z A → -! Uses - + = ! ~ symbols
Numbers 0-9 0 → ~- Uses ~ and doubles
Common Space, punctuation Space → == Special patterns
Unicode Any other character € → [U20AC] Hex encoding fallback

Step-by-Step Workflow

1
Input Validation
System validates the input text and ensures it's a valid string
Input: "Hello World!" ✓ Valid string detected
2
Generate Salt
Creates a cryptographically secure 16-byte random salt (if master key is used)
Salt generated: b'x9f\x8a...' (16 bytes) Base64 encoded: 2Z+KrL...
3
Character-by-Character Mapping
Each character is looked up in the predefined mapping dictionary
H → +! (uppercase) e → .= (lowercase) l → /= (lowercase) l → /= (lowercase) o → _. (lowercase) → == (space) W → !~ (uppercase) ...
4
Handle Unicode Characters
Characters not in the mapping are converted to hex format [UXXXX]
€ → [U20AC] 🌍 → [U1F30D] 中 → [U4E2D]
5
Apply Master Key Layer (Optional)
If master key is provided, apply PBKDF2 key derivation and XOR encryption
PBKDF2(master_key, salt, 100000 iterations) XOR each byte with derived key Base64 encode result
6
Final Output
Combine salt and encrypted data (if master key used) or return mapped text
Without master key: +!.=/=/=_.==!~_+.. With master key: 2Z+KrL...:QmFzZTY0RGF0YQ==

Security Layers

Layer 1: Character Substitution
Basic obfuscation using predefined character mapping. Provides good protection against casual inspection but can be reverse-engineered if the mapping is known.
Layer 2: Key Derivation (Optional)
PBKDF2 with SHA-256, 100,000 iterations, and random salt. Converts the master key into a strong encryption key that's resistant to brute-force attacks.
Layer 3: XOR Encryption (Optional)
XOR cipher using the derived key, followed by Base64 encoding. Adds cryptographic protection on top of the character substitution layer.
Security Considerations

Character Substitution Alone: Provides obfuscation but is not cryptographically secure. The mapping can be reverse-engineered through frequency analysis.

With Master Key: Significantly more secure due to PBKDF2 key derivation and XOR encryption, but still should be combined with established encryption standards for highly sensitive data.

Interactive Demo

Try the Encryption Process

Enter text below to see how each step of the encryption process works:

Click "Encrypt Step-by-Step" to see the process...

What You'll See

The demo shows each character being mapped to its encrypted equivalent, demonstrating the core substitution cipher. In a real implementation with a master key, additional encryption layers would be applied.