Text Encryption and Decryption

Cryptology Monster encrypts text using AES-256-GCM and supports both randomly generated keys and password-derived keys. AES-GCM provides confidentiality together with authentication of the encrypted data.

Encryption Modes

ModeKey SourceRequired for Decryption
Random keyGenerated AES-256 keykey.bin
PasswordPBKDF2-derived AES-256 keyOriginal password

Both modes download the encrypted text as:

encrypted.bin

Encrypting Text with a Random Key

Usage

  1. Select Encrypt.
  2. Enter plaintext.
  3. Leave Use password-based key (PBKDF2) unchecked.
  4. Click Encrypt and Download.
  5. Save both downloaded files.

Output

encrypted.bin
key.bin

The application generates a random 256-bit AES key and a random 12-byte initialization vector (IV).

The AES key is exported as 32 raw bytes in key.bin.

Encrypted File Layout

[12-byte IV][AES-GCM ciphertext and authentication tag]

The file does not contain a text header or filename metadata.

Decryption

  1. Select Decrypt.
  2. Upload encrypted.bin.
  3. Upload the corresponding key.bin.
  4. Leave password mode disabled.
  5. Click Decrypt.
  6. Read the resulting plaintext.

If the files do not correspond or the encrypted content has been modified, authentication should fail.

Encrypting Text with a Password

Usage

  1. Select Encrypt.
  2. Enter plaintext.
  3. Enable Use password-based key (PBKDF2).
  4. Enter a password.
  5. Click Encrypt and Download.
  6. Save encrypted.bin.

Key Derivation

ParameterValue
AlgorithmPBKDF2
HashSHA-256
Iterations100,000
Salt length16 bytes
AES key length256 bits
AES modeGCM
IV length12 bytes

The application generates a random salt and IV for every encryption operation.

Although the interface includes an optional salt field, the supplied encryption function always generates a new salt and does not read the manually entered value.

Encrypted File Layout

[16-byte salt][12-byte IV][AES-GCM ciphertext and authentication tag]

The salt and IV are stored in the encrypted file.

They are not secret.

Decryption

  1. Select Decrypt.
  2. Upload encrypted.bin.
  3. Enable password-based mode.
  4. Enter the original password.
  5. Click Decrypt.
  6. Review the plaintext in the output area.

The program reads the salt and IV from the file and derives the same AES key from the supplied password.

Understanding Authentication

AES-GCM authenticates encrypted content.

Decryption generally fails when:

  • The password is wrong.
  • The key file is wrong.
  • The encrypted content has changed.
  • The file is truncated.
  • The wrong encryption mode is selected.

This helps detect accidental corruption and unauthorized modification.

Important Security Warning

In password-based text encryption mode, the supplied implementation displays the entered password in plaintext in the Encryption Info result window.

Anyone who can see the result window can read that password.

Avoid exposing the result window, and treat this as a security limitation of the current implementation.

Text Handling

The plaintext is trimmed before encryption.

This means leading and trailing whitespace can be removed.

For example, the original text:

  confidential message  

is processed as:

confidential message

The application uses UTF-8 when encoding the plaintext.

Compatibility

The text encryption format is application-specific.

It does not automatically produce an OpenPGP message, ZIP archive, or standard encrypted document container.

To decrypt the generated file in another application, that application must understand the key-derivation parameters and binary layout.

Recovering Encrypted Text

Encryption ModeWhat to Preserve
Random keyencrypted.bin and key.bin
Passwordencrypted.bin and the exact password

There is no recovery mechanism shown in the source code.

Important: Before relying on encryption for important information, perform a complete encryption and decryption test and retain secure backups of required keys.


Did this page help you?