Encrypted packets are marked as encrypted when they are transmitted. Only encrypted packets are unencrypted at the receiving end. This is a fairly fine point, but it should be noted if for some reason you have a mix of radios with encryption enabled on some, but not on others.
If a radio receives an encrypted packet, then it will decrypt it with whatever key is present in memory. If the key matches the key used to encrypt the packet, then the message will decode correctly. If the key is incorrect (or has not been set) then the decryption will fail and the packet will be discarded.
It is worth noting that this decryption process will occur on any encrypted packet, regardless of whether outgoing encryption has been enabled on the receiving radio or not.
Likewise, if a radio with encryption enabled receives an unencrypted packet, it will not try to decrypt the data. Doing so would scramble the data.
Finally, encrypted packets may be safely forwarded with relays or by bouncing packets from radio to radio. Packets are not decrypted in the forwarding process, so it does not matter whether a matching key has been programmed into the relay or forwarding radio.
