The State Department said today that both also have been designated as specially designated global terrorist groups under federal law.
The two designations mean that US regulatory agencies are instructed to block business and financial transactions with the organisation.
Ansaru and Boko Haram, which has links to al-Qaida, has been waging a brutal campaign against military, government and civilian targets in Nigeria, Africa's most populous country and a top oil exporter.