← Back to portfolioView résumé
Back to Systems

INTERACTIVE / DATA PROTECTION

Data protection lab.

One value, three different outcomes. A reference, a redacted view, and encrypted data.

Educational demo. Fictional values only. No HSM or CSP connection. Inputs, mappings, and the key stay in page memory; nothing is submitted or saved by this lab.

16 / 256

Side-by-side results

0 / 50 demo mappings
No current comparison.

Tokenization

Replace the value with a random reference of the same length. Recovery uses the vault mapping, not decryption.

  1. Input
  2. Demo vault
  3. Token
TOKEN
Awaiting comparison

Random letters and digits, matching the input length.

Length includes spaces and counts Unicode code points. Very short tokens have few possible values. This in-memory vault is not a production security boundary.

Masking

Hide characters in a display value. This reduces what is visible without encrypting the original.

  1. Input
  2. Display rule
  3. Masked view
MASKED VALUE
Awaiting comparison

Values of 4 characters or fewer are fully hidden.

No inverse operation from this output

Hidden characters cannot be recovered from the masked string alone. The original value still exists in the input.

Encryption

Transform the value using AES-256-GCM. Decryption needs the matching key, and authentication detects modified data.

  1. Input
  2. Key + IV
  3. Ciphertext
CIPHERTEXT / BASE64
Awaiting comparison

256-bit key / 96-bit unique IV / 128-bit tag

The IV is public and unique per encryption. Resetting or reloading this page discards the demo key.

Different tools. Different jobs.

Comparison of the three methods in this demo
In this demoTokenizationMaskingEncryption
What changesValue replaced by a random reference of the same lengthCharacters hidden in the displayed valueValue transformed into ciphertext
How recovery worksLook up the token in the mapping tableHidden characters are absent from the masked outputDecrypt using the matching key, IV, and authentication tag
Same input againSame token while its mapping existsSame output with the same policyDifferent ciphertext because each operation uses a unique IV
What must be protectedThe original data and access to its mappingThe original data behind the masked viewThe key and the surrounding application

This vault-based example preserves length, not character types or spacing. Tokenization does not always preserve length. Masking is not encryption or guaranteed anonymization. Browser cryptography does not provide an HSM security boundary or establish compliance.