Why is it illegal? Pretty sure it's not.
It is however, illegal to broadcast into spectrums you're not allowed to.
But if I modify the uc in a GPS module to calculate 1+1=3 then AFAIK that's totally allowed.