This is a information in “The observer” that confirming that the dolphins have really been trained by the US military. Experts who have studied the US navy's cetacean training exercises claim the 36 mammals could be carrying 'toxic dart' guns. Divers and surfers risk attack, they claim, from a species considered to be among the planet's smartest. The US navy admits it has been training dolphins for military purposes, but has refused to confirm that any are missing.
Dolphins have been trained in attack-and-kill missions since the Cold War. The US Atlantic bottlenose dolphins have apparently been taught to shoot terrorists attacking military vessels. But those who have studied the controversial use of dolphins in the US defense programme claim it is vital they are caught quickly. In addiction, the newspaper explain that the navy launched the classified Cetacean Intelligence Mission in San Diego in 1989, where dolphins, fitted with harnesses and small electrodes planted under their skin, were taught to patrol and protect Trident submarines in harbour and stationary warships at sea. Criticism from animal rights groups ensured the use of dolphins became more secretive. But the project gained impetus after the Yemen terror attack on the USS Cole in 2000. Dolphins have also been used to detect mines near an Iraqi port.
In another site I found this information: The United States Navy uses echolocation for their submarines. They send sounds out that bounce back to where enemies and other things are. This is called Sonar. Sonar stands for Sound Navigation And Ranging. Dolphins echolocate better and faster than humans can. This is because they can hear higher pitched sounds and can make the noises much faster.