The invention relates to a Unity AssetBundle resource
encryption method and a
system thereof, and belongs to the technical field of
computer software security. According to the method, transparent
encryption,
client local dynamic
key generation and automatic decryption full-process
collaboration are realized through an
encryption tool. A multi-round symmetric encryption
algorithm driven by a dynamic key is adopted, block encryption and streaming key
diffusion characteristics are fused, and aiming at AssetBundle structure optimization, differential
attack resistance,
brute force cracking resistance and tampering resistance are achieved. And the key is only generated in real time in the memory of the
client without landing and
server circulation, so that the leakage risk is completely eradicated from the source. Unified loading of encrypted or unencrypted resources is supported, and smooth transition of the game to an encrypted version is achieved without forcing a player to update the whole
package. In the aspect of performance, the time consumption for batch decryption of 500 resources is less than or equal to 3ms, and the performance loss is lt; 1%. The method is compatible with Android, iOS, Windows, swan, macOS and small game multi-terminal environments, zero codes are accessed, and the industrial problems that the
key management risk is high, the decryption performance is poor, and the switching wastage rate is high are effectively solved.