Or then there's no security aspect to the inserting of the code whatsoever. The starship has excellent security built in overall: it can do voice analysis to identify authorized users, say, and has never accepted commands from unauthorized users who weren't Bele-and-Lokai-level superbeings. But here it doesn't even need to identify the user or verify his authority, as there's no need to doubt those things. We never see the computer challenge Kirk for his order to set course to Alpha Beta, or Spock for his attempt to study records on the Weird Phenomenon. Why challenge the user for trying to take over the Reliant?
It's not between Spock and the Reliant. It's between the Enterprise and the Reliant. And the security between those two will be sorted by means not accessible to the audience, at a cybernetic level.
That the flip-switch row would be dedicated to the entering of the prefix code sounds highly unlikely. They are at an absurdly prominent position for such an astronomically unlikely procedure. Far more probably, the switches are for something Spock routinely does as part of his science duties: perhaps a simple alphanumeric keyboard isn't fine for everything, and you need this no-number-can-be-entered-twice setup for a range of things, one of which happens to be the prefix code? Might be something mechanically straightforward, such as each switch triggering a specific subspace sub-transmitter, which have multiple uses, among them the takeover of a fellow starship. Now there's built-in security: only a signal identifiable as a combination of transmissions from Federation-manufactured transmitters of known make will be accepted as the trigger for the surrender-control subroutine.
Timo Saloniemi