No, tax planning is not illegal, it is the correct application of the principles established by applicable laws to promote the compliance by optimizing the resources. It should not be construed as tax evasion.