There are a number of federal tax crimes. But as to federal tax evasion, the applicable statute is Internal Revenue Code (IRC) section 7201, which reads:
Any person who willfully attempts in any manner to evade or defeat any tax imposed by this title or the payment thereof shall, in addition to other penalties provided by law, be guilty of a felony and, upon conviction thereof, shall be fined not more than $100,000 ($500,000 in the case of a corporation), or imprisoned not more than 5 years, or both, together with the costs of prosecution.
The Supreme Court has spelled out the three elements the government must prove to win a conviction of IRC § 7201:
As has been held by this Court, the elements of s 7201 are willfulness; the existence of a tax deficiency, Lawn v. United States, 355 U.S. 339, 361, 78 S.Ct. 311, 323, 2 L.Ed.2d 321; Spies v. United States, supra, 317 U.S. at 496, 63 S.Ct. at 366; and an affirmative act constituting an evasion or attempted evasion of the tax, Spies v. United States, supra.
Sansone v. United States, 380 U.S. 343, 351, 85 S. Ct. 1004, 1010, 13 L. Ed. 2d 882 (1965). Thus, actions like failing to file federal income tax returns along with concealing your income from the government, knowingly failing to report all your income on a return you do file, and knowingly taking deductions and credits on your return that you are not entitled to take are all acts of tax evasion.
Whether it is legal depends on how this is done and how the child and parent report it on their various federal tax returns. Understand that this transaction may well be challenged by the IRS as not being bona fide gift to the parent causing it to fail in achieving the stepped up basis unless carefully done. It also comes with the downside of (1) requiring the child to file federal gift tax returns if the stock involved (along with any other gifts the child gives the parent during the year) exceeds the gift tax exclusion for the year and (2) adds the stock to the parent's gross estate for federal estate tax purposes. Thus for the very wealthy this would not be worth doing as the gift and estate taxes involved would exceed the benefit of any stepped up basis, even assuming they could withstand IRS challenge.