Cryptography guides

Check an encrypted backup before relying on it

·

A restore drill checks that you kept the right encrypted backup and can reproduce its original passphrase. Try the public sample first, then use the same steps with a disposable copy of your own data.

AES-GCM Encryptor

Restore the public practice backup

Choose Load practice backup. This loads the saved Base64 without filling the passphrase. Enter paper-lantern-2026 and choose Restore backup. The restored text lists Locker B17 and Crate: café supplies, followed by a line break.

Try the same saved Base64 with one different character in the passphrase. The authentication message appears and the result disappears. Restore the original passphrase to distinguish a mismatch from a failed backup file.

Public practice backup and authenticated UTF-8 text
VE1CQUsBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaG/MuTQ8gw5BTfQ1CA6reHEKLRg2j4/GQUTF5csRb4/VZMYR/NPTy1v3LodZGGn2/hSZaMGM=

NIST SP 800-38D, GCM authenticated encryption

Compare a new backup with the original

Encrypt a practice file under 16 MiB and download its .tmbak file. Switch to Restore, choose .tmbak file, upload the saved bytes, and re-enter the passphrase. Download the result and compare its contents with the original. The filename may be simplified for download.

For short text, the displayed Base64 and the raw .tmbak download carry the same envelope bytes. A fresh random salt and nonce make each encryption different, so compare the restored contents. Keep the original until you verify the downloaded backup.

W3C Web Cryptography API

Read the version 1 backup envelope

The raw envelope begins with the five ASCII bytes TMBAK, version byte 01, a 16-byte salt, and a 12-byte GCM nonce. Its 34-byte header is authenticated as additional data. The remaining bytes are ciphertext followed by a 16-byte authentication tag.

Encode the passphrase exactly as UTF-8 and derive 32 key bytes with PBKDF2-HMAC-SHA256 using the envelope salt and 600,000 iterations. The authenticated plaintext starts with a one-byte kind, 00 for text or 01 for files, followed by a two-byte unsigned big-endian UTF-8 filename length. Text uses length zero. File records store the filename before the exact file contents.

For version 1, the work factor and fields are fixed. Choose a long, unique passphrase and keep it with your recovery information. The public sample has a published passphrase for practice.

NIST SP 800-38D, GCM authenticated encryptionW3C Web Cryptography APIOWASP Password Storage Cheat Sheet, PBKDF2 work factors

Common questions

Will restoring modify a submitted file?

The workspace creates a separate download. The encrypted and original files remain as selected.

What if I can no longer find the passphrase?

The format has no recovery key. Preserve the passphrase separately from the encrypted file so you can reproduce it when restoring.

Sources

Put it into practice.

Related guides