XOR Brute Force

Enumerate all possible XOR solutions. Current maximum key length is 2 due to browser performance.

Input: Text (UTF-8) or original file bytesResult: Text

Text input

Run to see the result

Examples

Example keys and passwords are public test material.

Solve Cryptopals challenge 3

Input

aa03d88ce2507e9655147818.bin

34 bytes

Download

Expected answer

Key = 58: Cooking MC's like a pound of bacon
Key length
1
Sample length
100
Sample offset
0
Scheme
Standard
Null preserving
Off
Print key
On
Output as hex
Off
Crib (known plaintext string)
Cooking MC's
Recover a two-byte repeating key from an HTTP header

Input

bf33897ade01b41717b6262b.bin

24 bytes

Download

Expected answer

Key = 5859: Content-Type: text/plain
Key length
2
Sample length
100
Sample offset
0
Scheme
Standard
Null preserving
Off
Print key
On
Output as hex
Off
Crib (known plaintext string)
Content-Type:
Inspect recovered JSON bytes in hexadecimal

Input

dde2e12cea6995770956f685.bin

11 bytes

Download

Expected answer

Key = 2a: 7b 22 6f 6b 22 3a 74 72 75 65 7d
Key length
1
Sample length
100
Sample offset
0
Scheme
Standard
Null preserving
Off
Print key
On
Output as hex
On
Crib (known plaintext string)
{"ok":
Skip a four-byte container prefix before testing keys

Input

c9ba9a5db4318fefaeba56a7.bin

28 bytes

Download

Expected answer

Key = 5a: GET /robots.txt HTTP/1.1
Key length
1
Sample length
100
Sample offset
4
Scheme
Standard
Null preserving
Off
Print key
On
Output as hex
Off
Crib (known plaintext string)
GET /robots.txt
Reject an impossible crib without inventing a key

Input

1ec3215fc142d436c7b6ffa6.bin

3 bytes

Download

Expected answer

Empty result
Key length
1
Sample length
100
Sample offset
0
Scheme
Standard
Null preserving
Off
Print key
On
Output as hex
Off
Crib (known plaintext string)
Content-Type:

Optionally enter a string that you expect to find in the plaintext to filter results (crib).

Format reference: XOR Brute Force background and specification

Related tools

Browse encryption / encoding tools