Skip to main content

Cryptography & Ciphers

RC2 Encryption

Apply RC2 Encrypt with explicit key, format, and algorithm settings. Enter the data and key material, choose the parameters, then review the result.

Tool workspace

Your input stays in this browser.

Add the required input to continue.

Needs input

You can run the tool again after any change.

Options

Your result appears here

Apply RC2 Encrypt with explicit key, format, and algorithm settings. Enter the data and key material, choose the parameters, then review the result.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

RC2 Encryption creates RC2 ciphertext from input bytes and a key, for legacy compatibility tests. An 8-byte IV selects CBC and a blank IV selects ECB. The tool always adds PKCS#7 padding, so even block-aligned input gains a padding block.

Hex returns printable ciphertext bytes. Raw returns a byte string that may contain unreadable characters. Neither output includes the key or IV.

  • Create a reproducible RC2 fixture for a compatibility test.
  • Compare CBC and ECB output for the same plaintext and key.
  • Check a legacy decryptor with known plaintext and matching parameters.

Sources: RFC 2268: RC2 algorithm and effective key length

Instructions

  1. Enter Hello RC2 as the input. Select Raw under Input and Hex under Output.
  2. Set Key to Hex with 0011223344556677. Set IV to Hex with 0102030405060708. Use these public values only for this test.
  3. Run the tool. The result is 799ba7666fa19bb3a3a6eb8c11f37f05. Decrypt it with the same settings to recover Hello RC2.

Example

Input: Hello RC2

Settings: RC2 Encryption with Key format Hex, Key 0011223344556677, IV format Hex, IV 0102030405060708, Input Raw, and Output Hex.

Result: 799ba7666fa19bb3a3a6eb8c11f37f05

RC2 Encryption returns 15d209d4f18857de6863428368cfea9d for the same input when the IV is blank, because ECB uses no IV. Decrypt either value with matching settings to recover Hello RC2.

Limits

  • The engine uses 128 effective key bits and PKCS#7 padding. It has no control for other effective key lengths.
  • A blank IV selects ECB, which reveals repeated 8-byte blocks.
  • RC2 is obsolete and unauthenticated. Do not use it to protect new data.