Skip to content

XOR ​

XOR is a bitwise operation used by Geometry Dash to encrypt data. It is commonly denoted as a ^ in many programming languages

Geometry Dash has 2 methods to encrypting data using XOR:

  • Using a singular key
  • Cycling through a 5 digit key

When needed, Geometry Dash iterates through every byte of the data and applies the XOR operation using its key

Examples ​

Below are examples of the algorithms used

Singular ​

Pseudocode ​

js
result = "";
for (i = 0; i < input.length; i++) {
  byte = input[i].toByte();
  result += (byte ^ key).toChar();
}

Python ​

py
def xor(input: str, key: int):
    return "".join(
        chr(ord(char) ^ key)
        for char in input
    )

Cycle ​

Pseudocode ​

js
result = "";
for (i = 0; i < input.length; i++) {
  byte = input[i].toByte();
  xKey = key[i % key.length].toByte();
  result += (byte ^ xKey).toChar();
}

Python ​

py
def cyclic_xor(input: str, key: int):
    key_str = str(key)
    
    return "".join(
        chr(ord(char) ^ ord(key_str[i % len(key_str)]))
        for i, char in enumerate(input)
    )

Keys ​

KeyUsageXOR Type
11Player Save DataSingular
14251Player MessagesCycled
19283Vault CodesCycled
19847Daily ChallengesCycled
26364Level PasswordCycled
29481Comment IntegrityCycled
37526Account PasswordCycled
39673Level Leaderboard IntegrityCycled
41274Level IntegrityCycled
48291Load DataCycled
52832MultiplayerCycled
57709Music/SFX Library SecretCycled
58281Rating IntegrityCycled
59182Chest RewardsCycled
85271Stat Submission IntegrityCycled