>How do sub commanders get new codes?
Seem to recall something like the codes are on paper in a safe that CO & XO have to access together–ergo, they're issued on departure from port and not changed until return. That could prove interesting in the current circumstances, if things are still done that way. Probably are, as comms with subs are pretty much the same as they were 75 years ago, constrained as they are by the laws of physics.
Not mil or ex-mil here, just regurgitating some shit I saw in a documentary 20 years ago.