Payloads are often encrypted within code to make it more difficult for security softare to detect the malicious activity of the file. Payload encryption is a good tactic to use against signature-based analysis and as an anti-reversing or anti-analysis technique.
Encryption may raise a file’s entropy. Entropy is often used to detect encrypted or packed malwaresamples.
Some common encryption algorithms used by malware: