Derived from the PlayStation Network’s DRM architecture (often speculated to stand for "Rapid Authorization Protocol" or simply a derivative of the act.dat license file), the RAP file acts as a decryption key trigger. Specifically, it activates the license stored on your console’s flash memory.
Understanding PKG and RAP files is essential for installing digital content on a modded PlayStation 3 (CFW or HEN) or the RPCS3 emulator. Key File Definitions .PKG Files