- You may also be looking for a starship's registry number or ship name prefix.
The prefix code is a numbered code individually assigned to each Federation starship. It is a defensive measure designed to help Starfleet personnel combat enemies who have seized control of a ship of their fleet, and to prevent enemy ships from attempting to seize control of a Starfleet vessel.
When the relevant code is entered into the computer system of another ship, that ship is able to remotely control systems on the other ship. This includes weapons and defense systems, which enables the controlling ship to reduce the seized ship's fighting capabilities in order to permit effective attacks. However, a knowledgeable enemy can take the precaution of changing the code.
This defensive feature proved a lifesaver in the initial engagement of the Battle of the Mutara Nebula where the damaged USS Enterprise managed to drive off the USS Reliant by accessing this code. (Star Trek II: The Wrath of Khan)
In 2367, Captain Jean-Luc Picard revealed the prefix code of the USS Phoenix to Cardassian authorities when its captain, Benjamin Maxwell, waged war on the Cardassians to try and avenge the memory of the Setlik III massacre. The code allowed a Cardassian warship to remotely disable the Phoenix's shields. Unfortunately, the Phoenix was still able to destroy the warship. (TNG: "The Wounded")