Unlocking s-off is not illegal. However, it can void your device's warranty. Before unlocking s-off, make sure you understand the consequences.