Skip to Main Content
Mastering Reverse Engineering
book

Mastering Reverse Engineering

by Reginald Wong
October 2018
Beginner to intermediate content levelBeginner to intermediate
436 pages
9h 36m
English
Packt Publishing
Content preview from Mastering Reverse Engineering

Encrypting and decrypting a file

Ransomware has been one of the most popular malware to spread out globally. Its core element is being able to encrypt files.

In these encrypt and decrypt programs, we are going to learn about some of the basic APIs used in encryption and decryption.  

The API used to encrypt is CryptEncrypt, while CryptDecrypt is used for decryption. However, these APIs require at least a handle to the encryption key. To obtain the handle to the encryption key, a handle to the Cryptographic Service Provider (CSP) is required. In essence, before calling CryptEncrypt or CryptDecrypt, calling a couple of APIs is required to set up the algorithm that will be used.

In our program, CryptAcquireContextA is used to get a CryptoAPI ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reversing: Secrets of Reverse Engineering

Reversing: Secrets of Reverse Engineering

Eldad Eilam
Understanding the Linux Kernel, 3rd Edition

Understanding the Linux Kernel, 3rd Edition

Daniel P. Bovet, Marco Cesati

Publisher Resources

ISBN: 9781788838849Supplemental Content