Skip to main content
Glama

cyberchef_xor

Decode or encode data using bitwise XOR with a repeating key for malware analysis, obfuscation, and CTF challenges. Applying XOR twice restores original plaintext.

Instructions

Applies a bitwise XOR cipher using a repeating key against the input string. Frequently used in malware analysis, shellcode obfuscation, and CTF challenges. Applying XOR twice with the same key restores the original plaintext.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe secret key used for XOR operations. Can be a text string or hex bytes.
inputYesThe ciphertext or plaintext string to process with bitwise XOR.
keyFormatNoOptional format of the key string. Allowed values: 'UTF8' (default, ASCII/UTF-8 string key) or 'Hex' (hexadecimal byte key, e.g. '5a' or 'deadbeef').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.2
    • changedInput schema / properties / input / description
      Previous value: -"Ciphertext or plaintext"New value: +"The ciphertext or plaintext string to process with bitwise XOR."
    • changedInput schema / properties / key / description
      Previous value: -"Secret key for XOR"New value: +"The secret key used for XOR operations. Can be a text string or hex bytes."
    • changedInput schema / properties / keyFormat / description
      Previous value: -"Format of key string"New value: +"Optional format of the key string. Allowed values: 'UTF8' (default, ASCII/UTF-8 string key) or 'Hex' (hexadecimal byte key, e.g. '5a' or 'deadbeef')."
  2. First observedv1.0.1

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the behavioral disclosure burden. It clearly explains the algorithm, the repeating-key behavior, and the reversibility property ('Applying XOR twice with the same key restores the original plaintext'). It does not specify output representation or handling of malformed keys, but the core behavior is well disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three short sentences with no filler. The core operation is front-loaded, followed by relevant use cases and an important behavioral property, so every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with fully documented parameters and a clear algorithmic description. Since there is no output schema, a brief note on output format would improve completeness, but the essential information needed to select and invoke the tool is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for input, key, and keyFormat, including enum options, so the baseline is 3. The description's mention of a 'repeating key' adds minor context but does not materially extend the schema's parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific operation: 'Applies a bitwise XOR cipher using a repeating key against the input string.' It also names concrete use cases (malware analysis, shellcode obfuscation, CTF) and is clearly distinct from all listed sibling transforms, none of which perform XOR.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives implicit usage context by mentioning malware analysis, shellcode obfuscation, and CTF challenges. However, it does not explicitly state when to choose this over alternatives or name any sibling tool that should be used instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.