On the Subject of Roger.pdf
Only use this manual as a last resort.
To solve this module, calculate a message code based on the 4─digit number shown on page 1 of the game manual using the process detailed below.
Section 0: Definitions, Functions, Constants, and Operations on Bit Strings and Integers
Subsection 0.0: Definitions
-
A word is a 32-bit string, which may be represented as 8 hex digits. To convert between the two, each 4-bit string is replaced with its corresponding hex digit.
- An integer x, satisfying the relationship 0 ⩽ x < 2^32, can be represented as a word.
- A block is a 512-bit string, which may be represented as a sequence of 16 words.
Subsection 0.1: Operations
-
Bitwise logical operations follow their standard definitions.
- X AND Y = bitwise logical “and” of X and Y
- X OR Y = bitwise logical “or” of X and Y
- X XOR Y = bitwise logical “exclusive-or” of X and Y
- NOT X = bitwise logical “not” of X
-
The operation X + Y on words X and Y, representing integers x and y is defined as follows: Let n % m be the remainder upon dividing n by m. Compute
- z = (x + y) % 2^32
-
The circular left shift operation S(X,n), where X is a word and n is an integer with 0 ⩽ n < 32, is defined by
- S(X,n) = (X << n) OR (X >> 32-n)
- Bit padding is used to make the total length of the padded message a multiple of 512. This process then processes sequential blocks of 512 bits when calculating the message code. Suppose a message has length l < 2^64. Before the message is processed, it is padded on the right as follows: