## On the Chopping of The Forest [Cipher]

### Step 1: Chain Bit-Rotation Cipher

For this step, you will need everything on page 1, which we will call the encrypted word, the initial number, and the keyword, respectively. If the keyword is shorter than 6 letters, append a repetition of it to it.

Assign the initial number A and the alphabetic positions of each letter in the encrypted word (A1Y25Z0) B - G respectively. Calculate this expression:

`((((((A * 26) + B) * 26 + C) * 26 + D) * 26 + E) * 26 + F) * 26 + G`

Convert this result to binary, padding leading 0s until there are 30 binary digits. Now, starting with a value `n` of 30, carry out the following steps 6 times:

- Cycle the least significant
`n`bits to the right by`m`bits. Here,`m`is the alphabetic position of the next letter in the keyword (A1Z26). - Remove the last 5 bits from the number and convert them to a letter (A = 00001 ... Z = 11010).
- Reduce
`n`by 5.

#### Example

Encrypted word: XOGXTU; initial value: 2; keyword: DINE

Calculation: (((((2×26 + 24)×26 + 15)×26 + 7)×26 + 24)×26 + 20)×26 + 21 = 909979013

Binary: 909979013 = 110110001111010010110110000101

Cycle 30 bits right by D=4: 0101110110001111010010110*11000* → 24 → X

Cycle 25 bits right by I=9: 01001011001011101100*01111* → 15 → O

Cycle 20 bits right by N=14: 110010111011000*10010* → 18 → R

Cycle 15 bits right by E=5: 1100011001*01110* → 14 → N

Cycle 10 bits right by D=4: 10011*10001* → 17 → Q

Cycle 5 bits right by I=9: 00111 → 7 → G

New Encrypted Word: XORNQG