Attention Please: The U.S. Library of Congress has ruled that unlocking iPhones purchased after January 26th, 2013 is no longer legal.
The ruling which we reported on back in October allows for phones you already have to be unlocked. However, any device purchased over 90 days past the effective date of the ruling (October 28th, 2012) can only be unlocked with the carrier's permission.
Here's the details:
Computer programs, in the form of firmware or software, that enable a wireless telephone handset originally acquired from the operator of a wireless telecommunications network or retailer no later than ninety days after the effective date of this exemption to connect to a different wireless telecommunications network, if the operator of the wireless communications network to which the handset is locked has failed to unlock it within a reasonable period of time following a request by the owner of the wireless telephone handset, and when circumvention is initiated by the owner, an individual consumer, who is also the owner of the copy of the computer program in such wireless telephone handset, solely in order to connect to a different wireless telecommunications network, and such access to the network is authorized by the operator of the network.
This exemption is a modification of the proponents’ proposal. It permits the circumvention of computer programs on mobile phones to enable such mobile phones to connect to alternative networks (often referred to as “unlocking”), but with limited applicability. In order to align the exemption to current market realities, it applies only to mobile phones acquired prior to the effective date of the exemption or within 90 days thereafter.
Notably, the Electronic Frontier Foundations questions the authority of this decision. EFF attorney Mitch Stoltz told TechNewsDaily, "Arguably, locking phone users into one carrier is not at all what the DMCA was meant to do. It's up to the courts to decide."
The same decision also made jailbreaking your iPad 'illegal' as well. More details can be found here. Remember this only applies to citizens of the U.S.A.