The United States will hand over the control of all prisons in Afghanistan to Afghan security forces within six months.