If I needed to implement an encryption algorithm from memory, chances are I would try to implement: TEA https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
How sensitive is it to the magic number? If I replace it with a random value is security expected to be severely diminished? What about the rotations? Which rotations numbers are safe? Are there clear requirements for them?