To celebrate the Australian Signals Directorate’s 75th birthday, we sent them an encoded message on Twitter. If you’re not sure what we said, or how we said it, find out how to decode our message below.
The coded message:
The message is encoded using a repeating XOR (Exclusive OR) operation, with the key 75YEARS included as a hashtag and subtle hint. The XOR is a common bitwise operator used in computing, whereby two bits (0s and 1s) are compared – the result of the operation is 1 if the two bits are different (0 and 1) and 0 if the bits are the same (0 and 0, or 1 and 1). XOR-ing a message with a secret key scrambles the message.
How it works:
1. In order to XOR the above 76-character message with the key 75YEARS, we must equalise the length of both. This is done by repeating the key numerous times until we have a 76-character key:
Congratulations on 75 years of revealing their secrets & protecting our own.
2. We then perform the XOR operation on the unique ASCII code associated with the characters in two strings. This is most easily done using any kind of programming language by writing a short script, or using an online tool which can perform XOR on given input data. XOR can be done manually by converting both strings into binary and comparing them bit-by-bit to obtain the XOR result.
3. The XOR result, being in binary, is very long. We convert this to hexadecimal (base 16, commonly used in computing to represent binary data), resulting in the following encoded string.
74 5a 37 22 33 33 27 42 59 38 31 28 3d 3d 44 15 36 2b 61 65 66 17 4c 3c 24 33 21 73 58 53 79 37 24 24 36 56 59 30 2b 26 72 27 5f 50 30 37 61 21 36 54 47 3c 31 32 72 75 17 45 2b 2a 35 37 30 43 5c 37 22 61 3d 26 45 15 36 32 2f 7c
4. Due to the choice of key, each hexadecimal value contains two digits and as such can be compacted into a single numeric string without white space.
Decoding of the hexadecimal string can be done by XOR-ing with the hexadecimal representation of the 76-character key above which when converted from ASCII to text will reveal the message, Congratulations on 75 years of revealing their secrets & protecting our own.