Consider the structure of the Feistel network . The main principle of work is to divide the data into two parts and hash one part of the mask into an exclusive or into another part. This is reversible even if the hash itself is not. During decryption, the same (potentially destructive) hash operation is used to create the same mask as before, and which is exclusive to the other part, thereby restoring its original value. This operation can be repeated with different splits, so that all bits get the opportunity to influence all other bits and be affected by all other bits, and the chain just needs to be played back in order to decrypt it.
Similarly, destructive and bitwise shifts are used only as exclusive or masks, which are used to rearrange the full copy of the original value.
k ^= k >> 11 means to take the upper 21 bits of k and exclude - or them to the lower 21 bits of k. The top 11 bits of k are not changed, and we can use them to restore the next 11 bits of k by exclusively repeating them over these bits. Then we can use these newly opened source bits k to restore the original value of the rest of k.
source share