ChannelConfig and BulkConfig carry MacCipherScheme; a change to it reopens
every connection the way a key change does. PeerConnection reads the
scheme's preamble length (16 legacy, 48 modern) instead of a hard-coded 48.
The diagnostic: the peer's opening bytes are kept until one packet has
framed. If the first packet fails framing under the configured scheme and
the same raw bytes frame under the other one, the connection closes with
.invalidKey(.cipherSchemeMismatch) and reports status
.cipherSchemeMismatch, so the menu names the setting to change rather than
blaming the security key. Costs one AES setup on a connection that was
going to fail anyway, and nothing at all on success.
The bulk channel needs no diagnostic: a transfer only starts with a peer
whose control connection already framed.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>