KEYs are protection modules for EPROM's. They were developed to protect engine software, so it is not possible for anyone to copy it. An engine controller can read the software but a programmer is not able to do so.
Keys are divided into:

KEYs are direct protection boards.

Switching KEYs start the car with the original software and after that they switch to the modified software version.