The White House has confirmed that the Trump administration is engaged in direct talks with Hamas, saying the discussions align with US interests.